com.ibm.db2.tools.repl.publication
Class ColumnSchema

java.lang.Object
  |
  +--com.ibm.db2.tools.repl.publication.ColumnSchema

public class ColumnSchema
extends java.lang.Object

The ColumnSchema class reprenents a column defintion in a table. These objects are used in the SubscriptionSchemaMsg and the AddColumnSchemaMsg.


Field Summary
protected  int codepage
           
protected  boolean key
           
protected  int length
           
protected  java.lang.String name
           
protected  int precision
           
protected  int scale
           
protected  java.lang.String type
           
 
Constructor Summary
ColumnSchema()
           
 
Method Summary
 int getCodepage()
          Returns the codepage of the column.
 int getJDBCType()
          Returns the datatype of the column as a JDBC type.
 int getLength()
          Returns the length of the column.
 java.lang.String getName()
          Returns the name of the column.
 int getPrecision()
          Returns the precision of the column.
 int getScale()
          Returns the scale of the column.
 java.lang.String getType()
          Returns the datatype of the column.
 boolean isKey()
          Returns true if the column is a key column.
 void setCodepage(int i)
          This method has no effect when used by a PublicationListener.
 void setKey(boolean b)
          This method has no effect when used by a PublicationListener.
 void setLength(int i)
          This method has no effect when used by a PublicationListener.
 void setName(java.lang.String string)
          This method has no effect when used by a PublicationListener.
 void setPrecision(int i)
          This method has no effect when used by a PublicationListener.
 void setScale(int i)
          This method has no effect when used by a PublicationListener.
 void setType(java.lang.String string)
          This method has no effect when used by a PublicationListener.
 java.lang.String toString()
          Override so we can print the values in a nice textual format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

type

protected java.lang.String type

length

protected int length

precision

protected int precision

scale

protected int scale

codepage

protected int codepage

key

protected boolean key
Constructor Detail

ColumnSchema

public ColumnSchema()
Method Detail

getCodepage

public int getCodepage()
Returns the codepage of the column. If the column does not have a codepage, like an integer column, this returns 0.

Returns:
int The codepage of the column, or 0 if not valid.

isKey

public boolean isKey()
Returns true if the column is a key column.

Returns:
boolean True: The column is a key column. False: The column is not part of a key.

getLength

public int getLength()
Returns the length of the column. If the column does not have a length, like an integer column, this returns 0.

Returns:
int The length of the column, or 0 if not valid.

getName

public java.lang.String getName()
Returns the name of the column.

Returns:
String The column name.

getPrecision

public int getPrecision()
Returns the precision of the column. If the column does not have a precision, like an integer column, this returns 0.

Returns:
int The precision of the column, or 0 if not valid.

getScale

public int getScale()
Returns the scale of the column. If the column does not have a scale, like an integer column, this returns 0.

Returns:
int The scale of the column, or 0 if not valid.

getType

public java.lang.String getType()
Returns the datatype of the column.

Returns:
String The datatype of the column.

getJDBCType

public int getJDBCType()
Returns the datatype of the column as a JDBC type.

Returns:
int The JDBC datatype of the column.

setCodepage

public void setCodepage(int i)
This method has no effect when used by a PublicationListener.

Parameters:
i -

setKey

public void setKey(boolean b)
This method has no effect when used by a PublicationListener.

Parameters:
b -

setLength

public void setLength(int i)
This method has no effect when used by a PublicationListener.

Parameters:
i -

setName

public void setName(java.lang.String string)
This method has no effect when used by a PublicationListener.

Parameters:
string -

setPrecision

public void setPrecision(int i)
This method has no effect when used by a PublicationListener.

Parameters:
i -

setScale

public void setScale(int i)
This method has no effect when used by a PublicationListener.

Parameters:
i -

setType

public void setType(java.lang.String string)
This method has no effect when used by a PublicationListener.

Parameters:
string -

toString

public java.lang.String toString()
Override so we can print the values in a nice textual format.

Overrides:
toString in class java.lang.Object
Returns:
String Formatted output of all the instance variables.