E
- as Identifiable
public class RelatedEntityPersistTransformer<E extends Identifiable<?>> extends EntityPersistTransformer<E>
Transactional
. Example DAO that may use this is ProductDaoImpl#getPostPersistTransformer()
TODO: Add unit test case
exceptions, failFast, messages, tm
Constructor and Description |
---|
RelatedEntityPersistTransformer() |
Modifier and Type | Method and Description |
---|---|
String |
getChildEntityParentRefFieldName()
The name of the Container Entity (Product) in the related Entity
|
javax.persistence.EntityManager |
getEm() |
Class |
getEntityClass()
Main entity Class
|
protected Object |
getId(E entity) |
String |
getParentEntityFieldName()
The name of the field of the related entity in the container entity (Product)
|
Class |
getRelatedEntityClass()
The type of the related entity to persist or remove
|
void |
setChildEntityParentRefFieldName(String childEntityParentRefFieldName)
The name of the Container Entity (Product) in the related Entity
|
void |
setEm(javax.persistence.EntityManager em) |
void |
setEntityClass(Class entityClass)
Main entity Class
|
void |
setParentEntityFieldName(String parentEntityFieldName)
The name of the field of the related entity in the container entity (Product)
|
void |
setRelatedEntityClass(Class relatedEntityClass)
The type of the related entity to persist or remove
|
E |
write(E input)
Write a record
|
close, getExceptions, getMessages, getTransactionDef, handleException, init, isExecuteUnderTransaction, isFailFast, isInitialized, setExceptions, setExecuteUnderTransaction, setFailFast, setMessages, setTransactionDef, transform, write
public E write(E input)
RealTimeWriter
write
in interface RealTimeWriter<E extends Identifiable<?>>
write
in class EntityPersistTransformer<E extends Identifiable<?>>
public javax.persistence.EntityManager getEm()
public void setEm(javax.persistence.EntityManager em)
public Class getEntityClass()
public void setEntityClass(Class entityClass)
public Class getRelatedEntityClass()
public void setRelatedEntityClass(Class relatedEntityClass)
public String getParentEntityFieldName()
public void setParentEntityFieldName(String parentEntityFieldName)
public String getChildEntityParentRefFieldName()
public void setChildEntityParentRefFieldName(String childEntityParentRefFieldName)
Copyright © 2018. All rights reserved.