com.ibm.dse.tools.workbench.base
Class AttributesTable

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.base.AbstractTable
        |
        +--com.ibm.dse.tools.workbench.base.AttributesTable

public class AttributesTable
extends AbstractTable
implements TypedTable

This class represents a table of attributes


Field Summary
static int ATTATTFK
          The identifiers for the relationship ATTATTFK
static int ATTRIBUTE_REF
          The identifier for the ATTRIBUTE_REF column
static int CK_EXTERNALIZE
          The identifiers for the check constraint CK_EXTERNALIZE
static int CK_REQUIRED
          The identifiers for the check constraint CK_REQUIRED
static int CODE
          The identifier for the CODE column
static int DATATYPE
          The identifier for the DATATYPE column
static int DEFAULT_VALUE
          The identifier for the DEFAULT_VALUE column
static int DESCRIPTION
          The identifier for the DESCRIPTION column
static int DOMAIN
          The identifier for the DOMAIN column
static int ENTITY
          The identifier for the ENTITY column
static int ENTITY_REF
          The identifier for the ENTITY_REF column
static int EXTERNALIZE
          The identifier for the EXTERNALIZE column
static int LABEL
          The identifier for the LABEL column
static int NAME
          The identifier for the NAME column
static int PRPATTFK
          The identifiers for the relationship PRPATTFK
static int REQUIRED
          The identifier for the REQUIRED column
 
Fields inherited from class com.ibm.dse.tools.workbench.base.AbstractTable
alias, checks, columnLengths, columns, DATA_DELIMITER, DATA_SEPARATOR, deletedRows, ESCAPE_SEQUENCE, fks, indexes, insertedRows, modifiedRows, name, pk, relations, repository, required, rows, triggers
 
Constructor Summary
AttributesTable(Repository rpstry)
          This constructor creates a AttributesTable object in a repository
 
Method Summary
 void createRelations()
          This method creates the relationships for a table
 TableRow[][] getAvailableRefInstanceProperty(TableRow attribute)
          This method returns a bidimensional array of TableRows, with the instance and property that matches the reference condition for the given attribute.
 TableRow[] getAvailableRefProperties(TableRow attribute)
          This method returns an array of properties that matches the reference condition of the given attribute.
 java.lang.String getDatatype(TableRow row)
          Returns the datatype for the values in a row
 java.lang.Object getValueAsObject(TableRow row, int column)
          Returns the datatype for the values in a row
 boolean hasSelfGeneratedPk()
          This table has self-generated primary key
 java.lang.String[] validate(TableRow attribute)
          This method checks the correctness of an attribute row based on application rules
 
Methods inherited from class com.ibm.dse.tools.workbench.base.AbstractTable
add, areTriggersActive, cleanRollbackData, count, createTableRow, createTableRow, exportToFile, flush, getAlias, getChecks, getChecks, getColumnLengths, getColumns, getColumnsString, getColumnsString, getConnection, getCreateChecksStrings, getCreateFksStrings, getCreateIndexesStrings, getCreatePkString, getCreateTableString, getDefaultVersion, getFks, getIndexes, getName, getPk, getPkValue, getRelated, getRelations, getRepository, getTimestamp, getUniqueValue, importFromString, isInPk, isRequired, postDelete, postInsert, postUpdate, preDelete, preInsert, preUpdate, registerDeletedRow, registerInsertedRow, registerModifiedRow, removeFromList, restoreRows, retrieveAll, retrieveByPk, retrieveDistinct, setAlias, setRepository, setTriggersState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE

public static final int CODE
The identifier for the CODE column

ENTITY

public static final int ENTITY
The identifier for the ENTITY column

NAME

public static final int NAME
The identifier for the NAME column

DATATYPE

public static final int DATATYPE
The identifier for the DATATYPE column

DEFAULT_VALUE

public static final int DEFAULT_VALUE
The identifier for the DEFAULT_VALUE column

LABEL

public static final int LABEL
The identifier for the LABEL column

REQUIRED

public static final int REQUIRED
The identifier for the REQUIRED column

ENTITY_REF

public static final int ENTITY_REF
The identifier for the ENTITY_REF column

ATTRIBUTE_REF

public static final int ATTRIBUTE_REF
The identifier for the ATTRIBUTE_REF column

DESCRIPTION

public static final int DESCRIPTION
The identifier for the DESCRIPTION column

DOMAIN

public static final int DOMAIN
The identifier for the DOMAIN column

EXTERNALIZE

public static final int EXTERNALIZE
The identifier for the EXTERNALIZE column

ATTATTFK

public static final int ATTATTFK
The identifiers for the relationship ATTATTFK

PRPATTFK

public static final int PRPATTFK
The identifiers for the relationship PRPATTFK

CK_REQUIRED

public static final int CK_REQUIRED
The identifiers for the check constraint CK_REQUIRED

CK_EXTERNALIZE

public static final int CK_EXTERNALIZE
The identifiers for the check constraint CK_EXTERNALIZE
Constructor Detail

AttributesTable

public AttributesTable(Repository rpstry)
This constructor creates a AttributesTable object in a repository
Parameters:
repository - com.ibm.dse.tools.workbench.base.DefaultRepository The repository in wich create the table
Method Detail

createRelations

public void createRelations()
                     throws WBInvalidArgumentException
This method creates the relationships for a table
Overrides:
createRelations in class AbstractTable
Throws:
WBInvalidArgumentException - There is an error creating relationships.

getAvailableRefInstanceProperty

public TableRow[][] getAvailableRefInstanceProperty(TableRow attribute)
                                             throws WorkbenchException
This method returns a bidimensional array of TableRows, with the instance and property that matches the reference condition for the given attribute.
Parameters:
attribute - com.ibm.dse.tools.workbench.base.TableRow
Returns:
com.ibm.dse.tools.workbench.base.TableRow[][]
Throws:
WorkbenchException - an error ocurred while retrieving the data

getAvailableRefProperties

public TableRow[] getAvailableRefProperties(TableRow attribute)
                                     throws WorkbenchException
This method returns an array of properties that matches the reference condition of the given attribute.
Parameters:
attribute - com.ibm.dse.tools.workbench.base.TableRow
Returns:
com.ibm.dse.tools.workbench.base.TableRow[]
Throws:
WorkbenchException - an error ocurred while retrieving the data

getDatatype

public java.lang.String getDatatype(TableRow row)
                             throws WorkbenchException
Returns the datatype for the values in a row
Specified by:
getDatatype in interface TypedTable
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow
Returns:
java.lang.String
Throws:
WorkbenchException -  

getValueAsObject

public java.lang.Object getValueAsObject(TableRow row,
                                         int column)
                                  throws WorkbenchException
Returns the datatype for the values in a row
Specified by:
getValueAsObject in interface TypedTable
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow
column - int
Returns:
java.lang.Object
Throws:
WorkbenchException -  

hasSelfGeneratedPk

public boolean hasSelfGeneratedPk()
This table has self-generated primary key
Overrides:
hasSelfGeneratedPk in class AbstractTable
Returns:
boolean

validate

public java.lang.String[] validate(TableRow attribute)
This method checks the correctness of an attribute row based on application rules

It returns the list of error strings or null if there are no errors

Overrides:
validate in class AbstractTable
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow The row to validate
Returns:
java.lang.String[] The error strings