com.bristle.javalib.sql.dictionary
Class AbstractDictionaryEntry

java.lang.Object
  extended by com.bristle.javalib.sql.bristle.AbstractStandardTableBackedObject
      extended by com.bristle.javalib.sql.dictionary.AbstractDictionaryEntry

public abstract class AbstractDictionaryEntry
extends AbstractStandardTableBackedObject

This class carries data for a single dictionary entry. It is useful for any object that requires no more properties than those defined here (numeric id, term, definition, notes, status, etc.) and is commonly mapped to a dictionary or lookup table in a database.

Usage:

   - The typical scenarios for using this class are:

Assumptions:
Effects:
       - None.
Anticipated Changes:
Notes:
Implementation Notes:
Portability Issues:
Revision History:
   $Log$


Field Summary
private  AbstractDictionaryEntry m_internalCategory
           
private  String m_strCategory
           
private  String m_strDefinition
           
private  String m_strNotes
           
private  String m_strTerm
           
private static long serialVersionUID
          This number identifies the version of the class definition, used for serialized instances.
 
Constructor Summary
AbstractDictionaryEntry()
          Default constructor.
AbstractDictionaryEntry(int intId)
          Constructor
AbstractDictionaryEntry(int intId, AbstractDictionaryEntry internalCategory, String strCategory, String strTerm, String strDefinition, String strNotes, String strCreateUser, String strCreateDT, String strUpdateUser, String strUpdateDT, AbstractDictionaryEntry status)
          Constructor
AbstractDictionaryEntry(int intId, String strTerm, String strDefinition)
          Constructor
 
Method Summary
 String getCategory()
          Get the category.
abstract  AbstractStandardTableBackedObject getCLASS_OF_OBJECTS()
          Get the special instance that indicates the class of objects instead of any one particular instance.
abstract  int getClassId()
          Get the id of the class of objects.
 String getDefinition()
          Get the definition.
 AbstractDictionaryEntry getInternalCategory()
          Get the internal category.
 String getNotes()
          Get the notes.
abstract  String getTableName()
          Get the name of the database table that holds the class of objects.
 String getTerm()
          Get the term.
 void setAll(int intId, AbstractDictionaryEntry internalCategory, String strCategory, String strTerm, String strDefinition, String strNotes, String strCreateUser, String strCreateDT, String strUpdateUser, String strUpdateDT, AbstractDictionaryEntry status)
          Set all properties.
 void setCategory(String strVal)
          Set the category.
 void setDefinition(String strVal)
          Set the definition.
 void setInternalCategory(AbstractDictionaryEntry objVal)
          Set the internal category.
 void setMinimalFields(int intId, String strTerm, String strDefinition)
          Set only the properties required to use the dictionary entry, without concern for editing it, maintaining it, etc.
 void setNotes(String strVal)
          Set the notes.
 void setTerm(String strVal)
          Set the term.
 void shallowCopyFrom(AbstractDictionaryEntry objFrom)
          Do a shallow copy of all properties from the specified object.
 
Methods inherited from class com.bristle.javalib.sql.bristle.AbstractStandardTableBackedObject
getCreateDT, getCreateUser, getDefaultNullClassId, getDefaultNullId, getId, getNullClassId, getNullId, getStatus, getUpdateDT, getUpdateUser, setAll, setCreateDT, setCreateUser, setId, setStatus, setUpdateDT, setUpdateUser, shallowCopyFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_internalCategory

private AbstractDictionaryEntry m_internalCategory

m_strCategory

private String m_strCategory

m_strTerm

private String m_strTerm

m_strDefinition

private String m_strDefinition

m_strNotes

private String m_strNotes

serialVersionUID

private static final long serialVersionUID
This number identifies the version of the class definition, used for serialized instances. Be sure to increment it when adding/modifying instance variable definitions or making any other change to the class definition. Omitting this declaration causes a compiler warning for any class that implements java.io.Serializable.

See Also:
Constant Field Values
Constructor Detail

AbstractDictionaryEntry

public AbstractDictionaryEntry()
Default constructor. Must be explicitly declared since there are other declared constructors.


AbstractDictionaryEntry

public AbstractDictionaryEntry(int intId)
Constructor

Parameters:
intId - The property value.

AbstractDictionaryEntry

public AbstractDictionaryEntry(int intId,
                               String strTerm,
                               String strDefinition)
Constructor

Parameters:
intId - The property value.
strTerm - The property value.
strDefinition - The property value.

AbstractDictionaryEntry

