Class ProviderHasOid<T extends HasOid>
java.lang.Object
net.tangly.core.providers.Provider<T>
net.tangly.core.providers.ProviderHasOid<T>
-
Constructor Summary
ConstructorsConstructorDescriptionProviderHasOid(@NotNull net.tangly.commons.generator.IdGenerator generator, @NotNull Provider<T> provider) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeAdded(T entity) Checks if the entity can be added through the provider.voidDeletes the data associated with the entity.voidDeletes all the entities managed by the provider.items()Returns a list containing all known instances of the entity type.of(@NotNull net.tangly.commons.generator.IdGenerator generator) of(@NotNull net.tangly.commons.generator.IdGenerator generator, @NotNull org.eclipse.store.storage.embedded.types.EmbeddedStorageManager storageManager, @NotNull List<T> items) voidUpdates the data associated with the entity.
-
Constructor Details
-
ProviderHasOid
-
-
Method Details
-
of
-
of
-
of
-
canBeAdded
Checks if the entity can be added through the provider. The entity can be added either if no entity with the same oid is already stored in the provider, or the stored entity and the entity we shall add is the same Java object.- Parameters:
entity- entity to be added- Returns:
- flag indicating if it is allowed to add the object
-
items
-
update
Description copied from class:ProviderUpdates the data associated with the entity. If the entity is new, the update is handled as a create operation. The update is transitive and all referenced entities are also updated. The entity given as a parameter becomes the instance managed through the provider. -
delete
-
deleteAll
-