EntityRepository<O extends Object> class
abstract
- Inheritance
-
- Object
- EntityAccessor<
O> - EntityRepository
- Implemented types
-
- EntitySource<
O> - EntityStorage<
O>
- EntitySource<
- Mixed-in types
- Implementers
- Available extensions
Constructors
-
EntityRepository(EntityRepositoryProvider? provider, String name, EntityHandler<
O> entityHandler, {Type? type})
Properties
-
entityHandler
→ EntityHandler<
O> -
final
- entityManager → Object
-
Available on EntityRepository<
Object> , provided by the EntityRepositoryDBExtension extensionno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- initializationStatus → InitializationStatus
-
Returns the current InitializationStatus.
no setterinherited
- isAsyncInitialization → bool
-
Returns
true
if this instance initialization was asynchronous.no setterinherited - isClosed → bool
-
no setterinherited
- isInitialized → bool
-
Returns
true
if this instance is already initialized.no setterinherited - isInitializing → bool
-
Returns
true
if this instance is in the middle of the initialization process.no setterinherited - name → String
-
finalinherited
- nameSimplified → String
-
no setterinherited
-
onDelete
→ EventStream<
O> -
final
-
onStore
→ EventStream<
O> -
final
- provider → EntityRepositoryProvider
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → Type
-
final
Methods
-
checkEntityFields(
O o) → void -
inherited
-
checkInitialized(
) → void -
Checks if this instance is initialized.
inherited
-
checkNotClosed(
) → void -
inherited
-
close(
) → bool -
count(
{EntityMatcher< O> ? matcher, Object? parameters, List? positionalParameters, Map<String, Object?> ? namedParameters, Transaction? transaction}) → FutureOr<int> -
inherited
-
countByQuery(
String query, {Object? parameters, List? positionalParameters, Map< String, Object?> ? namedParameters, Transaction? transaction}) → FutureOr<int> -
override
-
createFromMap(
Map< String, dynamic> fields, {EntityProvider? entityProvider, EntityCache? entityCache, EntityResolutionRules? resolutionRules}) → FutureOr<O> -
delete(
EntityMatcher< O> matcher, {Object? parameters, List? positionalParameters, Map<String, Object?> ? namedParameters, Transaction? transaction}) → FutureOr<Iterable< O> > -
inherited
-
deleteByID(
dynamic id, {Transaction? transaction}) → FutureOr< O?> -
override
-
deleteByQuery(
String query, {Object? parameters, List? positionalParameters, Map< String, Object?> ? namedParameters, Transaction? transaction}) → FutureOr<Iterable< O> > -
override
-
deleteEntity(
O o, {Transaction? transaction}) → FutureOr< O?> -
override
-
deleteEntityCascade(
O o, {Transaction? transaction}) → FutureOr< Iterable> -
override
-
doInitialization(
{Initializable? parent}) → FutureOr< InitializationResult> -
Initialize this instance if is not initialized yet.
inherited
-
ensureInitialized(
{Initializable? parent}) → FutureOr< InitializationResult> -
Ensures that this instance is initialized.
inherited
-
ensureInitializedAsync(
{Initializable? parent}) → FutureOr< InitializationResult> -
Ensures that this instance is initialized. If is not
initialized yet it will force an asynchronous initialization
and return a Future.
inherited
-
ensureReferencesStored(
O o, {Transaction? transaction, TransactionOperation? operation}) → FutureOr< bool> -
ensureStored(
O o, {Transaction? transaction, TransactionOperation? operation}) → FutureOr -
entityHasChangedFields(
O o) → bool -
executeInitialized<
R> (ExecuteInitializedCallback< R> callback, {Initializable? parent}) → FutureOr<R> -
Executes the
callback
ensuring that this instances was fully initialized.inherited -
existIDs<
I extends Object> (List< I?> ids, {Transaction? transaction}) → FutureOr<Iterable< I> > -
inherited
-
existsID(
dynamic id, {Transaction? transaction}) → FutureOr< bool> -
inherited
-
fromMap(
Map< String, dynamic> fields, {EntityProvider? entityProvider, EntityCache? entityCache, EntityResolutionRules? resolutionRules}) → FutureOr<O> -
getContextEntityResolutionRules(
) → EntityResolutionRules? -
The current EntityResolutionRules of the current context.
inherited
-
getEntityChangedFields(
O o) → List< String> ? -
getEntityFields(
O o) → Map< String, Object?> -
getEntityID(
O o) → Object? -
override
-
getEntityMapID(
Map< String, dynamic> ? o) → Object? -
hasReferencedEntities(
) → bool -
inherited
-
information(
{bool extended = false}) → Map< String, dynamic> -
initialize(
) → FutureOr< InitializationResult> -
Initialization implementation. Do not call it directly, use doInitialization.
inherited
-
initializeDependencies(
) → FutureOr< List< Initializable> > -
Return a List of Initializable instances that need to be initialized
BEFORE initialize this instance.
inherited
-
isOfEntityType(
Object? o) → bool -
isSameEntityManager(
EntityRepository< Object> other) → bool -
Available on EntityRepository<
Object> , provided by the EntityRepositoryDBExtension extension -
isStored(
O o, {Transaction? transaction}) → bool -
inherited
-
isTrackingEntity(
O o) → bool -
length(
{Transaction? transaction}) → FutureOr< int> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyDeletedEntities(
Iterable< O> entities) → void -
notifyStoredEntities(
Iterable< O> entities) → void -
resolveEntityResolutionRules(
EntityResolutionRules? resolutionRules) → EntityResolutionRulesResolved -
Resolves the
resolutionRules
to apply. Merges with the current EntityResolutionRules context if needed.inherited -
select(
EntityMatcher< O> matcher, {Object? parameters, List? positionalParameters, Map<String, Object?> ? namedParameters, Transaction? transaction, int? limit, EntityResolutionRules? resolutionRules}) → FutureOr<Iterable< O> > -
inherited
-
selectAll(
{Transaction? transaction, int? limit, EntityResolutionRules? resolutionRules}) → FutureOr< Iterable< O> > -
inherited
-
selectByID(
dynamic id, {Transaction? transaction, EntityResolutionRules? resolutionRules}) → FutureOr< O?> -
override
-
selectByIDs(
List ids, {Transaction? transaction, EntityResolutionRules? resolutionRules}) → FutureOr< List< O?> > -
override
-
selectByQuery(
String query, {Object? parameters, List? positionalParameters, Map< String, Object?> ? namedParameters, Transaction? transaction, int? limit, EntityResolutionRules? resolutionRules}) → FutureOr<Iterable< O> > -
override
-
selectFirstByQuery(
String query, {Object? parameters, List? positionalParameters, Map< String, Object?> ? namedParameters, Transaction? transaction, EntityResolutionRules? resolutionRules}) → FutureOr<O?> -
override
-
selectIDsBy<
I extends Object> (EntityMatcher< O> matcher, {Object? parameters, List? positionalParameters, Map<String, Object?> ? namedParameters, Transaction? transaction, int? limit}) → FutureOr<Iterable< I> > -
inherited
-
selectIDsByQuery<
I extends Object> (String query, {Object? parameters, List? positionalParameters, Map< String, Object?> ? namedParameters, Transaction? transaction, int? limit}) → FutureOr<Iterable< I> > -
override
-
selectRelationship<
E> (O? o, String field, {Object? oId, TypeInfo? fieldType, Transaction? transaction}) → FutureOr< Iterable> -
inherited
-
selectRelationships<
E> (List< O> ? os, String field, {List? oIds, TypeInfo? fieldType, Transaction? transaction}) → FutureOr<Map< dynamic, Iterable> > -
inherited
-
setRelationship<
E extends Object> (O o, String field, List< E> values, {TypeInfo? fieldType, Transaction? transaction}) → FutureOr<bool> -
inherited
-
store(
O o, {Transaction? transaction}) → FutureOr -
inherited
-
storeAll(
Iterable< O> o, {Transaction? transaction}) → FutureOr<List> -
inherited
-
storeAllFromJson(
Iterable< Map< entitiesJson, {Transaction? transaction, EntityResolutionRules? resolutionRules}) → FutureOr<String, dynamic> >List< O> > -
storeFromJson(
Map< String, dynamic> json, {Transaction? transaction, EntityResolutionRules? resolutionRules}) → FutureOr<O> -
toString(
) → String -
A string representation of this object.
override
-
trackEntities(
Iterable< O> os, {bool stored = false}) → List<O> -
trackEntitiesNullable(
Iterable< O?> os, {bool stored = false}) → List<O?> -
trackEntity(
O o, {bool stored = false}) → O -
trackEntityNullable(
O? o) → O? -
tryDeleteByID(
dynamic id, {Transaction? transaction}) → FutureOr< O?> -
override
-
tryDeleteEntity(
O o, {Transaction? transaction}) → FutureOr< O?> -
override
-
untrackEntities(
Iterable< O?> os, {bool deleted = false}) → void -
untrackEntity(
O? o, {bool deleted = false}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
resolveEntityFromMap<
E extends Object> ({Object? entityMap, Map< String, dynamic> ? parentMap, String? entityField, E? fromMap(Map<String, dynamic> map)?, E? empty()?, Type? entityType, EntityRepositoryProvider? entityRepositoryProvider, EntityHandlerProvider? entityHandlerProvider, EntityProvider? entityProvider, EntityCache? entityCache, EntityResolutionRules? resolutionRules}) → FutureOr<E?> -
resolveSubEntitiesFields(
Map< String, dynamic> fields, Map<String, Type> subEntitiesFields, {Object? fromMap(String field, Map<String, dynamic> map)?, Object? empty(String field)?, EntityRepositoryProvider? entityRepositoryProvider, EntityHandlerProvider? entityHandlerProvider, EntityProvider? entityProvider, EntityCache? entityCache, EntityResolutionRules? resolutionRules}) → FutureOr<Map< String, dynamic> >