| java.lang.Object org.ofbiz.entity.util.EntityUtil
EntityUtil | public class EntityUtil (Code) | | Helper methods when dealing with Entities, especially ones that follow certain conventions
author: Eric Pabst version: $ Revision: $ since: 1.0 |
Inner Class :static class OrderByComparator implements Comparator | |
Method Summary | |
public static void | delDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search) | public static void | delDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search, Timestamp now) | public static List | filterByAnd(List values, Map fields) | public static List | filterByAnd(List values, List exprs) | public static List | filterByCondition(List values, EntityCondition condition) | public static List | filterByDate(List datedValues) returns the values that are currently active. | public static List | filterByDate(List datedValues, boolean allAreSame) returns the values that are currently active. | public static List | filterByDate(List datedValues, java.util.Date moment) returns the values that are active at the moment. | public static List | filterByDate(List datedValues, java.sql.Timestamp moment) returns the values that are active at the moment. | public static List | filterByDate(List datedValues, java.sql.Timestamp moment, String fromDateName, String thruDateName, boolean allAreSame) returns the values that are active at the moment. | public static List | filterByOr(List values, List exprs) | public static List | filterOutByCondition(List values, EntityCondition condition) | public static List | findDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search) | public static List | findDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search, Timestamp now) | public static EntityCondition | getFilterByDateExpr() | public static EntityCondition | getFilterByDateExpr(String fromDateName, String thruDateName) | public static EntityCondition | getFilterByDateExpr(java.util.Date moment) | public static EntityCondition | getFilterByDateExpr(java.sql.Timestamp moment) | public static EntityCondition | getFilterByDateExpr(java.sql.Timestamp moment, String fromDateName, String thruDateName) | public static GenericValue | getFirst(List values) | public static GenericValue | getOnly(List values) | public static List | getRelated(String relationName, List values) | public static List | getRelatedByAnd(String relationName, Map fields, List values) | public static List | getRelatedCache(String relationName, List values) | public static boolean | isValueActive(GenericValue datedValue, java.sql.Timestamp moment) | public static boolean | isValueActive(GenericValue datedValue, java.sql.Timestamp moment, String fromDateName, String thruDateName) | public static GenericValue | newDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search) | public static GenericValue | newDatedInclusionEntity(GenericDelegator delegator, String entityName, Map search, Timestamp now) | public static List | orderBy(Collection values, List orderBy) |
filterByAnd | public static List filterByAnd(List values, Map fields)(Code) | | returns the values that match the values in fields
Parameters: values - List of GenericValues Parameters: fields - the field-name/value pairs that must match List of GenericValue's that match the values in fields |
filterByAnd | public static List filterByAnd(List values, List exprs)(Code) | | returns the values that match all of the exprs in list
Parameters: values - List of GenericValues Parameters: exprs - the expressions that must validate to true List of GenericValue's that match the values in fields |
filterByDate | public static List filterByDate(List datedValues)(Code) | | returns the values that are currently active.
Parameters: datedValues - GenericValue's that have "fromDate" and "thruDate" fields List of GenericValue's that are currently active |
filterByDate | public static List filterByDate(List datedValues, boolean allAreSame)(Code) | | returns the values that are currently active.
Parameters: datedValues - GenericValue's that have "fromDate" and "thruDate" fields Parameters: allAreSame - Specifies whether all values in the List are of the same entity; this can help speed things up a fair amount since we only have to see if the from and thru date fields are valid once List of GenericValue's that are currently active |
filterByDate | public static List filterByDate(List datedValues, java.util.Date moment)(Code) | | returns the values that are active at the moment.
Parameters: datedValues - GenericValue's that have "fromDate" and "thruDate" fields Parameters: moment - the moment in question List of GenericValue's that are active at the moment |
filterByDate | public static List filterByDate(List datedValues, java.sql.Timestamp moment)(Code) | | returns the values that are active at the moment.
Parameters: datedValues - GenericValue's that have "fromDate" and "thruDate" fields Parameters: moment - the moment in question List of GenericValue's that are active at the moment |
filterByDate | public static List filterByDate(List datedValues, java.sql.Timestamp moment, String fromDateName, String thruDateName, boolean allAreSame)(Code) | | returns the values that are active at the moment.
Parameters: datedValues - GenericValue's that have "fromDate" and "thruDate" fields Parameters: moment - the moment in question Parameters: allAreSame - Specifies whether all values in the List are of the same entity; this can help speed things up a fair amount since we only have to see if the from and thru date fields are valid once List of GenericValue's that are active at the moment |
filterByOr | public static List filterByOr(List values, List exprs)(Code) | | returns the values that match any of the exprs in list
Parameters: values - List of GenericValues Parameters: exprs - the expressions that must validate to true List of GenericValue's that match the values in fields |
orderBy | public static List orderBy(Collection values, List orderBy)(Code) | | returns the values in the order specified
Parameters: values - List of GenericValues Parameters: orderBy - The fields of the named entity to order the query by;optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue's in the proper order |
|
|