Class FindServices

java.lang.Object
org.apache.ofbiz.common.FindServices

public class FindServices extends Object
FindServices Class
  • Field Details

  • Constructor Details

    • FindServices

      public FindServices()
  • Method Details

    • prepareField

      public static Map<String,Map<String,Map<String,Object>>> prepareField(Map<String,?> inputFields, Map<String,Object> queryStringMap, Map<String,List<Object[]>> origValueMap)
      prepareField, analyse inputFields to created normalizedFields a map with field name and operator. This is use to the generic method that expects entity data affixed with special suffixes to indicate their purpose in formulating an SQL query statement.
      Parameters:
      inputFields - Input parameters run thru UtilHttp.getParameterMap
      Returns:
      a map with field name and operator
    • createConditionList

      public static List<EntityCondition> createConditionList(Map<String,? extends Object> parameters, List<ModelField> fieldList, Map<String,Object> queryStringMap, Delegator delegator, Map<String,?> context)
      Parses input parameters and returns an EntityCondition list.
      Parameters:
      parameters -
      fieldList -
      queryStringMap -
      delegator -
      context -
      Returns:
      returns an EntityCondition list
    • createSingleCondition

      public static EntityCondition createSingleCondition(ModelField modelField, String operation, Object fieldValue, boolean ignoreCase, Delegator delegator, Map<String,?> context)
      Creates a single EntityCondition based on a set of parameters.
      Parameters:
      modelField -
      operation -
      fieldValue -
      ignoreCase -
      delegator -
      context -
      Returns:
      return an EntityCondition
    • createCondition

      public static List<EntityCondition> createCondition(ModelEntity modelEntity, Map<String,Map<String,Map<String,Object>>> normalizedFields, Map<String,Object> queryStringMap, Map<String,List<Object[]>> origValueMap, Delegator delegator, Map<String,?> context)
      createCondition, comparing the normalizedFields with the list of keys, . This is use to the generic method that expects entity data affixed with special suffixes to indicate their purpose in formulating an SQL query statement.
      Parameters:
      modelEntity - the model entity object
      normalizedFields - list of field the user have populated
      Returns:
      a arrayList usable to create an entityCondition
    • performFindList

      public static Map<String,Object> performFindList(DispatchContext dctx, Map<String,Object> context)
      same as performFind but now returning a list instead of an iterator Extra parameters viewIndex: startPage of the partial list (0 = first page) viewSize: the length of the page (number of records) Extra output parameter: listSize: size of the totallist list : the list itself.
      Parameters:
      dctx -
      context -
      Returns:
      Map
    • performFind

      public static Map<String,Object> performFind(DispatchContext dctx, Map<String,?> context)
      performFind This is a generic method that expects entity data affixed with special suffixes to indicate their purpose in formulating an SQL query statement.
    • prepareFind

      public static Map<String,Object> prepareFind(DispatchContext dctx, Map<String,?> context)
      prepareFind This is a generic method that expects entity data affixed with special suffixes to indicate their purpose in formulating an SQL query statement.
    • executeFind

      public static Map<String,Object> executeFind(DispatchContext dctx, Map<String,?> context)
      executeFind This is a generic method that returns an EntityListIterator.
    • buildReducedQueryString

      public static Map<String,Object> buildReducedQueryString(Map<String,?> inputFields, String entityName, Delegator delegator)
    • performFindItem

      public static Map<String,Object> performFindItem(DispatchContext dctx, Map<String,Object> context)
      Returns the first generic item of the service 'performFind' Same parameters as performFind service but returns a single GenericValue
      Parameters:
      dctx -
      context -
      Returns:
      returns the first item