Class GroovyLookupView

java.lang.Object
com.imc.iss.groovy.lookupView.GroovyLookupView

public class GroovyLookupView extends Object
  • 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

      public GroovyLookupView addOrderBy(String fieldName, String order) throws IMCException
      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

      public GroovyLookupView addSelectFields(String... fieldNames) throws IMCException
      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

      public List<String> 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

      public List<String> getFields(String viewName) throws IMCException
      Throws:
      IMCException
    • isSQL_AND_Condition

      public GroovyLookupView 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

      public List<Map<String,Object>> search() throws IMCException
      Throws:
      IMCException
    • searchOne

      public Map<String,Object> searchOne() throws IMCException
      Throws:
      IMCException
    • view

      public GroovyLookupView view(String viewName) throws IMCException
      Throws:
      IMCException