org.sqlproc.engine.impl
Class SqlUtils
java.lang.Object
org.sqlproc.engine.impl.SqlUtils
public class SqlUtils
- extends Object
SQL Processor utilities.
- Author:
- Vladimir Hudec
Method Summary |
static boolean[] |
changedIdentities(Object[] resultValue,
Object[] previousResultValue)
|
static boolean |
changedIdentity(boolean[] changedIdentities,
Integer identityIndex)
|
static boolean |
changedIdentity(boolean[] changedIdentities,
List<Integer> identityIndexes)
|
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 Object |
getEnumToValue(Object obj)
|
static String |
getFeature(Map<String,Object> features,
String name)
|
static Time |
getTime(int hour,
int minute,
int second)
|
static Object |
getValueToEnum(Class<?> objClass,
Object val)
|
static boolean |
isEmpty(Object obj,
SqlType sqlType,
boolean inSqlSetOrInsert)
|
static boolean |
isEmpty(StringBuilder sb)
|
static Boolean |
isFeature(Map<String,Object> features,
String name,
Boolean defaultValue)
|
static boolean |
isTrue(Object obj,
SqlType sqlType)
|
static SqlUtils.LimitType |
limitQuery(String limitPattern,
SqlUtils.LimitType limitType,
String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
|
static SqlUtils.LimitType |
limitQuery(String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
|
static String |
sequence(String sequenceName)
|
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 |
SUPPVAL_NOTNULL
static final String SUPPVAL_NOTNULL
- See Also:
- Constant Field Values
SUPPVAL_ANY
static final String SUPPVAL_ANY
- See Also:
- Constant Field Values
SUPPVAL_NULL
static final String SUPPVAL_NULL
- See Also:
- Constant Field Values
SUPPVAL_SEQUENCE
static final String SUPPVAL_SEQUENCE
- See Also:
- Constant Field Values
SUPPVAL_IDENTITY_SELECT
static final String SUPPVAL_IDENTITY_SELECT
- See Also:
- Constant Field Values
SUPPVAL_ID
static final String SUPPVAL_ID
- See Also:
- Constant Field Values
SUPPVAL_GTYPE
static final String SUPPVAL_GTYPE
- See Also:
- Constant Field Values
SUPPVAL_TYPE
static final String SUPPVAL_TYPE
- See Also:
- Constant Field Values
SqlUtils
public SqlUtils()
getEnumToValue
public static Object getEnumToValue(Object obj)
getValueToEnum
public static Object getValueToEnum(Class<?> objClass,
Object val)
isEmpty
public static boolean isEmpty(Object obj,
SqlType sqlType,
boolean inSqlSetOrInsert)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
isTrue
public static boolean isTrue(Object obj,
SqlType sqlType)
toBytes
public static Byte[] toBytes(byte[] barr)
toBytes
public static byte[] toBytes(Byte[] barr)
getFeature
public static String getFeature(Map<String,Object> features,
String name)
isFeature
public static Boolean isFeature(Map<String,Object> features,
String name,
Boolean defaultValue)
isEmpty
public static boolean isEmpty(StringBuilder sb)
changedIdentities
public static boolean[] changedIdentities(Object[] resultValue,
Object[] previousResultValue)
changedIdentity
public static boolean changedIdentity(boolean[] changedIdentities,
Integer identityIndex)
changedIdentity
public static boolean changedIdentity(boolean[] changedIdentities,
List<Integer> identityIndexes)
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)
limitQuery
public static SqlUtils.LimitType limitQuery(String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
limitQuery
public static SqlUtils.LimitType limitQuery(String limitPattern,
SqlUtils.LimitType limitType,
String queryString,
StringBuilder queryResult,
Integer firstResult,
Integer maxResults)
sequence
public static String sequence(String sequenceName)
Copyright © 2011. All Rights Reserved.