R
- public class ReferencePersistTransformer<R extends AbstractReference> extends Object implements org.apache.commons.collections.Transformer, Serializable
Reference
and all its relations like Reference#setParent(Reference)
and Reference.setRelated(List)
.Reference
type and returns a Reference
type.
JPAPersistTransformer
transformer in persistTransformer
.Constructor and Description |
---|
ReferencePersistTransformer() |
ReferencePersistTransformer(org.apache.commons.collections.Transformer persistTransformer) |
Modifier and Type | Method and Description |
---|---|
protected Reference |
deriveRelative(Object relatedRefType,
String mainRefName) |
Object |
getParent()
|
org.apache.commons.collections.Transformer |
getPersistTransformer()
The underlying Transformer to persist to data source
|
List |
getRelated()
A
List of Reference s OR a Transformer
that dynamically generates a List of Reference s for each String token.The List of Reference represented by this can be related using ReferenceAlias where
ReferenceAlias#setReference(Reference) refers to the reference being created and
ReferenceAlias#setRelated(Reference) refers to one of the related references. |
boolean |
isCreateRefIfNotExist()
If true will create
Reference.getParent() or ReferenceAlias.getRelated() |
protected R |
persistReference(R ref)
Handle Persistence of the core
Relation entity |
protected AbstractReference |
persistRelation(AbstractReference ref)
Handle Persistence of Relation type,
Reference#setParent(Reference) or Reference.setRelated(List) |
void |
setCreateRefIfNotExist(boolean createRefIfNotExist)
If true will create
Reference.getParent() or ReferenceAlias.getRelated() |
void |
setParent(Object parent)
|
void |
setPersistTransformer(org.apache.commons.collections.Transformer persistTransformer)
The underlying Transformer to persist to data source
|
void |
setRelated(List related)
A
List of Reference s OR a Transformer
that dynamically generates a List of Reference s for each String token.The List of Reference represented by this can be related using ReferenceAlias where
ReferenceAlias#setReference(Reference) refers to the reference being created and
ReferenceAlias#setRelated(Reference) refers to one of the related references. |
Object |
transform(Object input) |
protected R |
transformRef(R ref) |
public ReferencePersistTransformer()
public ReferencePersistTransformer(org.apache.commons.collections.Transformer persistTransformer)
protected AbstractReference persistRelation(AbstractReference ref)
Reference#setParent(Reference)
or Reference.setRelated(List)
public Object transform(Object input)
transform
in interface org.apache.commons.collections.Transformer
public Object getParent()
List
of Reference
s OR a Transformer
that dynamically generates a parent Reference
for each String token.public void setParent(Object parent)
List
of Reference
s OR a Transformer
that dynamically generates a parent Reference
for each String token.public List getRelated()
List
of Reference
s OR a Transformer
that dynamically generates a List
of Reference
s for each String token.Reference
represented by this can be related using ReferenceAlias
where
ReferenceAlias#setReference(Reference)
refers to the reference being created and
ReferenceAlias#setRelated(Reference)
refers to one of the related
references.public void setRelated(List related)
List
of Reference
s OR a Transformer
that dynamically generates a List
of Reference
s for each String token.Reference
represented by this can be related using ReferenceAlias
where
ReferenceAlias#setReference(Reference)
refers to the reference being created and
ReferenceAlias#setRelated(Reference)
refers to one of the related
references.public boolean isCreateRefIfNotExist()
Reference.getParent()
or ReferenceAlias.getRelated()
public void setCreateRefIfNotExist(boolean createRefIfNotExist)
Reference.getParent()
or ReferenceAlias.getRelated()
public org.apache.commons.collections.Transformer getPersistTransformer()
public void setPersistTransformer(org.apache.commons.collections.Transformer persistTransformer)
Copyright © 2018. All rights reserved.