com.taggercat.model
Class CodeTable
java.lang.Object
com.taggercat.model.CodeTable
public class CodeTable
- extends java.lang.Object
This class represents code tables, AKA lookup tables. Code tables must be identified
in the meta data as such.
Code tables typically contain at least an ID and Description field.
Code tables are cached using Hibernate's second level cache.
-
|
Constructor Summary |
CodeTable(org.hibernate.SessionFactory sessionFactory,
java.lang.String entityName,
java.lang.String codePropertyName,
java.lang.String displayPropertyName,
java.util.List<java.lang.String> projectedProperties)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CodeTable
public CodeTable(org.hibernate.SessionFactory sessionFactory,
java.lang.String entityName,
java.lang.String codePropertyName,
java.lang.String displayPropertyName,
java.util.List<java.lang.String> projectedProperties)
getCodeValue
public java.lang.String getCodeValue(java.lang.Object entity)
getDisplayValue
public java.lang.String getDisplayValue(java.lang.Object entity)
getPropertyValue
public java.lang.Object getPropertyValue(java.lang.Object entity,
java.lang.String property)
getResults
public java.util.List getResults()
iterator
public java.util.Iterator iterator()
setResults
public void setResults(java.util.List<?> results)
getEntityName
public java.lang.String getEntityName()
setEntityName
public void setEntityName(java.lang.String entityName)
getCodeProperty
public java.lang.String getCodeProperty()
setCodeProperty
public void setCodeProperty(java.lang.String codeField)
getDisplayProperty
public java.lang.String getDisplayProperty()
setDisplayProperty
public void setDisplayProperty(java.lang.String displayField)
getEntity
public java.lang.Object getEntity(java.lang.String codeValue)
reverseLookup
public java.lang.String reverseLookup(java.lang.String displayValue)
getCodeTable
public static CodeTable getCodeTable(java.lang.String entityName,
javax.servlet.ServletContext servletContext,
org.hibernate.Session rsession)
throws java.lang.Exception
- Throws:
java.lang.Exception
isCodeTable
public static boolean isCodeTable(java.lang.String entityName)
throws java.lang.Exception
- Throws:
java.lang.Exception
getCodeTable
public static CodeTable getCodeTable(java.lang.String entityName,
javax.servlet.ServletContext servletContext,
org.hibernate.Session rsession,
java.lang.String tenantName)
throws java.lang.Exception
- Throws:
java.lang.Exception
getProjectedProperties
public java.util.List<java.lang.String> getProjectedProperties()
setProjectedProperties
public void setProjectedProperties(java.util.List<java.lang.String> projectedProperties)