com.bristle.javalib.sql.dictionary
Class DictionaryEntry

java.lang.Object
  extended by com.bristle.javalib.sql.dictionary.DictionaryEntry

public class DictionaryEntry
extends Object

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$


Constructor Summary
DictionaryEntry()
          Default constructor.
DictionaryEntry(int intId)
          Constructor
DictionaryEntry(int intId, DictionaryEntry internalCategory, String strCategory, String strTerm, String strDefinition, String strNotes, String strCreateUser, String strCreateDT, String strUpdateUser, String strUpdateDT, DictionaryEntry status)
          Constructor
DictionaryEntry(int intId, String strTerm, String strDefinition)
          Constructor
 
Method Summary
 String getCategory()
          Get the category.
 String getCreateDT()
          Get the date and time at which it was created.
 String getCreateUser()
          Get the username of the user who created it.
 String getDefinition()
          Get the definition.
 int getId()
          Get the id.
 DictionaryEntry getInternalCategory()
          Get the internal category.
 String getNotes()
          Get the notes.
 DictionaryEntry getStatus()
          Get the status.
 String getTerm()
          Get the term.
 String getUpdateDT()
          Get the date and time at which it was last updated.
 String getUpdateUser()
          Get the username of the user who last updated it.
 void setAll(int intId, DictionaryEntry internalCategory, String strCategory, String strTerm, String strDefinition, String strNotes, String strCreateUser, String strCreateDT, String strUpdateUser, String strUpdateDT, DictionaryEntry status)
          Set all properties.
 void setCategory(String strVal)
          Set the category.
 void setCreateDT(String strVal)
          Set the date and time at which it was created.
 void setCreateUser(String strVal)
          Set the username of the user who created it.
 void setDefinition(String strVal)
          Set the definition.
 void setId(int intVal)
          Set the id.
 void setInternalCategory(DictionaryEntry 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 setStatus(DictionaryEntry objVal)
          Set the status.
 void setTerm(String strVal)
          Set the term.
 void setUpdateDT(String strVal)
          Set the date and time at which it was last updated.
 void setUpdateUser(String strVal)
          Set the username of the user who last updated it.
 void shallowCopyFrom(DictionaryEntry objFrom)
          Do a shallow copy of all properties from the specified object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryEntry

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


DictionaryEntry

public DictionaryEntry(int intId)
Constructor

Parameters:
intId - The property value.

DictionaryEntry

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

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

DictionaryEntry

public DictionaryEntry(int intId,
                       DictionaryEntry internalCategory,
                       String strCategory,
                       String strTerm,
                       String strDefinition,
                       String strNotes,
                       String strCreateUser,
                       String strCreateDT,
                       String strUpdateUser,
                       String strUpdateDT,
                       DictionaryEntry 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,
                   DictionaryEntry internalCategory,
                   String strCategory,
                   String strTerm,
                   String strDefinition,
                   String strNotes,
                   String strCreateUser,
                   String strCreateDT,
                   String strUpdateUser,
                   String strUpdateDT,
                   DictionaryEntry 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(DictionaryEntry 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.

getId

public int getId()
Get the id.

Returns:
The id.

setId

public void setId(int intVal)
Set the id.

Parameters:
intVal - The value to set.

getInternalCategory

public DictionaryEntry getInternalCategory()
Get the internal category.

Returns:
The internal category.

setInternalCategory

public void setInternalCategory(DictionaryEntry 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.

getCreateUser

public String getCreateUser()
Get the username of the user who created it.

Returns:
The username.

setCreateUser

public void setCreateUser(String strVal)
Set the username of the user who created it.

Parameters:
strVal - The value to set.

getCreateDT

public String getCreateDT()
Get the date and time at which it was created.

Returns:
The date/time.

setCreateDT

public void setCreateDT(String strVal)
Set the date and time at which it was created.

Parameters:
strVal - The value to set.

getUpdateUser

public String getUpdateUser()
Get the username of the user who last updated it.

Returns:
The username.

setUpdateUser

public void setUpdateUser(String strVal)
Set the username of the user who last updated it.

Parameters:
strVal - The value to set.

getUpdateDT

public String getUpdateDT()
Get the date and time at which it was last updated.

Returns:
The date/time.

setUpdateDT

public void setUpdateDT(String strVal)
Set the date and time at which it was last updated.

Parameters:
strVal - The value to set.

getStatus

public DictionaryEntry getStatus()
Get the status.

Returns:
The status.

setStatus

public void setStatus(DictionaryEntry objVal)
Set the status. The statuses themselves are additional dictionary entries, and typically have values like "ACTIVE", "ARCHIVED", "DELETED", etc.

Parameters:
objVal - The value to set.