public interface EntityManager extends Component
Lifecyclable.State
LIFECYCLABLE_LOGGER
Modifier and Type | Method and Description |
---|---|
static EntityManager |
get(Speedment speedment)
Returns the default EntityManager from the Platform.
|
default Class<EntityManager> |
getComponentClass()
Returns the Component interface Class this Component implements.
|
<ENTITY> void |
persist(ENTITY entity)
Persists the given Entity and returns a new
Optional<Entity> that
was the result of the persistence, or Optional.empty() if the method
failed. |
<ENTITY> void |
remove(ENTITY entity)
Updates the given Entity and returns a new
Optional<Entity> that
was the result of the update, or Optional.empty() if the method failed. |
<ENTITY> void |
update(ENTITY entity)
Updates the given Entity and returns a new
Optional<Entity> that
was the result of the update, or Optional.empty() if the method failed. |
asSoftware, defaultCopy, getSpeedment, isInternal
getState, initialize, isInitialized, isLoaded, isResolved, isStarted, isStopped, load, onInitialize, onLoad, onResolve, onStart, onStop, postStop, preInitialize, preLoad, preResolve, preStart, preStop, resolve, setState, start, stop
default Class<EntityManager> getComponentClass()
Component
getComponentClass
in interface Component
<ENTITY> void persist(ENTITY entity) throws SpeedmentException
Optional<Entity>
that
was the result of the persistence, or Optional.empty() if the method
failed.ENTITY
- the type of the Entityentity
- to persistSpeedmentException
<ENTITY> void update(ENTITY entity) throws SpeedmentException
Optional<Entity>
that
was the result of the update, or Optional.empty() if the method failed.ENTITY
- the type of the Entityentity
- to updateSpeedmentException
<ENTITY> void remove(ENTITY entity) throws SpeedmentException
Optional<Entity>
that
was the result of the update, or Optional.empty() if the method failed.ENTITY
- the type of the Entityentity
- to removeSpeedmentException
static EntityManager get(Speedment speedment)
speedment
- instance to useCopyright © 2016 Speedment, Inc.. All rights reserved.