Contains a list of EntityValue objects. Entity List that adds some additional operations like filtering to the basic List<EntityValue>. The various methods here modify the internal list for efficiency and return a reference to this for convenience. If you want a new EntityList with the modifications, use clone() or cloneList() then modify it.
| Type | Name and description |
|---|---|
EntityList |
addAllIfMissing(EntityList el)Adds each value in the passed list to this list if the value isn't already in it. |
EntityList |
addIfMissing(EntityValue value)Adds the value to this list if the value isn't already in it. |
EntityList |
cloneList() |
EntityList |
filter(groovy.lang.Closure<java.lang.Boolean> closure, java.lang.Boolean include)Modify this EntityList so that it includes (or excludes) entity values where the closure evaluates to true. |
EntityList |
filterByAnd(java.util.Map<java.lang.String, java.lang.Object> fields)Modify this EntityList so that it contains only the values that match the values in the fields parameter. |
EntityList |
filterByAnd(java.util.Map<java.lang.String, java.lang.Object> fields, java.lang.Boolean include) |
EntityList |
filterByCondition(EntityCondition condition, java.lang.Boolean include)Modify this EntityList so that it includes (or excludes) values matching the condition. |
EntityList |
filterByDate(java.lang.String fromDateName, java.lang.String thruDateName, java.sql.Timestamp moment)Modify this EntityList so that it contains only the values that are active for the moment passed in. |
EntityList |
filterByDate(java.lang.String fromDateName, java.lang.String thruDateName, java.sql.Timestamp moment, boolean ignoreIfEmpty) |
EntityList |
filterByLimit(java.lang.Integer offset, java.lang.Integer limit)Modify this EntityList to only contain up to limit values starting at the offset. |
EntityList |
filterByLimit(java.lang.String inputFieldsMapName, boolean alwaysPaginate)For limit filter in a cached entity-find with search-form-inputs, done after the query |
EntityValue |
find(groovy.lang.Closure<java.lang.Boolean> closure)Find the first value in this EntityList where the closure evaluates to true. |
EntityList |
findAll(groovy.lang.Closure<java.lang.Boolean> closure)Different from filter* method semantics, does not modify this EntityList. |
EntityValue |
getFirst()Get the first value in the list. |
java.lang.Integer |
getLimit()The limit used to filter the list, if filterByLimit has been called. |
java.util.List<java.util.Map<java.lang.String, java.lang.Object>> |
getMasterValueList(java.lang.String name) |
java.lang.Integer |
getOffset()The offset used to filter the list, if filterByLimit has been called. |
int |
getPageIndex()For use with filterByLimit when paginated. |
int |
getPageSize()For use with filterByLimit when paginated. |
java.util.List<java.util.Map<java.lang.String, java.lang.Object>> |
getPlainValueList(int dependentLevels)Get a list of Map (not EntityValue) objects. |
int |
indexMatching(java.util.Map<java.lang.String, java.lang.Object> valueMap) |
boolean |
isFromCache() |
java.util.Iterator<EntityValue> |
iterator()Method to implement the Iterable interface to allow an EntityList to be used in a foreach loop. |
void |
move(int fromIndex, int toIndex) |
EntityList |
orderByFields(java.util.List<java.lang.String> fieldNames)Modify this EntityList so that is ordered by the field names passed in. |
EntityList |
removeByAnd(java.util.Map<java.lang.String, java.lang.Object> fields) |
void |
setFromCache() |
int |
writeXmlText(java.io.Writer writer, java.lang.String prefix, int dependentLevels)Writes XML text with an attribute or CDATA element for each field of each record. |
| Methods inherited from class | Name |
|---|---|
interface java.util.List |
java.util.List#add(java.lang.Object), java.util.List#add(int, java.lang.Object), java.util.List#remove(java.lang.Object), java.util.List#remove(int), java.util.List#get(int), java.util.List#equals(java.lang.Object), java.util.List#hashCode(), java.util.List#indexOf(java.lang.Object), java.util.List#clear(), java.util.List#isEmpty(), java.util.List#lastIndexOf(java.lang.Object), java.util.List#contains(java.lang.Object), java.util.List#replaceAll(java.util.function.UnaryOperator), java.util.List#size(), java.util.List#subList(int, int), java.util.List#toArray(), java.util.List#toArray([Ljava.lang.Object;), java.util.List#iterator(), java.util.List#spliterator(), java.util.List#addAll(java.util.Collection), java.util.List#addAll(int, java.util.Collection), java.util.List#set(int, java.lang.Object), java.util.List#containsAll(java.util.Collection), java.util.List#removeAll(java.util.Collection), java.util.List#retainAll(java.util.Collection), java.util.List#listIterator(int), java.util.List#listIterator(), java.util.List#sort(java.util.Comparator), java.util.List#stream(), java.util.List#removeIf(java.util.function.Predicate), java.util.List#parallelStream(), java.util.List#forEach(java.util.function.Consumer) |
interface java.lang.Iterable |
java.lang.Iterable#iterator(), java.lang.Iterable#spliterator(), java.lang.Iterable#forEach(java.util.function.Consumer) |
interface java.io.Externalizable |
java.io.Externalizable#readExternal(java.io.ObjectInput), java.io.Externalizable#writeExternal(java.io.ObjectOutput) |
Adds each value in the passed list to this list if the value isn't already in it. Returns reference to this list.
Adds the value to this list if the value isn't already in it. Returns reference to this list.
Modify this EntityList so that it includes (or excludes) entity values where the closure evaluates to true. The closure is called with a single argument, the current EntityValue in the list, and should evaluate to a Boolean.
Modify this EntityList so that it contains only the values that match the values in the fields parameter.
fields - The name/value pairs that must match for a value to be included in the output list.Modify this EntityList so that it includes (or excludes) values matching the condition.
condition - EntityCondition to filter by.include - If true include matching values, if false exclude matching values.
Defaults to true (include, ie only include values that do meet condition).Modify this EntityList so that it contains only the values that are active for the moment passed in. The results include values that match the fromDate, but exclude values that match the thruDate.
fromDateName - The name of the from/beginning date/time field. Defaults to "fromDate".thruDateName - The name of the thru/ending date/time field. Defaults to "thruDate".moment - The point in time to compare the values to; if null the current system date/time is used.Modify this EntityList to only contain up to limit values starting at the offset.
offset - Starting index to includelimit - Include only this many valuesFor limit filter in a cached entity-find with search-form-inputs, done after the query
Find the first value in this EntityList where the closure evaluates to true.
Different from filter* method semantics, does not modify this EntityList. Returns a new EntityList with just the values where the closure evaluates to true.
Get the first value in the list.
The limit used to filter the list, if filterByLimit has been called.
The offset used to filter the list, if filterByLimit has been called.
For use with filterByLimit when paginated. Equals offset (default 0) divided by page size.
For use with filterByLimit when paginated. Equals limit (default 20; for use along with getPageIndex()).
Get a list of Map (not EntityValue) objects. If dependentLevels is greater than zero includes nested dependents in the Map for each value.
Method to implement the Iterable interface to allow an EntityList to be used in a foreach loop.
Modify this EntityList so that is ordered by the field names passed in.
fieldNames - The field names for the entity values to sort the list by. Optionally prefix each field name
with a plus sign (+) for ascending or a minus sign (-) for descending. Defaults to ascending.Writes XML text with an attribute or CDATA element for each field of each record. If dependents is true also writes all dependent (descendant) records.
writer - A Writer object to write toprefix - A prefix to put in front of the entity name in the tag namedependentLevels - Write dependent (descendant) records this many levels deep, zero for no dependents