Class DataUtil

java.lang.Object
io.jans.configapi.core.util.DataUtil

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

    • DataUtil

      public DataUtil()
  • Method Details

    • 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
    • getSetter

      public static Method getSetter(String fieldName, Class<?> clazz) throws IntrospectionException
      Throws:
      IntrospectionException
    • invokeMethod

      public static Object invokeMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
      Throws:
      NoSuchMethodException
      InvocationTargetException
      IllegalAccessException
    • 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)
    • getAllFields

      public static List<Field> getAllFields(List<Field> fields, Class<?> type)
    • getFieldTypeMap

      public static Map<String,String> getFieldTypeMap(Class<?> clazz)
    • 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)
    • getFieldDataType

      public static Map<String,String> getFieldDataType(Class<?> clazz, List<String> fieldList)
    • 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)
    • getIso8601Date

      public static LocalDateTime getIso8601Date(String dateString, String pattern)