Class JPAPlaceholderResolverStrategy
java.lang.Object
org.drools.persistence.jpa.marshaller.JPAPlaceholderResolverStrategy
- All Implemented Interfaces:
TransactionAware,ObjectMarshallingStrategy,Cacheable
public class JPAPlaceholderResolverStrategy
extends Object
implements ObjectMarshallingStrategy, TransactionAware, Cacheable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.kie.api.marshalling.ObjectMarshallingStrategy
ObjectMarshallingStrategy.Context -
Constructor Summary
ConstructorsConstructorDescriptionJPAPlaceholderResolverStrategy(jakarta.persistence.EntityManagerFactory emf) JPAPlaceholderResolverStrategy(String persistenceUnit, ClassLoader cl) JPAPlaceholderResolverStrategy(String name, String persistenceUnit, ClassLoader cl) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected voidaddMapping(Object entityId, String entityType, Object entity, ObjectOutputStream context, jakarta.persistence.EntityManager em) voidclose()protected jakarta.persistence.EntityManagergetName()byte[]marshal(ObjectMarshallingStrategy.Context context, ObjectOutputStream os, Object object) voidonEnd(TransactionManager txm) voidunmarshal(ObjectMarshallingStrategy.Context context, ObjectInputStream ois, byte[] object, ClassLoader classloader) voidwrite(ObjectOutputStream os, Object object)
-
Constructor Details
-
JPAPlaceholderResolverStrategy
-
JPAPlaceholderResolverStrategy
public JPAPlaceholderResolverStrategy(jakarta.persistence.EntityManagerFactory emf) -
JPAPlaceholderResolverStrategy
-
JPAPlaceholderResolverStrategy
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceObjectMarshallingStrategy
-
accept
- Specified by:
acceptin interfaceObjectMarshallingStrategy
-
write
- Specified by:
writein interfaceObjectMarshallingStrategy- Throws:
IOException
-
read
- Specified by:
readin interfaceObjectMarshallingStrategy- Throws:
IOExceptionClassNotFoundException
-
marshal
public byte[] marshal(ObjectMarshallingStrategy.Context context, ObjectOutputStream os, Object object) throws IOException - Specified by:
marshalin interfaceObjectMarshallingStrategy- Throws:
IOException
-
unmarshal
public Object unmarshal(ObjectMarshallingStrategy.Context context, ObjectInputStream ois, byte[] object, ClassLoader classloader) throws IOException, ClassNotFoundException - Specified by:
unmarshalin interfaceObjectMarshallingStrategy- Throws:
IOExceptionClassNotFoundException
-
createContext
- Specified by:
createContextin interfaceObjectMarshallingStrategy
-
getClassIdValue
-
onStart
- Specified by:
onStartin interfaceTransactionAware
-
onEnd
- Specified by:
onEndin interfaceTransactionAware
-
getEntityManager
protected jakarta.persistence.EntityManager getEntityManager() -
close
public void close() -
addMapping
protected void addMapping(Object entityId, String entityType, Object entity, ObjectOutputStream context, jakarta.persistence.EntityManager em)
-