org.ofbiz.common
Class FindServices

java.lang.Object
  extended by org.ofbiz.common.FindServices

public class FindServices
extends java.lang.Object

FindServices Class


Field Summary
static java.util.HashMap<java.lang.String,EntityOperator> entityOperators
           
static java.lang.String module
           
 
Constructor Summary
FindServices()
           
 
Method Summary
static java.util.HashMap<java.lang.String,java.lang.Object> buildReducedQueryString(java.util.Map<java.lang.String,?> inputFields, java.lang.String entityName, GenericDelegator delegator)
           
static java.util.ArrayList<EntityCondition> createCondition(ModelEntity modelEntity, java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Object>>> normalizedFields, java.util.Map<java.lang.String,java.lang.Object> queryStringMap, java.util.Map<java.lang.String,java.util.List<java.lang.Object[]>> origValueMap, GenericDelegator delegator, java.util.Map<java.lang.String,?> context, java.util.List<java.lang.String> dateTimeFields, java.util.TimeZone timeZone, java.util.Locale locale)
          createCondition, comparing the normalizedFields with the list of keys, .
static java.util.Map<java.lang.String,java.lang.Object> executeFind(DispatchContext dctx, java.util.Map<java.lang.String,?> context)
          executeFind This is a generic method that returns an EntityListIterator.
static java.util.Map<java.lang.String,java.lang.Object> performFind(DispatchContext dctx, java.util.Map<java.lang.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.
static java.util.Map<java.lang.String,java.lang.Object> performFindItem(DispatchContext dctx, java.util.Map<java.lang.String,?> context)
          Returns the first generic item of the service 'performFind' Same parameters as performFind service but returns a single GenericValue
static java.util.Map<java.lang.String,java.lang.Object> performFindList(DispatchContext dctx, java.util.Map<java.lang.String,?> 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.
static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Object>>> prepareField(java.util.Map<java.lang.String,?> inputFields, java.util.Map<java.lang.String,java.lang.Object> queryStringMap, java.util.Map<java.lang.String,java.util.List<java.lang.Object[]>> origValueMap)
          prepareField, analyse inputFields to created normalizedFields a map with field name and operator.
static java.util.Map prepareFind(DispatchContext dctx, java.util.Map<java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module

entityOperators

public static java.util.HashMap<java.lang.String,EntityOperator> entityOperators
Constructor Detail

FindServices

public FindServices()
Method Detail

prepareField

public static java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Object>>> prepareField(java.util.Map<java.lang.String,?> inputFields,
                                                                                                                                                        java.util.Map<java.lang.String,java.lang.Object> queryStringMap,
                                                                                                                                                        java.util.Map<java.lang.String,java.util.List<java.lang.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

createCondition

public static java.util.ArrayList<EntityCondition> createCondition(ModelEntity modelEntity,
                                                                   java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Object>>> normalizedFields,
                                                                   java.util.Map<java.lang.String,java.lang.Object> queryStringMap,
                                                                   java.util.Map<java.lang.String,java.util.List<java.lang.Object[]>> origValueMap,
                                                                   GenericDelegator delegator,
                                                                   java.util.Map<java.lang.String,?> context,
                                                                   java.util.List<java.lang.String> dateTimeFields,
                                                                   java.util.TimeZone timeZone,
                                                                   java.util.Locale locale)
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:
keys - list of field for which it's possible to make the query
normalizedFields - list of field the user have populated
Returns:
a arrayList usable to create an entityCondition

performFindList

public static java.util.Map<java.lang.String,java.lang.Object> performFindList(DispatchContext dctx,
                                                                               java.util.Map<java.lang.String,?> 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 java.util.Map<java.lang.String,java.lang.Object> performFind(DispatchContext dctx,
                                                                           java.util.Map<java.lang.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 java.util.Map prepareFind(DispatchContext dctx,
                                        java.util.Map<java.lang.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 java.util.Map<java.lang.String,java.lang.Object> executeFind(DispatchContext dctx,
                                                                           java.util.Map<java.lang.String,?> context)
executeFind This is a generic method that returns an EntityListIterator.


buildReducedQueryString

public static java.util.HashMap<java.lang.String,java.lang.Object> buildReducedQueryString(java.util.Map<java.lang.String,?> inputFields,
                                                                                           java.lang.String entityName,
                                                                                           GenericDelegator delegator)

performFindItem

public static java.util.Map<java.lang.String,java.lang.Object> performFindItem(DispatchContext dctx,
                                                                               java.util.Map<java.lang.String,?> context)
Returns the first generic item of the service 'performFind' Same parameters as performFind service but returns a single GenericValue

Parameters:
dctx -
context -
Returns: