Package org.eclnt.ccee.db.dofw.util
Class DOFWUtils
java.lang.Object
org.eclnt.ccee.db.dofw.util.DOFWUtils
- All Implemented Interfaces:
ICCEEConstants
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
Fields inherited from interface org.eclnt.ccee.ICCEEConstants
AND, ASC, AVG, BETWEEN, BRC, BRO, COUNT, DEFAULT_CONTEXT, DESC, FUNCTIONRESULT, GREATER, GREATEREQUAL, IN, IS, ISNOT, LIKE, LL_DBG, LL_ERR, LL_INF, LL_WAR, LOWER, LOWEREQUAL, MAX, MIN, NULL, OR, ORDERBY, QPFUNCTION_LOWER, QPFUNCTION_UPPER, SUM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckIfKeyOfObjectsIsSame(Object bean1, Object bean2) static booleancheckIfPropertyHasCenturyColumn(DOFWProperty property) static List<DOFWProperty>findPropertiesInColumns(Class clazz, String[] colSelections) static Object[]mergeOrderBys(Object[] sort1, Object[] sort2) Two sequences of order by objects are merged.static StringConverts the text of aICCEEConstants-constant into a correpsonding constant representation.static StringQuery update column. - This function is used when building the actual SQL statement: column names by default are written without modification into the SQL statement - some DB servers require some surrounding quotes.static StringQuery update table. - Transfers the table name while writing the SQL statement.static StringreplacePropertyNames(String contextName, Class clazz, String s) static DOFWUtils.ReplaceResultreplaceVariables(String contextName, Class clazz, String s) static StringresolveKeyPathForBean(Object bean) static StringresolveKeyPathForBean(Object bean, String delimiter) static DOFWUtils.SplitUpColValssplitUpQueryColVals(Object... colVals) Split the object array into the conditions array and the order-by array.static Object[]transferKeyPathIntoQuery(String keyPath, Class beanClass) static Object[]transferQueryStringIntoDOFWQueryObjects(String className, String query) static Object[]transferQueryStringIntoDOFWQueryObjects(String className, String[] query) Same astransferQueryStringIntoDOFWQueryObjects(String, String)but now query is passed as array of string tokens.static Object[]static Object[]
-
Constructor Details
-
DOFWUtils
public DOFWUtils()
-
-
Method Details
-
splitUpQueryColVals
Split the object array into the conditions array and the order-by array. The split is done by searching the StringICCEEConstants.ORDERBYas delimiter. -
quc
Query update column. - This function is used when building the actual SQL statement: column names by default are written without modification into the SQL statement - some DB servers require some surrounding quotes. Example: if using case-sensitive column names with Oracle, then column names have to be surrounded by \". -
qut
Query update table. - Transfers the table name while writing the SQL statement. The table name might be embedded into some \"-characters (dependent on DB server). And schema information might be prepended. -
replaceVariables
-
findPropertiesInColumns
-
replacePropertyNames
-
parseICCEEConstant
Converts the text of aICCEEConstants-constant into a correpsonding constant representation. Background: all operations with ICCEEConstants are done by directling accessing the pointer - e.g. all checks for equality are done using "==" and not using ".equals(..)". -
checkIfPropertyHasCenturyColumn
-
transferSortStringIntoDOFWQueryObjects
-
transferSortStringIntoDOFWQueryObjects
-
transferQueryStringIntoDOFWQueryObjects
- Parameters:
query- Example: "att1 IS 4711 and att2 IS Harry and att3 IS 'Harry Hirsch'
-
transferQueryStringIntoDOFWQueryObjects
Same astransferQueryStringIntoDOFWQueryObjects(String, String)but now query is passed as array of string tokens. -
transferKeyPathIntoQuery
-
checkIfKeyOfObjectsIsSame
-
resolveKeyPathForBean
-
resolveKeyPathForBean
-
mergeOrderBys
Two sequences of order by objects are merged. The first sequence is the dominating one, the objects of sort2 are added - if not already present in the first sequence.- Parameters:
sort1- First sequencesort2- Second sequence
-