public AbstractDictionaryEntry(int intId,
                               AbstractDictionaryEntry internalCategory,
                               String strCategory,
                               String strTerm,
                               String strDefinition,
                               String strNotes,
                               String strCreateUser,
                               String strCreateDT,
                               String strUpdateUser,
                               String strUpdateDT,
                               AbstractDictionaryEntry status)
Constructor

Parameters:
intId - The property value.
internalCategory - The property value.
strCategory - The property value.
strTerm - The property value.
strDefinition - The property value.
strNotes - The property value.
strCreateUser - The property value.
strCreateDT - The property value.
strUpdateUser - The property value.
strUpdateDT - The property value.
status - The property value.
Method Detail

setAll

public void setAll(int intId,
                   AbstractDictionaryEntry internalCategory,
                   String strCategory,
                   String strTerm,
                   String strDefinition,
                   String strNotes,
                   String strCreateUser,
                   String strCreateDT,
                   String strUpdateUser,
                   String strUpdateDT,
                   AbstractDictionaryEntry status)
Set all properties. Use this whenever you want to be sure that properties added in the future are also set. Once this method is updated to include a new property, all calls will fail to compile unless they are also updated.

Parameters:
intId - The property value.
internalCategory - The property value.
strCategory - The property value.
strTerm - The property value.
strDefinition - The property value.
strNotes - The property value.
strCreateUser - The property value.
strCreateDT - The property value.
strUpdateUser - The property value.
strUpdateDT - The property value.
status - The property value.

shallowCopyFrom

public void shallowCopyFrom(AbstractDictionaryEntry objFrom)
Do a shallow copy of all properties from the specified object.

Parameters:
objFrom - The object to copy from.

setMinimalFields

public void setMinimalFields(int intId,
                             String strTerm,
                             String strDefinition)
Set only the properties required to use the dictionary entry, without concern for editing it, maintaining it, etc.

Parameters:
intId - The property value.
strTerm - The property value.
strDefinition - The property value.

getClassId

public abstract int getClassId()
Description copied from class: AbstractStandardTableBackedObject
Get the id of the class of objects.
 Implementation Note:
   Abstract to force each subclass to explicitly specify its class id.
   If a subclass doesn't care about class id, it can call getNullClassId() 
   from its override.

Specified by:
getClassId in class AbstractStandardTableBackedObject
Returns:
The class id.
See Also:
 Implementation Note:
   Abstract to force each subclass to explicitly specify its class id.
   If a subclass doesn't care about class id, it can call getNullClassId() 
   from its override.

getCLASS_OF_OBJECTS

public abstract AbstractStandardTableBackedObject getCLASS_OF_OBJECTS()
Description copied from class: AbstractStandardTableBackedObject
Get the special instance that indicates the class of objects instead of any one particular instance.
 Implementation Note:
   Abstract to force each subclass to explicitly specify an instance of 
   itself to represent its entire class.

Specified by:
getCLASS_OF_OBJECTS in class AbstractStandardTableBackedObject
Returns:
The special instance.
See Also:
 Implementation Note:
   Abstract to force each subclass to explicitly specify an instance of 
   itself to represent its entire class.

getTableName

public abstract String getTableName()
Description copied from class: AbstractStandardTableBackedObject
Get the name of the database table that holds the class of objects.
 Implementation Note:
   Abstract to force each subclass to explicitly specify its table name.

Specified by:
getTableName in class AbstractStandardTableBackedObject
Returns:
The table name.
See Also:
 Implementation Note:
   Abstract to force each subclass to explicitly specify its table name.

getInternalCategory

public AbstractDictionaryEntry getInternalCategory()
Get the internal category.

Returns:
The internal category.

setInternalCategory

public void setInternalCategory(AbstractDictionaryEntry objVal)
Set the internal category. This value is typically hidden from the user and used internally to partition the entries in the dictionary into categories like those that are used internally by the system and those that are visible to the users. The categories themselves are additional dictionary entries. Multiple user visible categories typically have the same value for internal category, but different values for category.

Parameters:
objVal - The value to set.

getCategory

public String getCategory()
Get the category.

Returns:
The category.

setCategory

public void setCategory(String strVal)
Set the category.

Parameters:
strVal - The value to set.

getTerm

public String getTerm()
Get the term.

Returns:
The term.

setTerm

public void setTerm(String strVal)
Set the term.

Parameters:
strVal - The value to set.

getDefinition

public String getDefinition()
Get the definition.

Returns:
The definition.

setDefinition

public void setDefinition(String strVal)
Set the definition.

Parameters:
strVal - The value to set.

getNotes

public String getNotes()
Get the notes.

Returns:
The notes.

setNotes

public void setNotes(String strVal)
Set the notes.

Parameters:
strVal - The value to set.