Entities<E extends Entity<E>> class

Implemented types
Implementers
Available Extensions

Constructors

Entities()

Properties

concept Concept
getter/setter pairoverride-getter
count int
no setter
exceptions ValidationExceptions
getter/setter pairoverride-getter
first → E
The first element.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
internalList List<E>
no getter
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setteroverride
iterator Iterator<E>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last → E
The last element.
no setteroverride
length int
The number of elements in this.
no setteroverride
maxc String
getter/setter pair
minc String
getter/setter pair
post bool
getter/setter pair
pre bool
getter/setter pair
propagateToSource bool
getter/setter pair
randomGen Random
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single → E
Checks that this iterable has only one element, and returns that element.
no setteroverride
source Entities<E>?
getter/setter pairoverride-getter

Methods

add(E entity) bool
override
addFrom(Entities<E> entities) bool
any(bool f(E entity)) bool
Checks whether any element of this iterable satisfies test.
override
at(int index) → E
cast<T>() Iterable<T>
A view of this iterable as an iterable of R instances.
override
clear() → void
override
contains(Object? entity) bool
Whether the collection contains an element equal to element.
override
copy() Entities<E>
Copies the entities. It is not a deep copy.
override
display({String title = 'Entities', String prefix = '', bool withOid = true, bool withChildren = true, bool withInternalChildren = true}) → void
Displays (prints) a title, then entities.
displayCodeMap() → void
displayIdMap() → void
displayOidMap() → void
elementAt(int index) → E
Returns the indexth element.
override
every(bool f(E entity)) bool
Checks whether every element of this iterable satisfies test.
override
expand<T>(Iterable<T> toElements(E element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
override
firstWhere(bool f(E entity), {E orElse()?}) → E
The first element that satisfies the given predicate test.
override
firstWhereAttribute(String code, Object attribute) → E
override
fold<T>(T initialValue, T combine(T previousValue, E element)) → T
'Entities.fold' ('dynamic Function(dynamic, dynamic Function(dynamic, E))') 'Iterable.fold' ('T Function
override
followedBy(Iterable<E> other) Iterable<E>
Creates the lazy concatenation of this iterable and other.
override
forEach(void action(E element)) → void
Invokes action on each element of this iterable in iteration order.
override
fromJson(String entitiesJson) → void
override
fromJsonList(dynamic entitiesList, [Entity<Entity>? internalParent]) → void
Loads entities without validations to this, which must be empty.
integrate(IEntities<E> fromEntities) → void
override
integrateAdd(IEntities<E> addEntities) → void
override
integrateRemove(IEntities<E> removeEntities) → void
override
integrateSet(IEntities<E> setEntities) → void
override
internalChild(Oid oid) Entities<Entity>?
override
internalSingle(Oid oid) Entity<Entity>?
override
isValid(E entity) bool
override
join([String separator = '']) String
Converts each element to a String and concatenates the strings.
override
lastWhere(bool f(E entity), {E orElse()?}) → E
The last element that satisfies the given predicate test.
override
map<T>(T f(E)) Iterable<T>
The current elements of this iterable modified by toElement.
override
newEntities() Entities<E>
newEntity() Entity<E>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
order([int compare(E a, E b)?]) Entities<E>
If compare function is not passed, compareTo method will be used. If there is no compareTo method on specific entity, the Entity.compareTo method will be used (code if not null, otherwise id).
override
postAdd(E entity) bool
override
postRemove(E entity) bool
override
preRemove(E entity) bool
override
random() → E
override
reduce(E combine(E value, E entity)) → E
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
override
remove(E entity) bool
override
removeFrom(Entities<E> entities) bool
selectWhere(bool f(E)) Entities<E>
override
selectWhereAttribute(String code, Object attribute) Entities<E>
override
selectWhereParent(String code, IEntity<IEntity> parent) Entities<E>
override
setAttributesFrom(Entities<E> entities) bool
singleWhere(bool f(E entity), {E orElse()?}) → E
The single element that satisfies test.
override
singleWhereAttributeId(String code, Object attribute) → E?
override
singleWhereCode(String? code) → E?
override
singleWhereId(Id id) → E?
override
singleWhereOid(Oid oid) → E?
override
skip(int n) Iterable<E>
'Entities.firstWhere' ('E Function(bool Function(E), {E Function() orElse})')
override
skipFirst(int n) Entities<E>
override
skipFirstWhile(bool f(E entity)) Entities<E>
override
skipWhile(bool f(E entity)) Iterable<E>
Creates an Iterable that skips leading elements while test is satisfied.
override
sort([int compare(E a, E b)?]) → void
If compare function is not passed, compareTo method will be used. If there is no compareTo method on specific entity, the Entity.compareTo method will be used (code if not null, otherwise id).
override
take(int n) Iterable<E>
Creates a lazy iterable of the count first elements of this iterable.
override
takeFirst(int n) Entities<E>
override
takeFirstWhile(bool f(E entity)) Entities<E>
override
takeWhile(bool f(E entity)) Iterable<E>
Creates a lazy iterable of the leading elements satisfying test.
override
toJson() String
override
toJsonList() List<Map<String, Object>>
toList({bool growable = true}) List<E>
Creates a List containing the elements of this Iterable.
override
toSet() Set<E>
Creates a Set containing the same elements as this iterable.
override
toString() String
entity Returns a string that represents this entity by using oid and code.
override
update(E beforeEntity, E afterEntity) bool
Updates removes the before entity and adds the after entity, in order to update oid, code and id entity maps.
validateCardinality(bool isValid) bool
validateIncrementAndRequired(dynamic entity, bool isValid) bool
validateUnique(dynamic entity, bool isValid) bool
where(bool f(E entity)) Iterable<E>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited