Class SqlUtils

    • Constructor Detail

      • SqlUtils

        public SqlUtils()
    • Method Detail

      • convertBigDecimal

        public static Object convertBigDecimal​(Class<?> attributeType,
                                               Object resultValue)
      • convertBigInteger

        public static Object convertBigInteger​(Class<?> attributeType,
                                               Object resultValue)
      • toBytes

        public static Byte[] toBytes​(byte[] barr)
      • toBytes

        public static byte[] toBytes​(Byte[] barr)
      • beforeChar

        public static String beforeChar​(String s,
                                        char c)
      • afterChar

        public static String afterChar​(String s,
                                       char c)
      • getDate

        public static Date getDate​(int year,
                                   int month,
                                   int day)
      • getTime

        public static Time getTime​(int hour,
                                   int minute,
                                   int second)
      • getDateTime

        public static Date getDateTime​(int year,
                                       int month,
                                       int day,
                                       int hour,
                                       int minute,
                                       int second)
      • getIdsKey

        public static String getIdsKey​(Object[] resultValues,
                                       Integer mainIdentityIndex)
      • main

        public static void main​(String[] args)
      • asList

        public static List<Integer> asList​(int[] array)
      • firstLowerCase

        public static String firstLowerCase​(String s)
      • oppositeFeatures

        public static Set<String> oppositeFeatures​(String featureName)
      • isPrimitiveWrapper

        public static boolean isPrimitiveWrapper​(Class clazz)
      • isCollection

        public static boolean isCollection​(Class<?> clazz)
        Returns the indicator the investigated class is in fact a container.
        Parameters:
        clazz - the investigated class
        Returns:
        the indicator the investigated class is in fact a container
      • getAllAttributeTypes

        public static Class<?>[] getAllAttributeTypes​(Class<?> attributeType,
                                                      Class<?>[] attributeParameterizedTypes,
                                                      Class<?> attributeParameterizedType)
      • getStandardModeResultClass

        public static Class<?> getStandardModeResultClass​(String typeName)
        A temporary gtype to class name conversion.
        Parameters:
        typeName - it's a gtype
        Returns:
        a related class name