com.dbmain.jidbm
Class DBMRole

java.lang.Object
  extended by com.dbmain.jidbm.DBMGenericObject
      extended by com.dbmain.jidbm.DBMConcreteObject
          extended by com.dbmain.jidbm.DBMRole

public class DBMRole
extends DBMConcreteObject

The DBMRole class represents role objects of the DB-MAIN repository.

A role can have several groups and entity types.


Field Summary
static char AGGREGATION
          Constant of field aggregation: Aggregation.
static char COMPOSITION
          Constant of field aggregation: Composition.
static int N_CARD
          Constant of field maximumCardinality: Infinity value (N).
 
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
DBMRole(int id)
          Creates a new instance of the DBMRole class representing the role identified by id and the current project in DB-MAIN.
DBMRole(int id, long sysid)
          Creates a new instance of the DBMRole class representing the role identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstEntityType(DBMEntityType cur)
          Adds a first entity type (cur) to the current role in the DB-MAIN repository.
 void addNextEntityType(DBMEntityType cur, DBMEntityType prev)
          Adds a entity type (cur) following the entity type (prev) to the current role in the DB-MAIN repository.
 void deleteRole()
          Deletes the role of the DB-MAIN repository represented by the current DBMRole instance.
 char getAggregation()
          Returns the aggregation of the current role.
 java.lang.String getAggregationName()
          Returns the aggregation constant name of the current role.
 DBMEntityType getFirstEntityType()
          Returns the first entity type of the current role in the DB-MAIN repository.
 DBMGroup getFirstMemberOfGroup()
          Returns the first group of the current role in the DB-MAIN repository.
 DBMEntityType getLastEntityType()
          Returns the last entity type of the current role in the DB-MAIN repository.
 DBMGroup getLastMemberOfGroup()
          Returns the last group of the current role in the DB-MAIN repository.
 int getMaximumCardinality()
          Returns the maximum cardinality of the current role.
 int getMinimumCardinality()
          Returns the minimum cardinality of the current role.
 DBMEntityType getNextEntityType(DBMEntityType cur)
          Returns the entity type (of the current role) that follows the entity type cur in the DB-MAIN repository.
 DBMGroup getNextMemberOfGroup(DBMGroup cur)
          Returns the group (of the current role) that follows the group cur in the DB-MAIN repository.
 DBMEntityType getPreviousEntityType(DBMEntityType cur)
          Returns the entity type (of the current role) that precedes the entity type cur in the DB-MAIN repository.
 DBMGroup getPreviousMemberOfGroup(DBMGroup cur)
          Returns the group (of the current role) that precedes the group cur in the DB-MAIN repository.
 DBMRelationshipType getRelationshipType()
          Returns the relationship type of the current role.
 void removeEntityType()
          Removes the list of entity type attached to the current role in the DB-MAIN repository.
 void removeMemberOfGroup()
          Removes the list of group attached to the current role in the DB-MAIN repository.
 void removeMemberOfGroup(DBMGroup cur)
          Removes a group attached to the current role in the DB-MAIN repository.
 void removeRelationshipType()
          Removes the relationship type attached to the current role in the DB-MAIN repository.
 void setAggregation(char val)
          Updates the value of aggregation in the current role in the DB-MAIN repository.
 void setMaximumCardinality(int val)
          Updates the value of maximum cardinality in the current role in the DB-MAIN repository.
 void setMinimumCardinality(int val)
          Updates the value of minimum cardinality in the current role in the DB-MAIN repository.
 java.lang.Object[] transformIntoRelationshipType(boolean show)
          Transform the current multi entity type role into relationship types.
 
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
 

Field Detail

N_CARD

public static final int N_CARD
Constant of field maximumCardinality: Infinity value (N).

See Also:
Constant Field Values

AGGREGATION

public static final char AGGREGATION
Constant of field aggregation: Aggregation.

See Also:
Constant Field Values

COMPOSITION

public static final char COMPOSITION
Constant of field aggregation: Composition.

See Also:
Constant Field Values
Constructor Detail

DBMRole

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

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

DBMRole

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

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

