public class GroovyLookupView extends Object
Constructor and Description |
---|
GroovyLookupView(LookupViewService lookupViewService,
List<LookupView> accessibleViews) |
Modifier and Type | Method and Description |
---|---|
GroovyLookupView |
addCondition(String fieldName,
String operator,
Object value)
To add the condition for a SQL query
|
GroovyLookupView |
addOrderBy(String fieldName,
String order)
To add SQL sorting criteria.
|
GroovyLookupView |
addSelectFields(String... fieldNames)
To define the selecting specific columns in a lookup View.
|
List<String> |
getAccessibleViews()
To retrieve the list of the lookup view name which the script has access
to it.
|
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() |
GroovyLookupView |
setFieldValue(String fieldName,
Object value) |
GroovyLookupView |
view(String viewName) |
public GroovyLookupView(LookupViewService lookupViewService, List<LookupView> accessibleViews)
public GroovyLookupView addCondition(String fieldName, String operator, Object value) throws IMCException
fieldName
- as String the name of the lookup view 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 GroovyLookupView addOrderBy(String fieldName, String order) throws IMCException
fieldName
- as String the name of the lookup view field.order
- as String the order of the sorting (ASC or DESC).IMCException
- the platform exception.public GroovyLookupView addSelectFields(String... fieldNames) throws IMCException
fieldNames
- as String arguments the lookup view fields to retrieve.IMCException
- the platform exception.public List<String> getAccessibleViews()
public void isSQL_AND_Condition(boolean flag)
flag
- as boolean. Boolean true = AND, false = ORpublic List<Map<String,Object>> search() throws IMCException
IMCException
public Map<String,Object> searchOne() throws IMCException
IMCException
public GroovyLookupView setFieldValue(String fieldName, Object value) throws IMCException
IMCException
public GroovyLookupView view(String viewName) throws IMCException
IMCException