|
|||||||||
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.VersionableTable | +--com.ibm.dse.tools.workbench.base.EntitiesTable
This class represents a table of entities
Field Summary | |
static int |
ACTIVE
The identifier for the ACTIVE column |
static int |
ALLOW_TAG
The identifier for the ALLOW_TAG column |
static int |
BASE_GROUP
The identifier for the BASE_GROUP column |
static int |
CK_ACTIVE
The identifiers for the check constraint CK_ACTIVE |
static int |
CK_ALLOW_TAG
The identifiers for the check constraint CK_ALLOW_TAG |
static int |
CK_COMPOSITE
The identifiers for the check constraint CK_COMPOSITE |
static int |
CK_EXTERNALIZE
The identifiers for the check constraint CK_EXTERNALIZE |
static int |
CK_INSTANTIABLE
The identifiers for the check constraint CK_INSTANTIABLE |
static int |
CK_PREDEFINED
The identifiers for the check constraint CK_PREDEFINED |
static int |
CK_RELEASED
The identifiers for the check constraint CK_RELEASED |
static int |
CK_ROOT
The identifiers for the check constraint CK_ROOT |
static int |
CK_SELF_DEFINED
The identifiers for the check constraint CK_SELF_DEFINED |
static int |
CK_VERSIONED
The identifiers for the check constraint CK_VERSIONED |
static int |
CLASS
The identifier for the CLASS column |
static int |
CODE
The identifier for the CODE column |
static int |
COMPOSITE
The identifier for the COMPOSITE column |
static int |
DESCRIPTION
The identifier for the DESCRIPTION column |
static int |
EXTERNALIZE
The identifier for the EXTERNALIZE column |
static int |
ICON
The identifier for the ICON column |
static int |
INSTANTIABLE
The identifier for the INSTANTIABLE column |
static int |
NAME
The identifier for the NAME column |
static int |
OWNER
The identifier for the OWNER column |
static int |
PREDEFINED
The identifier for the PREDEFINED column |
static int |
REL_ASSIGNED_GROUPS
The identifiers for the relationship GRPENTEF |
static int |
REL_COMPONENT_ENTITIES
The identifiers for the relationship ENTENTCF |
static int |
REL_OWNED_ATTRIBUTES
The identifiers for the relationship ATTENTPF |
static int |
REL_OWNER_ENTITIES
The identifiers for the relationship ENTENTPF |
static int |
REL_REFERRER_ATTRIBUTES
The identifiers for the relationship ATTENTRF |
static int |
REL_REFERRER_INSTANCES
The identifiers for the relationship INSENTFK |
static int |
REL_SUB_ENTITIES
The identifiers for the relationship ENTENTFK |
static int |
RELEASED
The identifier for the RELEASED column |
static int |
ROOT
The identifier for the ROOT column |
static int |
SELF_DEFINED
The identifier for the SELF_DEFINED column |
static int |
SUPER_ENTITY
The identifier for the SUPER_ENTITY column |
static int |
TAG
The identifier for the TAG column |
static int |
TIMESTAMP
The identifier for the TIMESTAMP column |
static int |
VERSION
The identifier for the VERSION column |
static int |
VERSIONED
The identifier for the VERSIONED 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 | |
EntitiesTable(Repository rpstry)
This constructor creates a EntitiesTable object in a repository |
Method Summary | |
protected void |
alterAllRelatedRows(TableRow origRow,
TableRow finalRow)
Replaces all the related rows referring to origRow to be pointing to finalRow |
void |
copyParentGroupsTree(TableRow tableRow,
Repository destinationRep,
boolean exactGroup)
Copies all the parent groups hierarchy of an entity to a repository |
TableRow |
createOpenEdition(TableRow row)
Creates an open edition of an entity row. |
void |
createRelations()
This method creates the relationships for a table |
int |
getActiveColumn()
Returns the Active column identifier |
TableRow[] |
getAttributesList(TableRow entity)
Returns the attributes owned by an entity |
int |
getCodeColumn()
Returns the Code column identifier |
TableRow |
getContainerGroup(TableRow versionableRow)
This method returns the group containing the versionableRow passed as parameter |
TableRow[] |
getInheritedComposition(TableRow entity)
Returns the list of composition rules of an entity including the inherited composition rules |
TableRow[] |
getMandatoryAttributesList(TableRow entity)
Returns the mandatory attributes owned by an entity |
int |
getNameColumn()
Returns the Name column identifier |
int |
getOwnerColumn()
Returns the Owner column identifier |
int |
getReleasedColumn()
Returns the Released column identifier |
TableRow[] |
getSubEntitiesTree(TableRow entity)
Returns all the entities that extend from an entity including it |
TableRow[] |
getSuperEntitiesTree(TableRow entity)
Returns all the hierarchy of entities from which an entity extends, including it |
int |
getTimeStampColumn()
Returns the TimeStamp column identifier |
int |
getVersionColumn()
Returns the Version column identifier |
int |
getVersionedColumn()
Returns the Versioned column identifier |
boolean |
hasInheritedComposition(TableRow entity)
Indicates if an entity has own or inherited composition |
boolean |
hasSelfGeneratedPk()
This method indicates if the field in the primary key must be generated automatically |
void |
importToWorkspace(Workspace ws,
TableRow row)
Copies a group row from a repository to a workspace. |
TableRow[] |
rowsToBeRemoved(TableRow[] rows)
Returns the rows that a remove process performed on a set of rows will remove. |
protected void |
rowsToBeRemoved(TableRow row,
java.util.Hashtable rowList)
Adds to a Hashtable the related rows that a remove process performed on a row will remove. |
void |
setContainerGroup(TableRow versionableRow,
java.lang.String grpCode)
This method sets the Container group of an entity row |
java.lang.String[] |
validate(TableRow row)
This method checks the correctness of an entity row based on application rules |
TableRow |
version(TableRow versionableRow,
java.lang.String newVersion,
Repository repository)
Versions an entity row, copying it to a repository |
Methods inherited from class com.ibm.dse.tools.workbench.base.VersionableTable |
alterFkFields,
alterRelatedRows,
copyOwner,
copyParentGroupsTree,
getContainerGroup,
getContainerGroup,
getDistinctNames,
getVersions,
getWorkspaceContainerGroup,
isAValidVersionNumber,
isVersioned,
setContainerGroup,
updateOpenEditionFields,
updateVersionFields |
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 |
public static final int CODE
public static final int NAME
public static final int VERSION
public static final int BASE_GROUP
public static final int COMPOSITE
public static final int PREDEFINED
public static final int CLASS
public static final int TAG
public static final int DESCRIPTION
public static final int ROOT
public static final int INSTANTIABLE
public static final int ALLOW_TAG
public static final int SUPER_ENTITY
public static final int ICON
public static final int OWNER
public static final int RELEASED
public static final int VERSIONED
public static final int TIMESTAMP
public static final int ACTIVE
public static final int EXTERNALIZE
public static final int SELF_DEFINED
public static final int REL_OWNED_ATTRIBUTES
public static final int REL_REFERRER_ATTRIBUTES
public static final int REL_COMPONENT_ENTITIES
public static final int REL_OWNER_ENTITIES
public static final int REL_REFERRER_INSTANCES
public static final int REL_SUB_ENTITIES
public static final int REL_ASSIGNED_GROUPS
public static final int CK_COMPOSITE
public static final int CK_PREDEFINED
public static final int CK_ROOT
public static final int CK_RELEASED
public static final int CK_VERSIONED
public static final int CK_ACTIVE
public static final int CK_INSTANTIABLE
public static final int CK_ALLOW_TAG
public static final int CK_EXTERNALIZE
public static final int CK_SELF_DEFINED
Constructor Detail |
public EntitiesTable(Repository rpstry)
rpstry
- com.ibm.dse.tools.workbench.base.Repository The repository in which create the tableMethod Detail |
protected void alterAllRelatedRows(TableRow origRow, TableRow finalRow) throws WorkbenchException
origRow
- com.ibm.dse.tools.workbench.base.TableRowfinalRow
- com.ibm.dse.tools.workbench.base.TableRowpublic void copyParentGroupsTree(TableRow tableRow, Repository destinationRep, boolean exactGroup) throws WorkbenchException
tableRow
- com.ibm.dse.tools.workbench.base.TableRow The entity to copydestinationRep
- com.ibm.dse.tools.workbench.base.Repository The repository where to copyexactGroup
- boolean Indicator of whether the row has to be attached to the container group by CODE (true) or by NAME (false)public TableRow createOpenEdition(TableRow row) throws WorkbenchException
Create an open edition of an entity implies:
Duplicate the row, changing its primary key.
Alter the attributes referring the original entity so as they refer to the open edition entity
Create open editions of the instances referring the original entity
Alter owned attributes to point to the open edition entity and create an open edition for the related instances
Alter component entities to point to the open edition entity
Alter owner entities to point to the open edition entity and create an open edition for them
Alter subentities to point to the open edition entity and create an open edition for them
Set the container group for the open edition row, and create and create an open edition for it
row
- com.ibm.dse.tools.workbench.base.TableRow the original rowpublic void createRelations() throws WBInvalidArgumentException
public int getActiveColumn()
public TableRow[] getAttributesList(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.Table the entitypublic int getCodeColumn()
public TableRow getContainerGroup(TableRow versionableRow) throws WorkbenchException
versionableRow
- com.ibm.dse.tools.workbench.base.TableRow The row whose group must be returnedpublic TableRow[] getInheritedComposition(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.TableRow The row representing the entitypublic TableRow[] getMandatoryAttributesList(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.Table the entitypublic int getNameColumn()
public int getOwnerColumn()
public int getReleasedColumn()
public TableRow[] getSubEntitiesTree(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.TableRow The row representing the entitypublic TableRow[] getSuperEntitiesTree(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.TableRow The row representing the entitypublic int getTimeStampColumn()
public int getVersionColumn()
public int getVersionedColumn()
public boolean hasInheritedComposition(TableRow entity) throws WorkbenchException
entity
- com.ibm.dse.tools.workbench.base.TableRowpublic boolean hasSelfGeneratedPk()
public void importToWorkspace(Workspace ws, TableRow row) throws WorkbenchException
Rows in VersionableTable objects contained in a Workspace object can not be imported to a Workspace.
This method also copies the parent groups tree if needed.
ws
- com.ibm.dse.tools.workbench.base.Workspace The destination repository.row
- com.ibm.dse.tools.workbench.base.TableRow The row to be copied.public TableRow[] rowsToBeRemoved(TableRow[] rows) throws WorkbenchException
rows
- com.ibm.dse.tools.workbench.base.TableRow[] the rowsprotected void rowsToBeRemoved(TableRow row, java.util.Hashtable rowList) throws WorkbenchException
row
- com.ibm.dse.tools.workbench.base.TableRow The row to be removedrowList
- java.util.Hashtable The list of related rowspublic void setContainerGroup(TableRow versionableRow, java.lang.String grpCode) throws WorkbenchException
versionableRow
- com.ibm.dse.tools.workbench.base.TableRow The entity rowgrpCode
- java.lang.String The code of the group to be set as containerpublic java.lang.String[] validate(TableRow row)
It returns the list of error strings or null if there are no errors
row
- com.ibm.dse.tools.workbench.base.TableRow The row to validatepublic TableRow version(TableRow versionableRow, java.lang.String newVersion, Repository repository) throws WorkbenchException
versionableRow
- com.ibm.dse.tools.workbench.base.TableRow the entity row to versionnewVersion
- java.lang.String The new version coderepository
- com.ibm.dse.tools.workbench.base.Repository The repository where to store the versioned entity row
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |