S
- as SubOrder
public class SequenceSubOrderTransformer<S extends SubOrder> extends Object implements org.apache.commons.collections.Transformer, Serializable, UpdatableContext<javax.persistence.EntityManager>
SubOrder
that has a root, we need to determine its previous position and persist that. It will determine the #getExistingLast()
a
and then link the current to the previous last as the new last.
SubOrder
to link to; or else nothing changes.Constructor and Description |
---|
SequenceSubOrderTransformer() |
Modifier and Type | Method and Description |
---|---|
javax.persistence.EntityManager |
getEntityManager() |
S |
getExistingLast(S so)
Get the existing last
SubOrder entity for the shares root Order between the new (as param) and any existing suborders for that root. |
void |
setEntityManager(javax.persistence.EntityManager entityManager) |
Object |
transform(Object input) |
void |
updateContext(javax.persistence.EntityManager em) |
public S getExistingLast(S so)
SubOrder
entity for the shares root Order between the new (as param) and any existing suborders for that root.so
- as SubOrder
type@Transactional(readOnly=false) public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public javax.persistence.EntityManager getEntityManager()
public void setEntityManager(javax.persistence.EntityManager entityManager)
public void updateContext(javax.persistence.EntityManager em)
updateContext
in interface UpdatableContext<javax.persistence.EntityManager>
Copyright © 2018. All rights reserved.