com.dbmain.jidbm
Class DBMDataObject

java.lang.Object
  extended by com.dbmain.jidbm.DBMGenericObject
      extended by com.dbmain.jidbm.DBMConcreteObject
          extended by com.dbmain.jidbm.DBMDataObject
Direct Known Subclasses:
DBMAttribute, DBMConsumption, DBMEntityRelationshipType, DBMProcessingUnit, DBMResource, DBMState

public class DBMDataObject
extends DBMConcreteObject

The DBMDataObject class represents data object objects of the DB-MAIN repository.

A data object can have several groups, simple attributes and collections.


Field Summary
 
Fields inherited from class com.dbmain.jidbm.DBMGenericObject
ALLPARENTS, CLUSTER, CO_ATTRIBUTE, COLLECTION, CONNECTION, CONS_PU, CONS_RES, CONSTRAINT, CONSUMPTION, ELEMENT, ENTITY_TYPE, ENVIRONMENT, ETROUND, ETSHADOW, ETSQUARE, GRAPHCOUPLE, GROUP, HAVESEL, HIDEASSOCIATION, HIDEATT, HIDECTRLFLOW, HIDEEXTEND, HIDEGENACT, HIDEGENUC, HIDEGR, HIDEINCLUDE, HIDENEWADD, HIDENOTE, HIDEOBJFLOW, HIDEPRIMID, HIDEPROD, HIDEPU, HIDESTEREOTYPE, ISASTRAIGHT, LOCK_USED, MARK1, MARK2, MARK3, MARK4, MARK5, MEMBER_CST, META_OBJECT, META_PROPERTY, METH_USED, NN_NOTE, NOTE, PROC_UNIT, PROCESS_TITLE, PROD_SET, RE_ISA, REJECTED, REL_ELEMENT, REL_TYPE, RESOURCE, ROLE, RTROUND, RTSHADOW, RTSQUARE, SCHEMA, SELECT, SHOWTYPEATT, SI_ATTRIBUTE, STATE, SUB_TYPE, SYSTEM, TEXT, TEXT_LINE, UMLCENTER, UMLCENTERDOWN, UMLCENTERUP, UMLLEFTCENTER, UMLLEFTDOWN, UMLLEFTUP, UMLRIGHTCENTER, UMLRIGHTDOWN, UMLRIGHTUP, USER_OBJECT, USER_VIEW, WITHOUT_SELECT
 
Constructor Summary
DBMDataObject(int id)
          Creates a new instance of the DBMDataObject class representing the data object identified by id and the current project in DB-MAIN.
