@java.lang.SuppressWarnings("unused") public interface EntityList extends java.util.List, java.lang.Iterable, java.lang.Cloneable, java.util.RandomAccess, java.io.Externalizable
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 Params | Return Type | Name and description |
---|---|---|
|
public EntityList |
addAllIfMissing(EntityList el) Adds each value in the passed list to this list if the value isn't already in it. |
|
public EntityList |
addIfMissing(EntityValue value) Adds the value to this list if the value isn't already in it. |
|
public EntityList |
cloneList() |
|
public 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. |
|
public 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. |
|
public EntityList |
filterByAnd(java.util.Map<java.lang.String, java.lang.Object> fields, java.lang.Boolean include) |
|
public EntityList |
filterByAnd(java.lang.Object namesAndValues) Modify this EntityList so that it contains only the values that match the values in the namesAndValues parameter. |
|
public EntityList |
filterByCondition(EntityCondition condition, java.lang.Boolean include) Modify this EntityList so that it includes (or excludes) values matching the condition. |
|
public 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. |
|
public EntityList |
filterByDate(java.lang.String fromDateName, java.lang.String thruDateName, java.sql.Timestamp moment, boolean ignoreIfEmpty) |
|
public EntityList |
filterByLimit(java.lang.Integer offset, java.lang.Integer limit) Modify this EntityList to only contain up to limit values starting at the offset. |
|
public EntityList |
filterByLimit(java.lang.String inputFieldsMapName, boolean alwaysPaginate) For limit filter in a cached entity-find with search-form-inputs, done after the query |
|
public EntityValue |
find(groovy.lang.Closure<java.lang.Boolean> closure) Find the first value in this EntityList where the closure evaluates to true. |
|
public EntityList |
findAll(groovy.lang.Closure<java.lang.Boolean> closure) Different from filter* method semantics, does not modify this EntityList. |
|
public EntityValue |
findByAnd(java.util.Map<java.lang.String, java.lang.Object> fields) |
|
public EntityValue |
findByAnd(java.lang.Object namesAndValues) |
|
public EntityValue |
getFirst() Get the first value in the list. |
|
public java.lang.Integer |
getLimit() The limit used to filter the list, if filterByLimit has been called. |
|
public java.util.List<java.util.Map<java.lang.String, java.lang.Object>> |
getMasterValueList(java.lang.String name) |
|
public java.lang.Integer |
getOffset() The offset used to filter the list, if filterByLimit has been called. |
|
public int |
getPageIndex() For use with filterByLimit when paginated. |
|
public int |
getPageSize() For use with filterByLimit when paginated. |
|
public java.util.List<java.util.Map<java.lang.String, java.lang.Object>> |
getPlainValueList(int dependentLevels) Get a list of Map (not EntityValue) objects. |
|
public java.util.ArrayList<java.util.Map<java.lang.String, java.lang.Object>> |
getValueMapList() |
|
public int |
indexMatching(java.util.Map<java.lang.String, java.lang.Object> valueMap) |
|
public boolean |
isFromCache() |
|
public java.util.Iterator<EntityValue> |
iterator() Method to implement the Iterable interface to allow an EntityList to be used in a foreach loop. |
|
public void |
move(int fromIndex, int toIndex) |
|
public EntityList |
orderByFields(java.util.List<java.lang.String> fieldNames) Modify this EntityList so that is ordered by the field names passed in. |
|
public EntityList |
removeByAnd(java.util.Map<java.lang.String, java.lang.Object> fields) |
|
public void |
setFromCache() |
|
public 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(int, java.lang.Object), java.util.List#add(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#copyOf(java.util.Collection), 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(int, java.util.Collection), java.util.List#addAll(java.util.Collection), java.util.List#set(int, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of([Ljava.lang.Object;), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object), java.util.List#of(), java.util.List#containsAll(java.util.Collection), java.util.List#retainAll(java.util.Collection), java.util.List#removeAll(java.util.Collection), java.util.List#sort(java.util.Comparator), java.util.List#listIterator(), java.util.List#listIterator(int), java.util.List#toArray(java.util.function.IntFunction), 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#writeExternal(java.io.ObjectOutput), java.io.Externalizable#readExternal(java.io.ObjectInput) |
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 contains only the values that match the values in the namesAndValues parameter.
namesAndValues
- Must be an even number of parameters as field name then value repeated as neededModify 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