Class DataUtil


  • @ApplicationScoped
    @Named("dataUtil")
    public class DataUtil
    extends Object
    • Constructor Detail

      • DataUtil

        public DataUtil()
    • Method Detail

      • getPropertType

        public static Class<?> getPropertType​(String className,
                                              String name)
                                       throws io.jans.orm.exception.MappingException
        Throws:
        io.jans.orm.exception.MappingException
      • getGetterMethod

        public static io.jans.orm.reflect.property.Getter getGetterMethod​(Class<?> clazz,
                                                                          String name)
                                                                   throws io.jans.orm.exception.MappingException
        Throws:
        io.jans.orm.exception.MappingException
      • getSetterMethod

        public static io.jans.orm.reflect.property.Setter getSetterMethod​(Class<?> clazz,
                                                                          String name)
                                                                   throws io.jans.orm.exception.MappingException
        Throws:
        io.jans.orm.exception.MappingException
      • getValue

        public static Object getValue​(Object object,
                                      String property)
                               throws io.jans.orm.exception.MappingException
        Throws:
        io.jans.orm.exception.MappingException
      • invokeReflectionGetter

        public Object invokeReflectionGetter​(Object obj,
                                             String variableName)
      • invokeReflectionSetter

        public static void invokeReflectionSetter​(Object obj,
                                                  String propertyName,
                                                  Object variableValue)
      • containsField

        public static boolean containsField​(List<Field> allFields,
                                            String attribute)
      • isStringField

        public boolean isStringField​(Map<String,​String> objectPropertyMap,
                                     String attribute)
      • getAllFields

        public static List<Field> getAllFields​(Class<?> type)
      • invokeGetterMethod

        public static Object invokeGetterMethod​(Object obj,
                                                String variableName)
      • isKeyPresentInMap

        public static boolean isKeyPresentInMap​(String key,
                                                Map<String,​String> map)
      • isAttributeInExclusion

        public static boolean isAttributeInExclusion​(String className,
                                                     String attribute,
                                                     Map<String,​List<String>> exclusionMap)
      • getFieldType

        public static Map<String,​String> getFieldType​(Class<?> clazz,
                                                            List<io.jans.model.FieldFilterData> fieldFilterData)
      • formatStrDate

        public static Date formatStrDate​(String dateString,
                                         String datePattern)
      • createFilter

        public static List<io.jans.orm.search.filter.Filter> createFilter​(List<io.jans.model.FieldFilterData> fieldFilterData,
                                                                          String primaryKey,
                                                                          io.jans.orm.PersistenceEntryManager persistenceEntryManager)
      • encodeDate

        public static String encodeDate​(Date date,
                                        String primaryKey,
                                        io.jans.orm.PersistenceEntryManager persistenceEntryManager)
      • decodeStringDate

        public static Date decodeStringDate​(String dateString,
                                            String primaryKey,
                                            io.jans.orm.PersistenceEntryManager persistenceEntryManager)