DBMDataObject(int id, long sysid)
          Creates a new instance of the DBMDataObject class representing the data object identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstGroup(DBMGroup cur)
          Adds a first group (cur) to the current data object in the DB-MAIN repository.
 void addFirstSimpleAttribute(DBMSimpleAttribute cur)
          Adds a first simple attribute (cur) to the current data object in the DB-MAIN repository.
 void addNextGroup(DBMGroup cur, DBMGroup prev)
          Adds a group (cur) following the group (prev) to the current data object in the DB-MAIN repository.
 void addNextSimpleAttribute(DBMSimpleAttribute cur, DBMSimpleAttribute prev)
          Adds a simple attribute (cur) following the simple attribute (prev) to the current data object in the DB-MAIN repository.
 DBMGroup copyGroup(DBMGroup orig, DBMGroup prev)
          Copies a instance of group attached to the current data object in the DB-MAIN repository.
 DBMGroup createGroup(java.lang.String name, char type, int funct, int min_rep, int max_rep, DBMGroup prev)
          Creates a new instance of group attached to the current data object in the DB-MAIN repository.
 DBMGroup createUniqueGroup(java.lang.String name, char type, int funct, int min_rep, int max_rep, DBMGroup prev)
          Creates a new unique instance of group attached to the current data object in the DB-MAIN repository.
 void deleteDataObject()
          Deletes the data object of the DB-MAIN repository represented by the current DBMDataObject instance.
 DBMGroup getFirstAccessKey()
          Returns the first acces key (index) of the current data object in the DB-MAIN repository.
 DBMCollection getFirstCollection()
          Returns the first collection of the current data object in the DB-MAIN repository.
 DBMGroup getFirstGroup()
          Returns the first group of the current data object in the DB-MAIN repository.
 DBMGroup getFirstReferentialConstraint()
          Returns the first referential constraint (foreign key) of the current data object in the DB-MAIN repository.
 DBMGroup getFirstSecondaryIdentifier()
          Returns the first secondary identifier of the current data object in the DB-MAIN repository.
 DBMSimpleAttribute getFirstSimpleAttribute()
          Returns the first simple attribute of the current data object in the DB-MAIN repository.
 DBMCollection getLastCollection()
          Returns the last collection of the current data object in the DB-MAIN repository.
 DBMGroup getLastGroup()
          Returns the last group of the current data object in the DB-MAIN repository.
 DBMSimpleAttribute getLastSimpleAttribute()
          Returns the last simple attribute of the current data object in the DB-MAIN repository.
 DBMGroup getNextAccessKey(DBMGroup cur)
          Returns the access key (of the current data object) that follows the access key (index) cur in the DB-MAIN repository.
 DBMCollection getNextCollection(DBMCollection cur)
          Returns the collection (of the current data object) that follows the collection cur in the DB-MAIN repository.
 DBMGroup getNextGroup(DBMGroup cur)
          Returns the group (of the current data object) that follows the group cur in the DB-MAIN repository.
 DBMGroup getNextReferentialConstraint(DBMGroup cur)
          Returns the referential constraint (of the current data object) that follows the referential constraint (foreign key) cur in the DB-MAIN repository.
 DBMGroup getNextSecondaryIdentifier(DBMGroup cur)
          Returns the secondary identifier (of the current data object) that follows the secondary identifier cur in the DB-MAIN repository.
 DBMSimpleAttribute getNextSimpleAttribute(DBMSimpleAttribute cur)
          Returns the simple attribute (of the current data object) that follows the simple attribute cur in the DB-MAIN repository.
 DBMCollection getPreviousCollection(DBMCollection cur)
          Returns the collection (of the current data object) that precedes the collection cur in the DB-MAIN repository.
 DBMGroup getPreviousGroup(DBMGroup cur)
          Returns the group (of the current data object) that precedes the group cur in the DB-MAIN repository.
 DBMSimpleAttribute getPreviousSimpleAttribute(DBMSimpleAttribute cur)
          Returns the simple attribute (of the current data object) that precedes the simple attribute cur in the DB-MAIN repository.
 DBMGroup getPrimaryIdentifier()
          Returns the primary identifier of the current data object in the DB-MAIN repository.
 DBMSchema getSchema()
          Returns the schema of the current data object.
 void removeCollection()
          Removes the list of collection attached to the current data object in the DB-MAIN repository.
 void removeCollection(DBMCollection cur)
          Removes a collection attached to the current data object in the DB-MAIN repository.
 void removeGroup()
          Removes the list of group attached to the current data object in the DB-MAIN repository.
 void removeSchema()
          Removes the schema attached to the current data object in the DB-MAIN repository.
 void removeSimpleAttribute()
          Removes the list of simple attribute attached to the current data object in the DB-MAIN repository.
 
Methods inherited from class com.dbmain.jidbm.DBMConcreteObject
deleteConcreteObject, getName, getQualifiedName, getSemanticDescription, getShortName, getTechnicalDescription, setName, setSemanticDescription, setShortName, setTechnicalDescription, toString
 
Methods inherited from class com.dbmain.jidbm.DBMGenericObject
addFirstNoteRelation, addFirstState, addFirstUserObject, addNextNoteRelation, addNextState, addNextUserObject, createNote, createNoteRelation, deleteGenericObject, equals, getFirstNoteRelation, getFirstState, getFirstUserObject, getFlag, getLastNoteRelation, getLastState, getLastUserObject, getMetaPropertyBooleanListValue, getMetaPropertyBooleanValue, getMetaPropertyCharListValue, getMetaPropertyCharValue, getMetaPropertyDoubleListValue, getMetaPropertyDoubleValue, getMetaPropertyIntListValue, getMetaPropertyIntValue, getMetaPropertyListValue, getMetaPropertyStringListValue, getMetaPropertyStringValue, getMetaPropertyValue, getNextNoteRelation, getNextState, getNextUserObject, getObjectIdentifier, getObjectType, getObjectTypeName, getPreviousNoteRelation, getPreviousState, getPreviousUserObject, getProjectIdentifier, hashCode, isAttribute, isCluster, isCollection, isCompoundAttribute, isConcreteObject, isConnection, isConstraint, isConstraintMember, isConsumption, isDataObject, isElement, isElementRelation, isEntityRelationshipType, isEntityType, isEnvironment, isFlagConstant, isGroup, isMetaObject, isMetaProperty, isNote, isNoteRelation, isProcessingUnit, isProcessingUnitCardinality, isProduct, isProductSet, isProject, isRelationshipType, isResource, isResourceCardinality, isResourceSubType, isRole, isSchema, isSimpleAttribute, isState, isSubType, isText, isTextLine, isUserObject, isUserView, removeNoteRelation, removeState, removeUserObject, setFlag, setFlagConstant, setMetaPropertyBooleanListValue, setMetaPropertyBooleanValue, setMetaPropertyCharListValue, setMetaPropertyCharValue, setMetaPropertyDoubleListValue, setMetaPropertyDoubleValue, setMetaPropertyIntListValue, setMetaPropertyIntValue, setMetaPropertyListValue, setMetaPropertyStringListValue, setMetaPropertyStringValue, setMetaPropertyValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBMDataObject

