com.dbmain.jidbm
Class DBMRelationshipType

java.lang.Object
  extended by com.dbmain.jidbm.DBMGenericObject
      extended by com.dbmain.jidbm.DBMConcreteObject
          extended by com.dbmain.jidbm.DBMDataObject
              extended by com.dbmain.jidbm.DBMEntityRelationshipType
                  extended by com.dbmain.jidbm.DBMRelationshipType
All Implemented Interfaces:
DBMAttributeOwner, DBMProcessingUnitOwner

public class DBMRelationshipType
extends DBMEntityRelationshipType

The DBMRelationshipType class represents relationship type objects of the DB-MAIN repository.

A relationship type can have several roles.


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
DBMRelationshipType(int id)
          Creates a new instance of the DBMRelationshipType class representing the relationship type identified by id and the current project in DB-MAIN.
DBMRelationshipType(int id, long sysid)
          Creates a new instance of the DBMRelationshipType class representing the relationship type identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstRole(DBMRole cur)
          Adds a first role (cur) to the current relationship type in the DB-MAIN repository.
 void addNextRole(DBMRole cur, DBMRole prev)
          Adds a role (cur) following the role (prev) to the current relationship type in the DB-MAIN repository.
 DBMRole createRole(java.lang.String name, int min_con, int max_con, char aggregation)
          Creates a new instance of role attached to the current relationship type in the DB-MAIN repository.
 void deleteRelationshipType()
          Deletes the relationship type of the DB-MAIN repository represented by the current DBMRelationshipType instance.
 DBMRole getFirstRole()
          Returns the first role of the current relationship type in the DB-MAIN repository.
 DBMRole getLastRole()
          Returns the last role of the current relationship type in the DB-MAIN repository.
 DBMRole getNextRole(DBMRole cur)
          Returns the role (of the current relationship type) that follows the role cur in the DB-MAIN repository.
 DBMRole getPreviousRole(DBMRole cur)
          Returns the role (of the current relationship type) that precedes the role cur in the DB-MAIN repository.
 void removeRole()
          Removes the list of role attached to the current relationship type in the DB-MAIN repository.
 java.lang.Object[] transformIntoAttribute(boolean show, boolean multi)
          Transform the current relationship type into attributes (referential constraint).
 DBMEntityType transformIntoEntityType(boolean show)
          Transform the current relationship type into a entity type.
 java.lang.Object[] transformIntoObjectAttribute(boolean show)
          Transform the current relationship type into object attributes.
 
Methods inherited from class com.dbmain.jidbm.DBMEntityRelationshipType
addFirstAttribute, addFirstProcessingUnit, addNextAttribute, addNextProcessingUnit, copyAttribute, copyProcessingUnit, createCompoundAttribute, createProcessingUnit, createSimpleAttribute, createUniqueCompoundAttribute, createUniqueProcessingUnit, createUniqueSimpleAttribute, deleteEntityRelationshipType, findAttribute, findProcessingUnit, getFirstAttribute, getFirstAttributeCompoundAttribute, getFirstAttributeSimpleAttribute, getFirstProcessingUnit, getLastAttribute, getLastAttributeCompoundAttribute, getLastAttributeSimpleAttribute, getLastProcessingUnit, getNextAttribute, getNextAttributeCompoundAttribute, getNextAttributeSimpleAttribute, getNextProcessingUnit, getPreviousAttribute, getPreviousAttributeCompoundAttribute, getPreviousAttributeSimpleAttribute, getPreviousProcessingUnit, removeAttribute, removeProcessingUnit, unprefixAttribute
 
Methods inherited from class com.dbmain.jidbm.DBMDataObject
addFirstGroup, addFirstSimpleAttribute, addNextGroup, addNextSimpleAttribute, copyGroup, createGroup, createUniqueGroup, deleteDataObject, getFirstAccessKey, getFirstCollection, getFirstGroup, getFirstReferentialConstraint, getFirstSecondaryIdentifier, getFirstSimpleAttribute, getLastCollection, getLastGroup, getLastSimpleAttribute, getNextAccessKey, getNextCollection, getNextGroup, getNextReferentialConstraint, getNextSecondaryIdentifier, getNextSimpleAttribute, getPreviousCollection, getPreviousGroup, getPreviousSimpleAttribute, getPrimaryIdentifier, getSchema, removeCollection, removeCollection, removeGroup, removeSchema, removeSimpleAttribute
 
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

DBMRelationshipType

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

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

DBMRelationshipType

public DBMRelationshipType(int id)
Creates a new instance of the DBMRelationshipType class representing the relationship type identified by id and the current project in DB-MAIN.

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

deleteRelationshipType

public void deleteRelationshipType()
Deletes the relationship type of the DB-MAIN repository represented by the current DBMRelationshipType instance.


createRole

public DBMRole createRole(java.lang.String name,
                          int min_con,
                          int max_con,
                          char aggregation)
Creates a new instance of role attached to the current relationship type in the DB-MAIN repository.

Parameters:
name - the value of the field name.
min_con - the value of the field minimum cardinality.
max_con - the value of the field maximum cardinality.
aggregation - the value of the field aggregation.
Returns:
the DBMRole instance representing the new role.

getFirstRole

public DBMRole getFirstRole()
Returns the first role of the current relationship type in the DB-MAIN repository.

Returns:
the DBMRole instance representing the first role.

getLastRole

public DBMRole getLastRole()
Returns the last role of the current relationship type in the DB-MAIN repository.

Returns:
the DBMRole instance representing the last role.

getNextRole

public DBMRole getNextRole(DBMRole cur)
Returns the role (of the current relationship type) that follows the role cur in the DB-MAIN repository.

Parameters:
cur - the current role.
Returns:
the DBMRole instance representing the next role.

getPreviousRole

public DBMRole getPreviousRole(DBMRole cur)
Returns the role (of the current relationship type) that precedes the role cur in the DB-MAIN repository.

Parameters:
cur - the current role.
Returns:
the DBMRole instance representing the previous role.

addFirstRole

public void addFirstRole(DBMRole cur)
Adds a first role (cur) to the current relationship type in the DB-MAIN repository.

Parameters:
cur - the added role.

addNextRole

public void addNextRole(DBMRole cur,
                        DBMRole prev)
Adds a role (cur) following the role (prev) to the current relationship type in the DB-MAIN repository.

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

removeRole

public void removeRole()
Removes the list of role attached to the current relationship type in the DB-MAIN repository.


transformIntoEntityType

public DBMEntityType transformIntoEntityType(boolean show)
Transform the current relationship type into a entity type.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMEntityType instance representing the new entity type created by the transformation.

transformIntoAttribute

public java.lang.Object[] transformIntoAttribute(boolean show,
                                                 boolean multi)
Transform the current relationship type into attributes (referential constraint).

Parameters:
show - indicate if the transformation dialogs must be displayed.
multi - indicate if multivalued referential attributes are authorized.
Returns:
the array of DBMAttribute instance representing the new attributes created by the transformation.

transformIntoObjectAttribute

public java.lang.Object[] transformIntoObjectAttribute(boolean show)
Transform the current relationship type into object attributes.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the array of DBMAttribute instance representing the new object attributes created by the transformation.