public class Classification extends DataObject implements java.security.Principal, java.lang.Comparable<Classification>, Owned
This class can be used directly (passing the table name to the constructor) or it can be subclassed to improve type safety and specify a default table.
The name value should be unique within the table. Table entries rarely change and may be populated manually.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION |
protected ClassificationFactory |
fac |
static java.lang.String |
NAME |
static java.lang.String |
SORT_ORDER |
DEBUG, record
MAX_IDENTIFIER
Modifier | Constructor and Description |
---|---|
protected |
Classification(Repository.Record res,
ClassificationFactory fac) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Classification o) |
java.lang.String |
getDescription() |
ClassificationFactory |
getFactory() |
java.lang.String |
getIdentifier(int max_length)
Generate Identifier with advisory max length.
|
java.lang.String |
getName() |
static TableSpecification |
getTableSpecification(AppContext c,
java.lang.String table)
Generate a default
TableSpecification for a Classification table |
protected void |
post_commit(boolean changed)
Extension point called at end of commit
|
void |
setDescription(java.lang.String desc) |
void |
setName(java.lang.String name) |
java.lang.String |
toString() |
addToMap, addToMap, addToMap, commit, delete, empty, equals, formUpdate, getContext, getDatabaseService, getFactoryTag, getID, getIdentifier, getLogger, getMap, getMap, getOwningFactory, getRecord, getRecord, getRecord, getSQLContext, getUniqueIdName, hashCode, isLocked, lock, postCreate, pre_commit, release, setContents, setDirty, setMap
public static final java.lang.String SORT_ORDER
public static final java.lang.String DESCRIPTION
public static final java.lang.String NAME
protected ClassificationFactory fac
protected Classification(Repository.Record res, ClassificationFactory fac)
public java.lang.String getName()
getName
in interface java.security.Principal
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String desc)
public java.lang.String getIdentifier(int max_length)
Identified
getIdentifier
in interface Identified
getIdentifier
in class DataObject
max_length
- advisory max lengthpublic java.lang.String toString()
toString
in interface java.security.Principal
toString
in class DataObject
public static TableSpecification getTableSpecification(AppContext c, java.lang.String table)
TableSpecification
for a Classification tablec
- public int compareTo(Classification o)
compareTo
in interface java.lang.Comparable<Classification>
protected void post_commit(boolean changed) throws DataFault
DataObject
post_commit
in class DataObject
changed
- record was changed by commit.DataFault
public final ClassificationFactory getFactory()
getFactory
in interface Owned