com.sun.jsfcl.data
Class DataCache.Column

java.lang.Object
  extended bycom.sun.jsfcl.data.DataCache.Column
All Implemented Interfaces:
java.util.Map.Entry, java.io.Serializable
Enclosing class:
DataCache

public class DataCache.Column
extends java.lang.Object
implements java.util.Map.Entry, java.io.Serializable

Column encapsulates the stored information about a single "column" of data, typically corresponding to a column from an individual row in an underlying relational database.

See Also:
Serialized Form

Method Summary
 void commit()
          If this column value has been updated, copy the current value to the original value and clear the updated state.
 java.lang.String getColumnName()
          Return the column name for this column as a String.
 java.lang.Class getJavaType()
          Return the Java type for this column.
 java.lang.Object getKey()
          Return the column name for this column.
 java.lang.Object getOriginal()
          Return the original value for this column.
 java.lang.Object getReplacement()
          Return the replacement value for this column, if any.
 java.lang.String getSchemaName()
          Return the name of the schema containing the table containing this column (if any); otherwise, return null.
 int getSqlType()
          Return the SQL type for this column.
 java.lang.String getTableName()
          Return the name of the table containing this column (if any); otherwise, return null.
 java.lang.Object getValue()
          Return the replacement value if this column has been updated; else return the original value.
 boolean isUpdated()
          Return true if the value for this column has been updated.
 void reset()
          Reset the updated state of this column, and throw away any reference to a replacement value.
 java.lang.Object setValue(java.lang.Object obj)
          If the specified value is different from the original value, save it and mark this column (and the containing row) as having been updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Method Detail

commit

public void commit()

If this column value has been updated, copy the current value to the original value and clear the updated state. Otherwise, do nothing.


getColumnName

public java.lang.String getColumnName()

Return the column name for this column as a String. This is a type-safe alias for getKey().


getKey

public java.lang.Object getKey()

Return the column name for this column.

Specified by:
getKey in interface java.util.Map.Entry

getSqlType

public int getSqlType()

Return the SQL type for this column.


getJavaType

public java.lang.Class getJavaType()

Return the Java type for this column.


getOriginal

public java.lang.Object getOriginal()

Return the original value for this column.


getReplacement

public java.lang.Object getReplacement()

Return the replacement value for this column, if any. This is only meaningful if isUpdated() returns true.


getSchemaName

public java.lang.String getSchemaName()

Return the name of the schema containing the table containing this column (if any); otherwise, return null.


getTableName

public java.lang.String getTableName()

Return the name of the table containing this column (if any); otherwise, return null.


getValue

public java.lang.Object getValue()

Return the replacement value if this column has been updated; else return the original value.

Specified by:
getValue in interface java.util.Map.Entry

isUpdated

public boolean isUpdated()

Return true if the value for this column has been updated.


reset

public void reset()

Reset the updated state of this column, and throw away any reference to a replacement value.


setValue

public java.lang.Object setValue(java.lang.Object obj)

If the specified value is different from the original value, save it and mark this column (and the containing row) as having been updated. Otherwise, take no action.

Specified by:
setValue in interface java.util.Map.Entry
Parameters:
obj - Replacement value for this column