be.SIRAPRISE.client.jsba
Class Attribute

java.lang.Object
  extended by be.SIRAPRISE.client.jsba.AbstractDBObject
      extended by be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
          extended by be.SIRAPRISE.client.jsba.Attribute
All Implemented Interfaces:
AttributelogicallengthToDBObject, AttributeToDBObject, DBObject, DBObjectToAttribute, DBObjectToAttributelogicallength, UpdatableDBObject

public final class Attribute
extends AbstractUpdatableDBObject
implements DBObjectToAttribute, AttributeToDBObject, DBObjectToAttributelogicallength, AttributelogicallengthToDBObject

Author:
Erwin Smout

Constructor Summary
Attribute()
          Creates an empty Attribute
Attribute(java.lang.String attributeName, java.lang.String typeName, int logicalLength)
          Creates the Attribute
 
Method Summary
 java.lang.String getAttributeAttributename()
          Gets the attributename for attribute
 java.lang.String getAttributelogicallengthAttributename()
          Gets the attributename for attributelogicallength
 java.lang.String getAttributelogicallengthLogicallength()
          Gets the logicallength for attributelogicallength
 java.lang.String getAttributeTypename()
          Gets the typename for attribute
 int getLogicalLength()
          Gets The logical length, or -1 if this doen't apply
 java.lang.String getName()
          Gets The attribute name
 UpdatableDBObject getPreUpdateState()
          Gets The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.
 java.lang.String getTypeName()
          Gets The type name
 void setAttributenameFromDB(java.lang.String attributeName)
          Sets attributename from the DB
 void setLogicalLength(int logicalLength)
          Sets The logicalLength
 void setLogicallengthFromDB(java.lang.String logicalLength)
          Sets logicallength from the DB
 void setName(java.lang.String attributeName)
          Sets The attribute name
 void setPreUpdateState()
          This method is called by the J/R bridging engine after an object has been setup from some tuple retrieved from the database.
 void setTypeName(java.lang.String typeName)
          Sets The type name
 void setTypenameFromDB(java.lang.String typeName)
          Sets typename from the DB
 
Methods inherited from class be.SIRAPRISE.client.jsba.AbstractUpdatableDBObject
dbUpdateCommand, dbUpdateCommand
 
Methods inherited from class be.SIRAPRISE.client.jsba.AbstractDBObject
dbAddCommand, dbAddCommand, dbAddCommand, dbAddCommandAll, dbAssertCommand, dbAssertCommand, dbAssertCommand, dbAssertCommandAll, dbDeleteCommand, dbDeleteCommand, dbDeleteCommand, dbDeleteCommandAll, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommand, dbUnAssertCommandAll
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute()
Creates an empty Attribute


Attribute

public Attribute(java.lang.String attributeName,
                 java.lang.String typeName,
                 int logicalLength)
Creates the Attribute

Parameters:
attributeName - The attribute name
typeName - The type name
logicalLength - The logical length, or -1 if not applicable or unknown or irrelevant
Method Detail

getAttributeAttributename

public final java.lang.String getAttributeAttributename()
Description copied from interface: DBObjectToAttribute
Gets the attributename for attribute

Specified by:
getAttributeAttributename in interface DBObjectToAttribute
Returns:
The attributename for attribute

getAttributelogicallengthAttributename

public java.lang.String getAttributelogicallengthAttributename()
Description copied from interface: DBObjectToAttributelogicallength
Gets the attributename for attributelogicallength

Specified by:
getAttributelogicallengthAttributename in interface DBObjectToAttributelogicallength
Returns:
The attributename for attributelogicallength

getAttributelogicallengthLogicallength

public java.lang.String getAttributelogicallengthLogicallength()
Description copied from interface: DBObjectToAttributelogicallength
Gets the logicallength for attributelogicallength

Specified by:
getAttributelogicallengthLogicallength in interface DBObjectToAttributelogicallength
Returns:
The logicallength for attributelogicallength

getAttributeTypename

public final java.lang.String getAttributeTypename()
Description copied from interface: DBObjectToAttribute
Gets the typename for attribute

Specified by:
getAttributeTypename in interface DBObjectToAttribute
Returns:
The typename for attribute

getLogicalLength

public final int getLogicalLength()
Gets The logical length, or -1 if this doen't apply

Returns:
The logical length, or -1 if this doen't apply

getName

public final java.lang.String getName()
Gets The attribute name

Returns:
The attribute name.

getPreUpdateState

public final UpdatableDBObject getPreUpdateState()
Description copied from interface: UpdatableDBObject
Gets The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.

Specified by:
getPreUpdateState in interface UpdatableDBObject
Returns:
The state of the object as it was built by the J/R bridging engine immediately after the object was created from a database tuple (and which should have been set by/using the setPreUpdateState() method.

getTypeName

public final java.lang.String getTypeName()
Gets The type name

Returns:
The type name.

setAttributenameFromDB

public final void setAttributenameFromDB(java.lang.String attributeName)
Description copied from interface: AttributeToDBObject
Sets attributename from the DB

Specified by:
setAttributenameFromDB in interface AttributelogicallengthToDBObject
Specified by:
setAttributenameFromDB in interface AttributeToDBObject
Parameters:
attributeName - The DB value for attributename

setLogicalLength

public final void setLogicalLength(int logicalLength)
Sets The logicalLength

Parameters:
logicalLength - The logicalLength to set.

setLogicallengthFromDB

public void setLogicallengthFromDB(java.lang.String logicalLength)
Description copied from interface: AttributelogicallengthToDBObject
Sets logicallength from the DB

Specified by:
setLogicallengthFromDB in interface AttributelogicallengthToDBObject
Parameters:
logicalLength - The DB value for logicallength

setName

public final void setName(java.lang.String attributeName)
Sets The attribute name

Parameters:
attributeName - The attributeName to set.

setPreUpdateState

public final void setPreUpdateState()
Description copied from interface: UpdatableDBObject
This method is called by the J/R bridging engine after an object has been setup from some tuple retrieved from the database. The method must cause the object to save a copy (/clone) of all the fields that are pertinent to the database. This copy will be retrieved by the J/R bridging engine using the getPreUpdateState() method call, and will subsequently be used by the J/R bridging engine to determine which fields have changed value, and thus to determine which attributes need to be updated in the database.

Specified by:
setPreUpdateState in interface UpdatableDBObject

setTypeName

public final void setTypeName(java.lang.String typeName)
Sets The type name

Parameters:
typeName - The typeName to set.

setTypenameFromDB

public final void setTypenameFromDB(java.lang.String typeName)
Description copied from interface: AttributeToDBObject
Sets typename from the DB

Specified by:
setTypenameFromDB in interface AttributeToDBObject
Parameters:
typeName - The DB value for typename