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

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

public class PropertiesTable
extends AbstractTable
implements TypedTable

This class represents a table of properties


Field Summary
static int ATTRIBUTE
          The identifier for the ATTRIBUTE column
static int CODE
          The identifier for the CODE column
static int INSTANCE
          The identifier for the INSTANCE column
static int REL_ERRORS
          The identifier for the relationship ERRPRPFK
static int VALUE
          The identifier for the VALUE 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
PropertiesTable(Repository rpstry)
          This constructor creates a PropertiesTable object in a repository
 
Method Summary
 void createRelations()
          This method creates the relationships for a table
 TableRow findReference(TableRow property)
          Returns the instance referred by a property that corresponds to a cross reference
 TableRow getAttribute(TableRow property)
          Returns the row representing the attribute definition of a property
 java.lang.String getDatatype(TableRow row)
          Returns the datatype for the values in a row
 TableRow getInstance(TableRow property)
          Returns the row representing the instance to wich belongs a property
 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
 void postDelete(TableRow row)
          This method is called after a row is deleted
 java.lang.String[] validate(TableRow property)
          This method checks the correctness of a property 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, 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

VALUE

public static final int VALUE
The identifier for the VALUE column

INSTANCE

public static final int INSTANCE
The identifier for the INSTANCE column

ATTRIBUTE

public static final int ATTRIBUTE
The identifier for the ATTRIBUTE column

REL_ERRORS

public static final int REL_ERRORS
The identifier for the relationship ERRPRPFK
Constructor Detail

PropertiesTable

public PropertiesTable(Repository rpstry)
This constructor creates a PropertiesTable object in a repository
Parameters:
repstry - 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.

findReference

public TableRow findReference(TableRow property)
                       throws WorkbenchException
Returns the instance referred by a property that corresponds to a cross reference
Parameters:
property - com.ibm.dse.tools.workbench.base.TableRow The property with the attribute referenced
Returns:
com.ibm.dse.tools.workbench.base.TableRow The instance referred
Throws:
WorkbenchException -  

getAttribute

public TableRow getAttribute(TableRow property)
                      throws WorkbenchException
Returns the row representing the attribute definition of a property
Parameters:
property - com.ibm.dse.tools.workbench.base.TableRow
Returns:
com.ibm.dse.tools.workbench.base.TableRow
Throws:
WorkbenchException -  

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 -  

getInstance

public TableRow getInstance(TableRow property)
                     throws WorkbenchException
Returns the row representing the instance to wich belongs a property
Parameters:
property - com.ibm.dse.tools.workbench.base.TableRow
Returns:
com.ibm.dse.tools.workbench.base.TableRow
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

postDelete

public void postDelete(TableRow row)
                throws RepositoryException
This method is called after a row is deleted
Overrides:
postDelete in class AbstractTable
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow
Throws:
RepositoryException -  

validate

public java.lang.String[] validate(TableRow property)
This method checks the correctness of a property 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:
property - com.ibm.dse.tools.workbench.base.TableRow The property row to validate
Returns:
java.lang.String[]