EntityResolutionRules class
Rules to resolve entities. Used by EntityHandler and DBEntityRepository.
- Inheritance
-
- Object
- EntityRules<
EntityResolutionRules> - EntityResolutionRules
- Implementers
Constructors
-
EntityResolutionRules({bool? allowEntityFetch, bool allowReadFile = false, List<
Type> ? lazyEntityTypes, List<Type> ? eagerEntityTypes, bool? allLazy, bool? allEager, bool mergeTolerant = false}) -
const
-
EntityResolutionRules.fetch({List<
Type> ? lazyEntityTypes, List<Type> ? eagerEntityTypes, bool? allLazy, bool? allEager, bool mergeTolerant = false}) -
const
-
EntityResolutionRules.fetchEager(List<
Type> ? eagerEntityTypes, {bool mergeTolerant = false}) -
const
- EntityResolutionRules.fetchEagerAll({bool mergeTolerant = false})
-
const
-
EntityResolutionRules.fetchLazy(List<
Type> ? lazyEntityTypes, {bool mergeTolerant = false}) -
const
- EntityResolutionRules.fetchLazyAll({bool mergeTolerant = false})
-
const
-
EntityResolutionRules.fetchTypes({bool? allEager, bool? allLazy, Map<
Object, bool?> ? eagerTypes, Map<Object, bool?> ? lazyTypes, bool mergeTolerant = false}) -
factory
Properties
- allEager → bool?
-
If
true
all types will be eager loaded.final - allLazy → bool?
-
If
true
all types will be lazy loaded.final - allowEntityFetch → bool
-
If
true
it will allow the use of on DB/repository to fetch an entity by an ID reference.no setter - allowReadFile → bool
-
If
true
it will allow calls to APIPlatform.readFileAsString and APIPlatform.readFileAsBytes.final -
eagerEntityTypes
→ List<
Type> ? -
Entities Type with eager load.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isInnocuous → bool
-
Returns
true
if this instance is equivalent to innocuous instance (no resolution rules to apply).no setteroverride - isValid → bool
-
Return
true
if this instance rules are valid.no setteroverride -
lazyEntityTypes
→ List<
Type> ? -
Entities Type with lazy load.
final
- mergeTolerant → bool
-
If
true
it will be ignored on a conflicting merge.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? allowEntityFetch, bool? allowReadFile, List< Type> ? lazyEntityTypes, List<Type> ? eagerEntityTypes, bool? allLazy, bool? allEager, bool? mergeTolerant, List<Type> ? conflictingEntityTypes}) → EntityResolutionRules - Copies this instance, allowing fields overwrite.
-
isAnyEagerEntityType(
Iterable< Type> types) → bool -
isAnyEagerEntityTypeInfo(
Iterable< TypeInfo> types) → bool -
isAnyLazyEntityType(
Iterable< Type> types) → bool -
isAnyLazyEntityTypeInfo(
Iterable< TypeInfo> types) → bool -
isEagerEntityType(
Type entityType, [bool def = false]) → bool -
Returns
true
ifentityType
load is eager. -
isEagerEntityTypeInfo(
TypeInfo entityTypeInfo, [bool def = false]) → bool - Alias to isEagerEntityType with a TypeInfo parameter.
-
isLazyEntityType(
Type entityType, [bool def = false]) → bool -
Returns
true
ifentityType
load is lazy. -
isLazyEntityTypeInfo(
TypeInfo entityTypeInfo, [bool def = false]) → bool - Alias to isLazyEntityType with a TypeInfo parameter.
-
merge(
EntityResolutionRules? other) → EntityResolutionRules -
Merges this instances with
other
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
override
-
toString(
) → String -
A string representation of this object.
override
-
validate(
) → void -
Validates this instances rules.
See isValid.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
Constants
- innocuous → const EntityResolutionRules
-
A
const
instance without any resolution rules to apply.