Class JPAObjectStoreDelegate
- java.lang.Object
-
- io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStoreDelegate
-
- All Implemented Interfaces:
JPAObjectStore
,io.vlingo.symbio.store.object.ObjectStore
,io.vlingo.symbio.store.object.ObjectStoreReader
,io.vlingo.symbio.store.object.ObjectStoreWriter
public class JPAObjectStoreDelegate extends java.lang.Object implements JPAObjectStore
TheJDBCObjectStoreDelegate
for JPA.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.vlingo.symbio.store.object.ObjectStoreReader
io.vlingo.symbio.store.object.ObjectStoreReader.QueryMode, io.vlingo.symbio.store.object.ObjectStoreReader.QueryMultiResults, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResult, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResultInterest, io.vlingo.symbio.store.object.ObjectStoreReader.QuerySingleResult
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
JPA_HSQLDB_PERSISTENCE_UNIT
static java.lang.String
JPA_MYSQL_PERSISTENCE_UNIT
static java.lang.String
JPA_POSTGRES_PERSISTENCE_UNIT
-
Constructor Summary
Constructors Constructor Description JPAObjectStoreDelegate(io.vlingo.actors.Stage stage)
Constructs my default state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected void
createOrUpdate(java.lang.Object detachedEntity, long updateId)
protected java.lang.Object
findEntity(java.lang.Class<?> entityClass, java.lang.Object primaryKey)
<T extends io.vlingo.symbio.store.object.PersistentObject,E>
voidpersist(T persistentObject, java.util.List<io.vlingo.symbio.Source<E>> sources, long updateId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
<T extends io.vlingo.symbio.store.object.PersistentObject,E>
voidpersistAll(java.util.Collection<T> persistentObjects, java.util.List<io.vlingo.symbio.Source<E>> sources, long updateId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
void
queryAll(io.vlingo.symbio.store.object.QueryExpression expression, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResultInterest interest, java.lang.Object object)
void
queryObject(io.vlingo.symbio.store.object.QueryExpression expression, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResultInterest interest, java.lang.Object object)
void
registerMapper(io.vlingo.symbio.store.object.PersistentObjectMapper mapper)
<T extends io.vlingo.symbio.store.object.PersistentObject>
voidremove(T persistentObject, long removeId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.vlingo.symbio.store.object.jdbc.jpa.JPAObjectStore
remove
-
-
-
-
Field Detail
-
JPA_MYSQL_PERSISTENCE_UNIT
public static final java.lang.String JPA_MYSQL_PERSISTENCE_UNIT
- See Also:
- Constant Field Values
-
JPA_HSQLDB_PERSISTENCE_UNIT
public static final java.lang.String JPA_HSQLDB_PERSISTENCE_UNIT
- See Also:
- Constant Field Values
-
JPA_POSTGRES_PERSISTENCE_UNIT
public static final java.lang.String JPA_POSTGRES_PERSISTENCE_UNIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceio.vlingo.symbio.store.object.ObjectStore
-
persist
public <T extends io.vlingo.symbio.store.object.PersistentObject,E> void persist(T persistentObject, java.util.List<io.vlingo.symbio.Source<E>> sources, long updateId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
- Specified by:
persist
in interfaceio.vlingo.symbio.store.object.ObjectStoreWriter
-
persistAll
public <T extends io.vlingo.symbio.store.object.PersistentObject,E> void persistAll(java.util.Collection<T> persistentObjects, java.util.List<io.vlingo.symbio.Source<E>> sources, long updateId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
- Specified by:
persistAll
in interfaceio.vlingo.symbio.store.object.ObjectStoreWriter
-
queryAll
public void queryAll(io.vlingo.symbio.store.object.QueryExpression expression, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResultInterest interest, java.lang.Object object)
- Specified by:
queryAll
in interfaceio.vlingo.symbio.store.object.ObjectStoreReader
-
queryObject
public void queryObject(io.vlingo.symbio.store.object.QueryExpression expression, io.vlingo.symbio.store.object.ObjectStoreReader.QueryResultInterest interest, java.lang.Object object)
- Specified by:
queryObject
in interfaceio.vlingo.symbio.store.object.ObjectStoreReader
-
remove
public <T extends io.vlingo.symbio.store.object.PersistentObject> void remove(T persistentObject, long removeId, io.vlingo.symbio.store.object.ObjectStoreWriter.PersistResultInterest interest, java.lang.Object object)
- Specified by:
remove
in interfaceJPAObjectStore
-
registerMapper
public void registerMapper(io.vlingo.symbio.store.object.PersistentObjectMapper mapper)
- Specified by:
registerMapper
in interfaceio.vlingo.symbio.store.object.ObjectStore
-
findEntity
protected java.lang.Object findEntity(java.lang.Class<?> entityClass, java.lang.Object primaryKey)
-
createOrUpdate
protected void createOrUpdate(java.lang.Object detachedEntity, long updateId)
- Parameters:
detachedEntity
- unmanaged entity to be persisted if does not exist or merged if does exist.updateId
- the primary key to be used to find the managed entity.
-
-