public class StringToReferenceTransformer<R extends Reference> extends ReferencePersistTransformer<R>
Reference type.splitter is provided it will assume the raw String to be a list of tokens and create
a Reference for each String token.Reference type and returns a Reference type or List of Reference type.| Constructor and Description |
|---|
StringToReferenceTransformer() |
StringToReferenceTransformer(StringToReferenceTransformer t) |
StringToReferenceTransformer(org.apache.commons.collections.Transformer persistTransformer) |
| Modifier and Type | Method and Description |
|---|---|
protected R |
createReference(String name) |
org.apache.commons.collections.Transformer |
getSanitize()
The
splitter is only applicable for collections, hence sanitization is a pre-process step that can be combined
within this for convenience as a Lot of Reference data will need screening and sanitization before it can be entertained. |
org.apache.commons.collections.Transformer |
getSplitter()
A
StringToListTransformer that will ensure following:
Any String input that is delimited is tokenized with the tokens processed
The output will be a List is String
|
Class<R> |
getType()
The
Reference type |
boolean |
isPersist()
If true will persist the reference graph
|
protected R |
persistReference(R ref)
Handle Persistence of the core
Relation entity |
void |
setPersist(boolean persist)
If true will persist the reference graph
|
void |
setSanitize(org.apache.commons.collections.Transformer sanitize)
The
splitter is only applicable for collections, hence sanitization is a pre-process step that can be combined
within this for convenience as a Lot of Reference data will need screening and sanitization before it can be entertained. |
void |
setSplitter(org.apache.commons.collections.Transformer splitter)
A
StringToListTransformer that will ensure following:
Any String input that is delimited is tokenized with the tokens processed
The output will be a List is String
|
void |
setType(Class<R> type)
The
Reference type |
Object |
transform(Object input) |
deriveRelative, getParent, getPersistTransformer, getRelated, isCreateRefIfNotExist, persistRelation, setCreateRefIfNotExist, setParent, setPersistTransformer, setRelated, transformRefpublic StringToReferenceTransformer()
public StringToReferenceTransformer(org.apache.commons.collections.Transformer persistTransformer)
public StringToReferenceTransformer(StringToReferenceTransformer t)
protected R persistReference(R ref)
ReferencePersistTransformerRelation entitypersistReference in class ReferencePersistTransformer<R extends Reference>public Object transform(Object input)
transform in interface org.apache.commons.collections.Transformertransform in class ReferencePersistTransformer<R extends Reference>public org.apache.commons.collections.Transformer getSplitter()
StringToListTransformer that will ensure following:
List is Stringpublic void setSplitter(org.apache.commons.collections.Transformer splitter)
StringToListTransformer that will ensure following:
List is Stringpublic boolean isPersist()
public void setPersist(boolean persist)
public org.apache.commons.collections.Transformer getSanitize()
splitter is only applicable for collections, hence sanitization is a pre-process step that can be combined
within this for convenience as a Lot of Reference data will need screening and sanitization before it can be entertained.
public void setSanitize(org.apache.commons.collections.Transformer sanitize)
splitter is only applicable for collections, hence sanitization is a pre-process step that can be combined
within this for convenience as a Lot of Reference data will need screening and sanitization before it can be entertained.
Copyright © 2018. All rights reserved.