public DBMDataObject(int id,
                     long sysid)
Creates a new instance of the DBMDataObject class representing the data object identified by id and sysid in the DB-MAIN repository.

Parameters:
id - the object identifier of a data object.
sysid - the system identifier of a data object.

DBMDataObject

public DBMDataObject(int id)
Creates a new instance of the DBMDataObject class representing the data object identified by id and the current project in DB-MAIN.

Parameters:
id - the object identifier of a data object.
Method Detail

deleteDataObject

public void deleteDataObject()
Deletes the data object of the DB-MAIN repository represented by the current DBMDataObject instance.


createGroup

public DBMGroup createGroup(java.lang.String name,
                            char type,
                            int funct,
                            int min_rep,
                            int max_rep,
                            DBMGroup prev)
Creates a new instance of group attached to the current data object in the DB-MAIN repository.

Parameters:
name - the value of the field name.
type - the value of the field type.
funct - the value of the field function.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
prev - the group after which the created object is inserted.
Returns:
the DBMGroup instance representing the new group.

createUniqueGroup

public DBMGroup createUniqueGroup(java.lang.String name,
                                  char type,
                                  int funct,
                                  int min_rep,
                                  int max_rep,
                                  DBMGroup prev)
Creates a new unique instance of group attached to the current data object in the DB-MAIN repository. This method insures that the name of the created object is unique in the repository (suffix must be added).

Parameters:
name - the value of the field name.
type - the value of the field type.
funct - the value of the field function.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
prev - the group after which the created object is inserted.
Returns:
the DBMGroup instance representing the new unique group.

copyGroup

public DBMGroup copyGroup(DBMGroup orig,
                          DBMGroup prev)
Copies a instance of group attached to the current data object in the DB-MAIN repository.

Parameters:
orig - the group to be copied.
prev - the group after which the copied object is inserted.
Returns:
the DBMGroup instance representing the copied group.

getFirstGroup

public DBMGroup getFirstGroup()
Returns the first group of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first group.

getLastGroup

public DBMGroup getLastGroup()
Returns the last group of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the last group.

getNextGroup

public DBMGroup getNextGroup(DBMGroup cur)
Returns the group (of the current data object) that follows the group cur in the DB-MAIN repository.

Parameters:
cur - the current group.
Returns:
the DBMGroup instance representing the next group.

getPreviousGroup

public DBMGroup getPreviousGroup(DBMGroup cur)
Returns the group (of the current data object) that precedes the group cur in the DB-MAIN repository.

Parameters:
cur - the current group.
Returns:
the DBMGroup instance representing the previous group.

addFirstGroup

public void addFirstGroup(DBMGroup cur)
Adds a first group (cur) to the current data object in the DB-MAIN repository.

Parameters:
cur - the added group.

addNextGroup

public void addNextGroup(DBMGroup cur,
                         DBMGroup prev)
Adds a group (cur) following the group (prev) to the current data object in the DB-MAIN repository.

Parameters:
cur - the added group.
prev - the group after which the group cur is inserted.

removeGroup

public void removeGroup()
Removes the list of group attached to the current data object in the DB-MAIN repository.


getFirstSimpleAttribute

public DBMSimpleAttribute getFirstSimpleAttribute()
Returns the first simple attribute of the current data object in the DB-MAIN repository.

Returns:
the DBMSimpleAttribute instance representing the first simple attribute.

getLastSimpleAttribute

public DBMSimpleAttribute getLastSimpleAttribute()
Returns the last simple attribute of the current data object in the DB-MAIN repository.

