Package com.imc.iss.groovy.lookupTable
Class GroovyLookupTable
java.lang.Object
com.imc.iss.groovy.lookupTable.GroovyLookupTable
This class provide the API for groovy script to form the sql query and access
lookup table
-
Method Summary
Modifier and TypeMethodDescriptionaddCondition(String fieldName, String operator, Object value) To add the condition for a SQL queryaddOrderBy(String fieldName, String order) To add SQL sorting criteria.addSelectFields(String... fieldNames) To define the selecting specific columns in a lookup table.voidTo retrieve the list of the lookup table name which the script has access to it.voidinsert()voidisSQL_AND_Condition(boolean flag) Flag to indicate using AND or OR SQL condition operator to join all SQL conditionssearch()setFieldValue(String fieldName, Object value) void
-
Method Details
-
addCondition
public GroovyLookupTable addCondition(String fieldName, String operator, Object value) throws IMCException To add the condition for a SQL query- Parameters:
fieldName- as String the name of the lookup table field.operator- as String the operator for condition."==" represents EQUAL
"!=" represents NOT EQUAL
">" represents GREATER THAN
">=" represents GREATER THAN EQUAL
"<" represents LESS_THAN
"<=" represents LESS THAN EQUALL.
value- as Object the value of the condition.- Throws:
IMCException- the platform exception.
-
addOrderBy
To add SQL sorting criteria. This function may be called multiple times. The result will be ordered by the field that were added first, then by the second field, and so on- Parameters:
fieldName- as String the name of the lookup table field.order- as String the order of the sorting (ASC or DESC).- Throws:
IMCException- the platform exception.
-
addSelectFields
To define the selecting specific columns in a lookup table.- Parameters:
fieldNames- as String arguments the lookup table fields to retrieve.- Throws:
IMCException- the platform exception.
-
delete
- Throws:
IMCException
-
getAccessibleTables
To retrieve the list of the lookup table name which the script has access to it.- Returns:
- lookup table name as List<String>
-
insert
- Throws:
IMCException
-
isSQL_AND_Condition
public void isSQL_AND_Condition(boolean flag) Flag to indicate using AND or OR SQL condition operator to join all SQL conditions- Parameters:
flag- as boolean. Boolean true = AND, false = OR
-
search
- Throws:
IMCException
-
searchOne
- Throws:
IMCException
-
setFieldValue
- Throws:
IMCException
-
table
- Throws:
IMCException
-
update
- Throws:
IMCException
-