com.pega.pegarules.pub.database
Class Column

java.lang.Object
  extended by com.pega.pegarules.pub.database.Column

public final class Column
extends java.lang.Object


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Constructor Summary
Column(Column aColumn, java.lang.String aName)
          Creates a copy of the column, with a new name.
Column(java.lang.String aName, com.pega.pegarules.priv.database.DatabaseStateToken aStateToken, int aPos, int aType, boolean aIsKey, java.lang.String aDescr, int aLength, boolean aNullable)
          Deprecated. use the constructor that takes a catalog and schema name
Column(java.lang.String aCatalog, java.lang.String aSchema, java.lang.String aTable, java.lang.String aName, com.pega.pegarules.priv.database.DatabaseStateToken aStateToken, int aPos, int aType, java.lang.String aDBTypeName, boolean aIsKey, java.lang.String aDescr, int aLength, boolean aNullable)
          Creates a column.
 
Method Summary
 java.lang.String getCatalog()
          Return the catalog.
 java.lang.String getDBTypeName()
          Return the type of this column.
 java.lang.String getDescr()
          Gets the descr
 int getLength()
          Returns the length or precision of the column.
 java.lang.String getName()
          Gets the name of the column
 int getPosition()
          Returns the position of the column.
 java.lang.String getSchema()
          Return the schema.
 java.lang.String getTable()
          Return the table.
 int getType()
          Gets the type of the column.
 boolean isKey()
          Is this column a key?
 boolean isNullable()
          May be column contain null values?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Constructor Detail

Column

public Column(java.lang.String aName,
              com.pega.pegarules.priv.database.DatabaseStateToken aStateToken,
              int aPos,
              int aType,
              boolean aIsKey,
              java.lang.String aDescr,
              int aLength,
              boolean aNullable)
Deprecated. use the constructor that takes a catalog and schema name

Creates a column.

Parameters:
aName - the name of the column, or null if unknown
aStateToken -
aPos - the position of the column, if known
aType - the type of the column--must be from java.sql.Types
aIsKey - is this column a key?
aDescr - a description of the column (or null if there is none)
aLength - length of precision of the column, or a negative number if it is unknown
aNullable - can the column value be null?

Column

public Column(java.lang.String aCatalog,
              java.lang.String aSchema,
              java.lang.String aTable,
              java.lang.String aName,
              com.pega.pegarules.priv.database.DatabaseStateToken aStateToken,
              int aPos,
              int aType,
              java.lang.String aDBTypeName,
              boolean aIsKey,
              java.lang.String aDescr,
              int aLength,
              boolean aNullable)
Creates a column.

Parameters:
aCatalog - the catalog the column is defined in
aSchema - the schema the column is defined in
aTable - the table the column is defined in
aName - the name of the column
aStateToken -
aPos - the position of the column
aType - the type of the column--must be from java.sql.Types
aDBTypeName - the name of the column type, as given by the database product
aIsKey - is this column a key?
aDescr - a description of the column (or null if there is none)
aLength - length of precision of the column
aNullable - can the column value be null?

Column

public Column(Column aColumn,
              java.lang.String aName)
Creates a copy of the column, with a new name.

Parameters:
aColumn - the column to copy
aName - the new name
Method Detail

getName

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

Returns:
the name of the column, or null if unknown

getType

public int getType()
Gets the type of the column.

Returns:
one of the colun types from java.sql.Types

getDescr

public java.lang.String getDescr()
Gets the descr

Returns:
Returns a String

isNullable

public boolean isNullable()
May be column contain null values?

Returns:
false if we know that it cannot, true if it can or if we are unsure

getLength

public int getLength()
Returns the length or precision of the column.

Returns:
the length or precision of the column, or -1 if it is unknown

isKey

public boolean isKey()
Is this column a key?

Returns:
true if it is

getPosition

public int getPosition()
Returns the position of the column.

Returns:
the position of the column

getCatalog

public java.lang.String getCatalog()
Return the catalog.

Returns:
the catalog in which this property is defined

getSchema

public java.lang.String getSchema()
Return the schema.

Returns:
the schema in which this property is defined

getTable

public java.lang.String getTable()
Return the table.

Returns:
the table in which this property is defined

getDBTypeName

public java.lang.String getDBTypeName()
Return the type of this column.

Returns:
the type of this column, as described by the database product

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012 Pegasystems Inc. All Rights Reserved.