Returns:
the DBMSimpleAttribute instance representing the last simple attribute.

getNextSimpleAttribute

public DBMSimpleAttribute getNextSimpleAttribute(DBMSimpleAttribute cur)
Returns the simple attribute (of the current data object) that follows the simple attribute cur in the DB-MAIN repository.

Parameters:
cur - the current simple attribute.
Returns:
the DBMSimpleAttribute instance representing the next simple attribute.

getPreviousSimpleAttribute

public DBMSimpleAttribute getPreviousSimpleAttribute(DBMSimpleAttribute cur)
Returns the simple attribute (of the current data object) that precedes the simple attribute cur in the DB-MAIN repository.

Parameters:
cur - the current simple attribute.
Returns:
the DBMSimpleAttribute instance representing the previous simple attribute.

addFirstSimpleAttribute

public void addFirstSimpleAttribute(DBMSimpleAttribute cur)
Adds a first simple attribute (cur) to the current data object in the DB-MAIN repository.

Parameters:
cur - the added simple attribute.

addNextSimpleAttribute

public void addNextSimpleAttribute(DBMSimpleAttribute cur,
                                   DBMSimpleAttribute prev)
Adds a simple attribute (cur) following the simple attribute (prev) to the current data object in the DB-MAIN repository.

Parameters:
cur - the added simple attribute.
prev - the simple attribute after which the simple attribute cur is inserted.

removeSimpleAttribute

public void removeSimpleAttribute()
Removes the list of simple attribute attached to the current data object in the DB-MAIN repository.


getFirstCollection

public DBMCollection getFirstCollection()
Returns the first collection of the current data object in the DB-MAIN repository.

Returns:
the DBMCollection instance representing the first collection.

getLastCollection

public DBMCollection getLastCollection()
Returns the last collection of the current data object in the DB-MAIN repository.

Returns:
the DBMCollection instance representing the last collection.

getNextCollection

public DBMCollection getNextCollection(DBMCollection cur)
Returns the collection (of the current data object) that follows the collection cur in the DB-MAIN repository.

Parameters:
cur - the current collection.
Returns:
the DBMCollection instance representing the next collection.

getPreviousCollection

public DBMCollection getPreviousCollection(DBMCollection cur)
Returns the collection (of the current data object) that precedes the collection cur in the DB-MAIN repository.

Parameters:
cur - the current collection.
Returns:
the DBMCollection instance representing the previous collection.

removeCollection

public void removeCollection()
Removes the list of collection attached to the current data object in the DB-MAIN repository.


removeCollection

public void removeCollection(DBMCollection cur)
Removes a collection attached to the current data object in the DB-MAIN repository.

Parameters:
cur - the collection to detach.

getSchema

public DBMSchema getSchema()
Returns the schema of the current data object.

Returns:
the DBMSchema instance representing the schema.

removeSchema

public void removeSchema()
Removes the schema attached to the current data object in the DB-MAIN repository.


getPrimaryIdentifier

public DBMGroup getPrimaryIdentifier()
Returns the primary identifier of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the primary identifier.

getFirstSecondaryIdentifier

public DBMGroup getFirstSecondaryIdentifier()
Returns the first secondary identifier of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first secondary identifier.

getNextSecondaryIdentifier

public DBMGroup getNextSecondaryIdentifier(DBMGroup cur)
Returns the secondary identifier (of the current data object) that follows the secondary identifier cur in the DB-MAIN repository.

Parameters:
cur - the current secondary identifier.
Returns:
the DBMGroup instance representing the next secondary identifier.

getFirstAccessKey

public DBMGroup getFirstAccessKey()
Returns the first acces key (index) of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first access key.

getNextAccessKey

public DBMGroup getNextAccessKey(DBMGroup cur)
Returns the access key (of the current data object) that follows the access key (index) cur in the DB-MAIN repository.

Parameters:
cur - the current access key.
Returns:
the DBMGroup instance representing the next access key.

getFirstReferentialConstraint

public DBMGroup getFirstReferentialConstraint()
Returns the first referential constraint (foreign key) of the current data object in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first referential constraint.

getNextReferentialConstraint

public DBMGroup getNextReferentialConstraint(DBMGroup cur)
Returns the referential constraint (of the current data object) that follows the referential constraint (foreign key) cur in the DB-MAIN repository.

Parameters:
cur - the current referential constraint.
Returns:
the DBMGroup instance representing the next referential constraint.