public class GroovyLookupTable extends Object
| Modifier and Type | Method and Description |
|---|---|
GroovyLookupTable |
addCondition(String fieldName,
String operator,
Object value)
To add the condition for a SQL query
|
GroovyLookupTable |
addOrderBy(String fieldName,
String order)
To add SQL sorting criteria.
|
GroovyLookupTable |
addSelectFields(String... fieldNames)
To define the selecting specific columns in a lookup table.
|
void |
delete(Long id) |
List<String> |
getAccessibleTables()
To retrieve the list of the lookup table name which the script has access
to it.
|
void |
insert() |
void |
isSQL_AND_Condition(boolean flag)
Flag to indicate using AND or OR SQL condition operator to join all SQL
conditions
|
List<Map<String,Object>> |
search() |
Map<String,Object> |
searchOne() |
GroovyLookupTable |
setFieldValue(String fieldName,
Object value) |
GroovyLookupTable |
table(String tableName) |
void |
update(Long id) |
public GroovyLookupTable addCondition(String fieldName, String operator, Object value) throws IMCException
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.IMCException - the platform exception.public GroovyLookupTable addOrderBy(String fieldName, String order) throws IMCException
fieldName - as String the name of the lookup table field.order - as String the order of the sorting (ASC or DESC).IMCException - the platform exception.public GroovyLookupTable addSelectFields(String... fieldNames) throws IMCException
fieldNames - as String arguments the lookup table fields to
retrieve.IMCException - the platform exception.public void delete(Long id) throws IMCException
IMCExceptionpublic List<String> getAccessibleTables()
public void insert()
throws IMCException
IMCExceptionpublic void isSQL_AND_Condition(boolean flag)
flag - as boolean. Boolean true = AND, false = ORpublic List<Map<String,Object>> search() throws IMCException
IMCExceptionpublic Map<String,Object> searchOne() throws IMCException
IMCExceptionpublic GroovyLookupTable setFieldValue(String fieldName, Object value) throws IMCException
IMCExceptionpublic GroovyLookupTable table(String tableName) throws IMCException
IMCExceptionpublic void update(Long id) throws IMCException
IMCException