org.sqlproc.engine.impl
Class SqlUtils

java.lang.Object
  extended by org.sqlproc.engine.impl.SqlUtils

public class SqlUtils
extends Object

SQL Processor utilities.

Author:
Vladimir Hudec

Constructor Summary
SqlUtils()
           
 
Method Summary
static String afterChar(String s, char c)
           
static List<Integer> asList(int[] array)
           
static String beforeChar(String s, char c)
           
static Object convertBigDecimal(Class<?> attributeType, Object resultValue)
           
static Object convertBigInteger(Class<?> attributeType, Object resultValue)
           
static String firstLowerCase(String s)
           
static Date getDate(int year, int month, int day)
           
static Date getDateTime(int year, int month, int day, int hour, int minute, int second)
           
static Map<String,Object> getDefaultFeatures(String filterPrefix)
           
static Class getEnumToClass(Class clazz)
           
static Object getEnumToValue(Object obj)
           
static String getIdsKey(Object[] resultValues, Integer mainIdentityIndex)
           
static String getIdsKey(Object[] resultValues, Map<String,SqlMappingIdentity> identities, String fullName)
           
static Time getTime(int hour, int minute, int second)
           
static Object getValueToEnum(Class<?> objClass, Object val)
           
static boolean isEmpty(StringBuilder sb)
           
static String oppositeFeature(String featureName)
           
static Byte[] toBytes(byte[] barr)
           
static byte[] toBytes(Byte[] barr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlUtils

public SqlUtils()
Method Detail

getEnumToValue

public static Object getEnumToValue(Object obj)

getEnumToClass

public static Class getEnumToClass(Class clazz)

getValueToEnum

public static Object getValueToEnum(Class<?> objClass,
                                    Object val)

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)

isEmpty

public static boolean isEmpty(StringBuilder sb)

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)

getDefaultFeatures

public static Map<String,Object> getDefaultFeatures(String filterPrefix)

getIdsKey

public static String getIdsKey(Object[] resultValues,
                               Map<String,SqlMappingIdentity> identities,
                               String fullName)

getIdsKey

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

asList

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

firstLowerCase

public static String firstLowerCase(String s)

oppositeFeature

public static String oppositeFeature(String featureName)


Copyright © 2013. All Rights Reserved.