getMinimumCardinality

public int getMinimumCardinality()
Returns the minimum cardinality of the current role.

Returns:
the int value of the field minimumCardinality.

setMinimumCardinality

public void setMinimumCardinality(int val)
Updates the value of minimum cardinality in the current role in the DB-MAIN repository.

Parameters:
val - the new int value of the field MinimumCardinality.

getMaximumCardinality

public int getMaximumCardinality()
Returns the maximum cardinality of the current role.

Returns:
the int value of the field maximumCardinality.

setMaximumCardinality

public void setMaximumCardinality(int val)
Updates the value of maximum cardinality in the current role in the DB-MAIN repository.

Parameters:
val - the new int value of the field MaximumCardinality.

getAggregation

public char getAggregation()
Returns the aggregation of the current role.

Returns:
the char value of the field aggregation.

getAggregationName

public java.lang.String getAggregationName()
Returns the aggregation constant name of the current role.

Returns:
the string representation of the field aggregation.

setAggregation

public void setAggregation(char val)
Updates the value of aggregation in the current role in the DB-MAIN repository.

Parameters:
val - the new char value of the field Aggregation.

deleteRole

public void deleteRole()
Deletes the role of the DB-MAIN repository represented by the current DBMRole instance.


getFirstMemberOfGroup

public DBMGroup getFirstMemberOfGroup()
Returns the first group of the current role in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the first group.

getLastMemberOfGroup

public DBMGroup getLastMemberOfGroup()
Returns the last group of the current role in the DB-MAIN repository.

Returns:
the DBMGroup instance representing the last group.

getNextMemberOfGroup

public DBMGroup getNextMemberOfGroup(DBMGroup cur)
Returns the group (of the current role) that follows the group cur in the DB-MAIN repository.

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

getPreviousMemberOfGroup

public DBMGroup getPreviousMemberOfGroup(DBMGroup cur)
Returns the group (of the current role) that precedes the group cur in the DB-MAIN repository.

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

removeMemberOfGroup

public void removeMemberOfGroup()
Removes the list of group attached to the current role in the DB-MAIN repository.


removeMemberOfGroup

public void removeMemberOfGroup(DBMGroup cur)
Removes a group attached to the current role in the DB-MAIN repository.

Parameters:
cur - the group to detach.

getFirstEntityType

public DBMEntityType getFirstEntityType()
Returns the first entity type of the current role in the DB-MAIN repository.

Returns:
the DBMEntityType instance representing the first entity type.

getLastEntityType

public DBMEntityType getLastEntityType()
Returns the last entity type of the current role in the DB-MAIN repository.

Returns:
the DBMEntityType instance representing the last entity type.

getNextEntityType

public DBMEntityType getNextEntityType(DBMEntityType cur)
Returns the entity type (of the current role) that follows the entity type cur in the DB-MAIN repository.

Parameters:
cur - the current entity type.
Returns:
the DBMEntityType instance representing the next entity type.

getPreviousEntityType

public DBMEntityType getPreviousEntityType(DBMEntityType cur)
Returns the entity type (of the current role) that precedes the entity type cur in the DB-MAIN repository.

Parameters:
cur - the current entity type.
Returns:
the DBMEntityType instance representing the previous entity type.

addFirstEntityType

public void addFirstEntityType(DBMEntityType cur)
Adds a first entity type (cur) to the current role in the DB-MAIN repository.

Parameters:
cur - the added entity type.

addNextEntityType

public void addNextEntityType(DBMEntityType cur,
                              DBMEntityType prev)
Adds a entity type (cur) following the entity type (prev) to the current role in the DB-MAIN repository.

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

removeEntityType

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


getRelationshipType

public DBMRelationshipType getRelationshipType()
Returns the relationship type of the current role.

Returns:
the DBMRelationshipType instance representing the relationship type.

removeRelationshipType

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


transformIntoRelationshipType

public java.lang.Object[] transformIntoRelationshipType(boolean show)
Transform the current multi entity type role into relationship types.

Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the array of DBMRelationshipType instance representing the new relationship types created by the transformation.