Package com.imc.iss.groovy.lookupView
Class GroovyLookupView
java.lang.Object
com.imc.iss.groovy.lookupView.GroovyLookupView
-
Constructor Summary
ConstructorsConstructorDescriptionGroovyLookupView(LookupViewCollection lookupViewCollection, IMCDBEngine imcDBEngine) -
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 View.To retrieve the list of the lookup view name which the script has access to it.isSQL_AND_Condition(boolean flag) Flag to indicate using AND or OR SQL condition operator to join all SQL conditionssearch()
-
Constructor Details
-
GroovyLookupView
public GroovyLookupView(LookupViewCollection lookupViewCollection, IMCDBEngine imcDBEngine)
-
-
Method Details
-
addCondition
public GroovyLookupView 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 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.- 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 view 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 View.- Parameters:
fieldNames- as String arguments the lookup view fields to retrieve.- Throws:
IMCException- the platform exception.
-
getAccessibleViews
To retrieve the list of the lookup view name which the script has access to it.- Returns:
- lookup view name as List<String>
-
getFields
- Throws:
IMCException
-
isSQL_AND_Condition
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
-
view
- Throws:
IMCException
-