com.bristle.javalib.sql.bristle
Class AbstractStandardTableBackedObject

java.lang.Object
  extended by com.bristle.javalib.sql.bristle.AbstractStandardTableBackedObject
Direct Known Subclasses:
AbstractDictionaryEntry, AbstractSecurableStandardTableBackedObject

public abstract class AbstractStandardTableBackedObject
extends Object

This abstract class carries data for a single object that is backed by a table in a database, including all of the fields that are required to exist in all database tables according to the Bristle Software database standards.

Usage:

   - The typical scenarios for using this class are:

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


Constructor Summary
AbstractStandardTableBackedObject()
           
 
Method Summary
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 getCreateDT()
          Get the date and time at which it was created.
 String getCreateUser()
          Get the username of the user who created it.
static int getDefaultNullClassId()
          Get the default the value that indicates a null id of the class of objects.
static int getDefaultNullId()
          Get the default for the value that indicates a null id.
 int getId()
          Get the id.
 int getNullClassId()
          Get the value that indicates a null id of the class of objects.
 int getNullId()
          Get the value that indicates a null id.
 AbstractDictionaryEntry getStatus()
          Get the status.
abstract  String getTableName()
          Get the name of the database table that holds the class of objects.
 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 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 setId(int intVal)
          Set the id.
 void setStatus(AbstractDictionaryEntry objVal)
          Set the status.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStandardTableBackedObject

public AbstractStandardTableBackedObject()
Method Detail

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.

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 AbstractDictionaryEntry getStatus()
Get the status.

Returns:
The status.

setStatus

public void setStatus(AbstractDictionaryEntry objVal)
Set the status.

Parameters:
objVal - The value to set.

getNullId

public int getNullId()
Get the value that indicates a null id.
 Implementation Note:
   Not abstract, so subclasses can implicitly use the default value for 
   null id.

Returns:
The null id.

getDefaultNullId

public static int getDefaultNullId()
Get the default for the value that indicates a null id.
 Implementation Note:
   Not abstract, so subclasses can explicitly choose if and when to use 
   the default value for null id.

Returns:
The default value.

getClassId

public abstract int getClassId()
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.

Returns:
The class id.

getNullClassId

public int getNullClassId()
Get the value that indicates a null id of the class of objects.
 Implementation Note:
   Not abstract, so subclasses can implicitly use the default value for 
   null class id.

Returns:
The null class id.

getDefaultNullClassId

public static int getDefaultNullClassId()
Get the default the value that indicates a null id of the class of objects.
 Implementation Note:
   Not abstract, so subclasses can explicitly choose if and when to use 
   the default value for null class id.

Returns:
The default value.

getTableName

public abstract String getTableName()
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.

Returns:
The table name.

getCLASS_OF_OBJECTS

public abstract AbstractStandardTableBackedObject getCLASS_OF_OBJECTS()
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.

Returns:
The special instance.