|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.tools.workbench.base.AbstractTable | +--com.ibm.dse.tools.workbench.base.InstanceErrorsTable
This class represents a table of instance errors
Field Summary | |
static int |
CODE
The identifier for the CODE column |
static int |
ERRERRFK
The identifiers for the relationship ATTATTFK |
static int |
INSTANCE
The identifier for the INSTANCE column |
static int |
MESSAGE
The identifier for the MESSAGE column |
static int |
PARAMETERS
The identifier for the PARAMETERS column |
static int |
PROPAGATED_ERROR
The identifier for the PROPAGATED_ERROR column |
static int |
PROPERTY
The identifier for the PROPERTY column |
protected java.util.Hashtable |
rowsByInstance
The list of cached rows |
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 | |
InstanceErrorsTable(Repository rpstry)
This constructor creates a InstanceErrorsTable object in a repository |
Method Summary | |
void |
add(TableRow row)
This method adds a row to the list of rows. |
void |
addCompositionError(TableRow instance,
java.lang.String message,
java.lang.String params)
This method adds a Composition error to the InstanceErrorTable, and propagates it. |
TableRow |
addError(TableRow instance,
TableRow property,
java.lang.String message,
java.lang.String params)
This method adds an error to the InstanceErrorTable, and propagates it. |
void |
addPropertyError(TableRow instance,
TableRow property,
java.lang.String message,
java.lang.String params)
This method adds an error to the InstanceErrorTable, and propagates it. |
protected void |
alterInstanceCode(TableRow origInstance,
TableRow finalInstance)
Changes the related rows pointing to a parent row to point to a new parent row. |
protected void |
alterPropertyCode(TableRow origProperty,
TableRow finalProperty)
Changes the related rows pointing to a parent row to point to a new parent row. |
java.lang.String[] |
buildErrorMessage(TableRow instance)
This method builds the error messages related to this instance. |
void |
createRelations()
This method creates the relationships for a table |
void |
deleteCompositionError(TableRow instance)
This method deletes a composition error and all the propagated errors from the InstanceErrorTable. |
void |
deleteError(TableRow errorRow)
This method deletes an error and all the propagated errors from the InstanceErrorTable. |
void |
deletePropertyError(TableRow instance,
TableRow property)
This method deletes a property error from the InstanceErrorTable, and all the propagated errors. |
TableRow |
getAttribute(TableRow property)
Returns the row representing the attribute definition of a property |
boolean |
hasSelfGeneratedPk()
This method indicates if the field in the primary key must be generated automatically |
void |
postDelete(TableRow row)
This method is called after a row is deleted |
void |
removeFromList(TableRow row)
This method removes this row from the error list |
void |
restoreRows()
This method restores the mapped rows when doing a rollback |
TableRow[] |
retrieveErrorsByInstance(TableRow instance)
Returns the Error rows related to the instance passed as parameter |
java.lang.String[] |
validate(TableRow row)
This abstract method must validate the correctness of a row based on the rules of each object |
Methods inherited from class com.ibm.dse.tools.workbench.base.AbstractTable |
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,
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 |
public static final int CODE
public static final int INSTANCE
public static final int PROPERTY
public static final int PROPAGATED_ERROR
public static final int MESSAGE
public static final int PARAMETERS
public static final int ERRERRFK
protected java.util.Hashtable rowsByInstance
Constructor Detail |
public InstanceErrorsTable(Repository rpstry)
rpstry
- com.ibm.dse.tools.workbench.base.DefaultRepository The repository in wich create the tableMethod Detail |
public void add(TableRow row)
row
- com.ibm.dse.tools.workbench.base.TableRowpublic void addCompositionError(TableRow instance, java.lang.String message, java.lang.String params) throws RepositoryException
instance
- com.ibm.dse.tools.workbench.base.TableRow The InstanceError row.message
- java.lang.String The error messageparams
- java.lang.String The error message parameterspublic TableRow addError(TableRow instance, TableRow property, java.lang.String message, java.lang.String params) throws RepositoryException
instance
- com.ibm.dse.tools.workbench.base.TableRow The instance row.property
- com.ibm.dse.tools.workbench.base.TableRow The property row.message
- java.lang.String The error messageparams
- java.lang.String The error message parameterspublic void addPropertyError(TableRow instance, TableRow property, java.lang.String message, java.lang.String params) throws RepositoryException
instance
- com.ibm.dse.tools.workbench.base.TableRow The InstanceError row.property
- com.ibm.dse.tools.workbench.base.TableRow The Property row.message
- java.lang.String The error messageparms
- java.lang.String The error message parametersprotected void alterInstanceCode(TableRow origInstance, TableRow finalInstance) throws WorkbenchException
In addition of altering the fk fields in the related rows so that they change their parent, it also changes the value at their Code column, if applies (that is if they have selfgenerated primary key).
origInstance
- com.ibm.dse.tools.workbench.base.TableRow the initial parent rowfinalInstance
- com.ibm.dse.tools.workbench.base.TableRow the new parent row.protected void alterPropertyCode(TableRow origProperty, TableRow finalProperty) throws WorkbenchException
In addition of altering the fk fields in the related rows so that they change their parent, it also changes the value at their Code column, if applies (that is if they have selfgenerated primary key).
origProperty
- com.ibm.dse.tools.workbench.base.TableRow the initial parent rowfinalProperty
- com.ibm.dse.tools.workbench.base.TableRow the new parent row.public java.lang.String[] buildErrorMessage(TableRow instance) throws RepositoryException
instance
- com.ibm.dse.tools.workbench.base.TableRow The error rowpublic void createRelations() throws WBInvalidArgumentException
public void deleteCompositionError(TableRow instance) throws RepositoryException
instance
- com.ibm.dse.tools.workbench.base.TableRow The InstanceError row.public void deleteError(TableRow errorRow) throws WorkbenchException
errorRow
- com.ibm.dse.tools.workbench.base.TableRow The InstanceError row.public void deletePropertyError(TableRow instance, TableRow property) throws WorkbenchException
instance
- com.ibm.dse.tools.workbench.base.TableRow The InstanceError row.property
- com.ibm.dse.tools.workbench.base.TableRow The Propertypublic TableRow getAttribute(TableRow property) throws WorkbenchException
property
- com.ibm.dse.tools.workbench.base.TableRowpublic boolean hasSelfGeneratedPk()
public void postDelete(TableRow row) throws RepositoryException
row
- com.ibm.dse.tools.workbench.base.TableRowpublic void removeFromList(TableRow row)
row
- com.ibm.dse.tools.workbench.base.TableRow. Error rowpublic void restoreRows()
public TableRow[] retrieveErrorsByInstance(TableRow instance) throws WorkbenchException
The retrieved rows are added to the list, for cache purpose
instance
- com.ibm.dse.tools.workbench.base.TableRow The instance whose errors would be retrievedpublic java.lang.String[] validate(TableRow row)
It returns the list of error strings or null if there are no errors
com.ibm.dse.tools.workbench.base.TableRow
- the row to validate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |