|
|||||||||
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.DefaultTableRow
This class implements a generic repository table row
Field Summary | |
protected java.lang.String[] |
commitedVal
The columns values of this row after last commit or rollback |
protected boolean |
deleted
Flag of row deleted |
protected java.lang.String[] |
errorList
List of errors for this row |
protected boolean |
inError
Flag of row with validation errors |
protected java.lang.String[] |
lastValues
The columns values of this row |
protected boolean |
modified
Flag of row modified but changes not persisted |
protected boolean |
newRow
Flag of row created but not persisted |
protected int |
referencesCount
The number of registered uses of this row |
protected Table |
table
The table containing this row |
protected java.lang.String[] |
values
The columns values of this row |
Constructor Summary | |
DefaultTableRow(Table table)
This constructor creates a DefaultTableRow object for a table |
|
DefaultTableRow(Table table,
boolean isNew,
java.lang.String[] values)
This constructor creates a DefaultTableRow object for a table |
Method Summary | |
void |
copyCascade(Repository paramRepository,
boolean exactGroup)
This method copies a row from a repository to another. |
void |
copyCascadeForImporting(Repository paramRepository,
boolean exactGroup)
This method copies a row from a repository to another. |
void |
copyParentGroupsTree(Repository destinationRep,
boolean exactGroup)
Copies all the parent groups tree (the groups containing the row) of a row to a destination repository |
TableRow |
copyTo(Repository paramRepository)
This method copies a row from a repository to another. |
TableRow |
createOpenEdition()
This method creates an Open Edition of a row. |
void |
delete()
This method deletes this row |
void |
deleteCascade()
Deletes a row and all its related rows from the repository |
void |
deregisterRefence()
This method discounts a use reference. |
TableRow |
duplicate()
This method creates a new row with the same values as the actual row |
void |
flush()
Flushes all changes made in the row to the database |
TableRow |
getContainerGroup()
Returns the row representing the group that contains this object |
TableRow |
getDestinationRowByName(Workspace destRepository)
This method returns the row with the same name as the actual from a Workspace. |
int |
getDestinationRowStatus(Workspace destRepository)
This method checks for the existence of any version of this row in a Workspace |
java.lang.String[] |
getErrorList()
Returns the list of error messages for a row after validate has been called. |
java.lang.String |
getLastCommitedValueAt(int column)
Returns the value contained in a column of this row |
java.lang.String |
getLastValueAt(int column)
Returns the value contained in a column of this row |
java.lang.String |
getNextVersion(Repository repository)
Proposes a new version code based on the last version code of the object stored in the repository |
TableRow[] |
getRelated(int relation,
Clause where,
int[] orderBy)
Returns the rows of another table based on a relationship and the values of this row |
Table |
getTable()
Returns the table of the row |
java.lang.String |
getValueAt(int column)
Returns the value contained in a column of this row |
void |
importToWorkspace(Workspace ws)
This method copies a row from a repository to a workspace |
protected void |
insert()
This method inserts the current row in a database |
boolean |
isDeleted()
Indicates if row has been deleted from the database |
boolean |
isInError()
Indicates if last validation has caused errors |
boolean |
isModified()
Indicates if the row has been changed since last flush |
boolean |
isNew()
Returns the insertion status of this row (true if it has not been inserted yet) |
boolean |
isVersioned()
Indicates if this row is versioned or an open edition |
void |
markCommited()
This method marks the row stated as committed |
void |
registerReference()
This method increments the count of use references. |
void |
restoreInserted()
This method restores the status of an inserted row since the last commit or rollback |
void |
restoreModified()
This method restores the status of a modified or deleted row since the last commit or rollback |
void |
setContainerGroup(java.lang.String grpCode)
This method sets the Container group of a row |
void |
setOtherVersionsInactive()
This method searches for other editions of the row in the Repository where it is stored and marks them as inactive |
void |
setTable(Table table)
Sets the table of the row |
void |
setValueAt(int column,
java.lang.String value)
Sets the value in a column of this row |
void |
setValues(java.lang.String[] values)
Sets the values of all columns of this row |
protected void |
storeRollbackData()
This method stores the actual values for a possible rollback |
java.lang.String |
toString()
Returns a string representation of this row |
protected void |
update()
This method updates the current row to the database |
java.lang.String[] |
validate()
Evaluates and returns the list of validation error messages for this row and marks it as inError if there are errors |
TableRow |
version(java.lang.String newVersion,
Repository repository)
Versions this row, copying it to a repository, based on the version process for its table |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int referencesCount
protected java.lang.String[] values
protected java.lang.String[] lastValues
protected java.lang.String[] commitedVal
protected Table table
protected boolean newRow
protected boolean modified
protected boolean deleted
protected boolean inError
protected java.lang.String[] errorList
Constructor Detail |
public DefaultTableRow(Table table) throws WorkbenchException
table
- com.ibm.dse.tools.workbench.base.Table The table on wich create the rowpublic DefaultTableRow(Table table, boolean isNew, java.lang.String[] values) throws WorkbenchException
table
- com.ibm.dse.tools.workbench.base.Table The table on wich create the rowisNew
- boolean indicates whether the row is new or notvalues
- java.lang.String[] the row valuesMethod Detail |
public void copyCascade(Repository paramRepository, boolean exactGroup) throws WorkbenchException
It also copies all the needed data such as parent rows, related rows and container group.
paramRepository
- com.ibm.dse.tools.workbench.base.Repository The repository to where copy the rowexactGroup
- boolean Indicator of whether the row has to be attached to the container group by CODE (true) or by NAME (false)public void copyCascadeForImporting(Repository paramRepository, boolean exactGroup) throws WorkbenchException
It also copies all the needed data such as parent rows, related rows and container group.
paramRepository
- com.ibm.dse.tools.workbench.base.Repository The repository to where copy the rowexactGroup
- boolean Indicator of whether the row has to be attached to the container group by CODE (true) or by NAME (false)public void copyParentGroupsTree(Repository destinationRep, boolean exactGroup) throws WorkbenchException
destinationRep
- com.ibm.dse.tools.workbench.base.Repository The destination repositoryexactGroup
- boolean Indicator of whether the row has to be attached to the container group by CODE (true) or by NAME (false)public TableRow copyTo(Repository paramRepository) throws WorkbenchException
paramRepository
- com.ibm.dse.tools.workbench.base.Repository The repository to where copy the rowpublic TableRow createOpenEdition() throws WorkbenchException
It duplicates the row and makes all its childs to point to this new version.
public void delete() throws RepositoryException
public void deleteCascade() throws WorkbenchException
public void deregisterRefence()
If there is no more uses, the row must be removed from the list in table
public TableRow duplicate() throws WorkbenchException
public void flush() throws RepositoryException
public TableRow getContainerGroup() throws WorkbenchException
public TableRow getDestinationRowByName(Workspace destRepository) throws WorkbenchException
destRepository
- com.ibm.dse.tools.workbench.base.Workspacepublic int getDestinationRowStatus(Workspace destRepository) throws WorkbenchException
destRepository
- com.ibm.dse.tools.workbench.base.WorkspaceIt retuns a number between 0 and 3: 0: the row doesn´t exist in the destination repository 1: the row exists in the destination repository with a different edition and it is an open edition 2: the row exists in the destination repository with a different edition and it is version 3: the row exists in the destination repository with the same version
public java.lang.String[] getErrorList()
public java.lang.String getLastCommitedValueAt(int column)
column
- int The identifier of the column to evaluatepublic java.lang.String getLastValueAt(int column)
column
- int The identifier of the column to evaluatepublic java.lang.String getNextVersion(Repository repository) throws RpNonVersionableTableException, WorkbenchException
repository
- com.ibm.dse.tools.workbench.base.Repository The repositorypublic TableRow[] getRelated(int relation, Clause where, int[] orderBy) throws WorkbenchException
relation
- int The relationship identifierwhere
- com.ibm.dse.tools.workbench.base.Clause The where clause to add to the conditions of relationshiporderBy
- int[] The list of columns used to order the resultspublic Table getTable()
public java.lang.String getValueAt(int column)
column
- int The identifier of the column to evaluatepublic void importToWorkspace(Workspace ws) throws WorkbenchException
ws
- com.ibm.dse.tools.workbench.base.Workspaceprotected void insert() throws RepositoryException
public boolean isDeleted()
public boolean isInError()
public boolean isModified()
public boolean isNew()
public boolean isVersioned() throws RpNonVersionableTableException
public void markCommited()
public void registerReference()
public void restoreInserted()
public void restoreModified()
public void setContainerGroup(java.lang.String grpCode) throws WorkbenchException
grpCode
- java.lang.String the code of the group to be set as containerpublic void setOtherVersionsInactive() throws WorkbenchException
public void setTable(Table table)
table
- com.ibm.dse.tools.workbench.base.Table The table to setpublic void setValueAt(int column, java.lang.String value) throws RepositoryException
column
- int The identifier of the column to modifyvalue
- java.lang.String The value to be assignedpublic void setValues(java.lang.String[] values) throws RepositoryException
values
- java.lang.String[] The value to be assignedprotected void storeRollbackData()
public java.lang.String toString()
protected void update() throws RepositoryException
public java.lang.String[] validate()
public TableRow version(java.lang.String newVersion, Repository repository) throws WorkbenchException
newVersion
- java.lang.String the new version coderepository
- com.ibm.dse.tools.workbench.base.Repository the repository where to copy the versioned row
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |