public abstract class AbstractCategoryLookup<T extends IHierarchialReference> extends Object implements org.apache.commons.collections.Transformer
IHierarchialReference by using any unique field in ittransform(Object) accepts a value (some unique key), from which the parent object can be derived
| Modifier and Type | Field and Description |
|---|---|
protected String |
searchBy |
protected boolean |
throwExceptionOnNull
If no result is found it will throw an exception instead of returning a null
|
protected Class<T> |
type |
| Constructor and Description |
|---|
AbstractCategoryLookup() |
| Modifier and Type | Method and Description |
|---|---|
String |
getSearchBy()
Field name to search by for the lookup
|
boolean |
isThrowExceptionOnNull()
If no result is found it will throw an exception instead of returning a null
|
protected abstract T |
query(Object value)
Implementation, to define how to query using the query object
|
void |
setSearchBy(String searchBy)
Field name to search by for the lookup
|
void |
setThrowExceptionOnNull(boolean throwExceptionOnNull)
If no result is found it will throw an exception instead of returning a null
|
Object |
transform(Object in)
For a Given String mnemonic code lookup the Hierarchy of the Category
|
protected String searchBy
protected Class<T extends IHierarchialReference> type
protected boolean throwExceptionOnNull
protected abstract T query(Object value) throws Exception
public Object transform(Object in)
transform in interface org.apache.commons.collections.Transformerin - as value (some unique key), from which the parent object can be derivedpublic String getSearchBy()
public void setSearchBy(String searchBy)
public boolean isThrowExceptionOnNull()
public void setThrowExceptionOnNull(boolean throwExceptionOnNull)
Copyright © 2018. All rights reserved.