com.ibm.websphere.sdo.mediator.jdbc.metadata
Interface Column


public interface Column

A Column object describes a column in the database and how it maps to a DataObject Property


Field Summary
static int BIGDECIMAL
           
static int BLOB
           
static int BOOLEAN
           
static int BYTE
           
static int BYTES
           
static int CLOB
           
static int DATE
           
static int DOUBLE
           
static int FLOAT
           
static int INTEGER
           
static int LONG
           
static int OBJECT
           
static int SHORT
           
static int STRING
           
static int TIME
           
static int TIMESTAMP
           
 
Method Summary
 java.lang.String getName()
          Returns the value of the Name attribute.
 java.lang.String getPropertyName()
          Returns the value of the Property Name attribute.
 Table getTable()
          Return the 'Table' object that contains this Column.
 int getType()
          Returns the type of this Column object.
 boolean isNullable()
          Returns the value of the Nullable attribute.
 void setName(java.lang.String value)
          Sets the value of the 'Name' attribute.
 void setNullable(boolean value)
          Sets the value of the 'Nullable' attribute.
 void setPropertyName(java.lang.String value)
          Sets the value of the 'Property Name' attribute.
 void setTable(Table value)
          Sets the value of the 'Table' container reference.
 void setType(int value)
          Sets the value of the 'Type' attribute.
 

Field Detail

INTEGER

public static final int INTEGER
See Also:
Constant Field Values

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

STRING

public static final int STRING
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

OBJECT

public static final int OBJECT
See Also:
Constant Field Values

BIGDECIMAL

public static final int BIGDECIMAL
See Also:
Constant Field Values

DATE

public static final int DATE
See Also:
Constant Field Values

TIME

public static final int TIME
See Also:
Constant Field Values

TIMESTAMP

public static final int TIMESTAMP
See Also:
Constant Field Values

BLOB

public static final int BLOB
See Also:
Constant Field Values

CLOB

public static final int CLOB
See Also:
Constant Field Values

BYTES

public static final int BYTES
See Also:
Constant Field Values
Method Detail

getPropertyName

public java.lang.String getPropertyName()
Returns the value of the Property Name attribute. This value will be used to identify this Column in a DataObject. If the value is not specified, it defaults to the value of getName().

Returns:
the property name

setPropertyName

public void setPropertyName(java.lang.String value)
Sets the value of the 'Property Name' attribute.

Parameters:
value - the new value of the 'Property Name' attribute.
See Also:
getPropertyName()

getName

public java.lang.String getName()
Returns the value of the Name attribute. This must be the same as the name of the database column.

Returns:
the name

setName

public void setName(java.lang.String value)
Sets the value of the 'Name' attribute.

Parameters:
value - the new value of the 'Name' attribute.
See Also:
getName()

getType

public int getType()
Returns the type of this Column object. This defines how the database column will be accessed through JDBC. This may or may not be the same as the database column type. For example, given a column defined in the database as an INTEGER, you may want to access the value in a DataGraph as a boolean value. In this case, you would define the type as Column.BOOLEAN, and the JDBC data mediator service would access the data using ResultSet.getBoolean(). In cases like this, clients should consult the documentation for the JDBC driver being used to determine that the mapping that takes place is what is desired.

Returns:
the type

setType

public void setType(int value)
Sets the value of the 'Type' attribute.

Parameters:
value - the new value of the 'Type' attribute.
See Also:
getType()

isNullable

public boolean isNullable()
Returns the value of the Nullable attribute. If Nullable is false, a primitive type will be used to represent this Column in the DataGraph.

Returns:
the value of the Nullable attribute

setNullable

public void setNullable(boolean value)
Sets the value of the 'Nullable' attribute.

Parameters:
value - the new value of the 'Nullable' attribute.
See Also:
isNullable()

getTable

public Table getTable()
Return the 'Table' object that contains this Column.

Returns:
the containing table

setTable

public void setTable(Table value)
Sets the value of the 'Table' container reference.

Parameters:
value - the new value of the 'Table' container reference.
See Also:
getTable()