com.dbmain.jidbm
Class DBMConstraint

java.lang.Object
  extended by com.dbmain.jidbm.DBMGenericObject
      extended by com.dbmain.jidbm.DBMConstraint

public class DBMConstraint
extends DBMGenericObject

The DBMConstraint class represents constraint objects of the DB-MAIN repository.

A constraint can have several constraint members.


Field Summary
static char EQ_CONSTRAINT
          Constant of field type: Equality constraint.
static char GEN_CONSTRAINT
          Constant of field type: Generic user-defined constraint.
static char INC_CONSTRAINT
          Constant of field type: Inclusion constraint.
static char INV_CONSTRAINT
          Constant of field type: Inverse constraint.
static char REF_CONSTRAINT
          Constant of field type: Referential constraint.
 
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
DBMConstraint(int id)
          Creates a new instance of the DBMConstraint class representing the constraint identified by id and the current project in DB-MAIN.
DBMConstraint(int id, long sysid)
          Creates a new instance of the DBMConstraint class representing the constraint identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstConstraintMember(DBMConstraintMember cur)
          Adds a first constraint member (cur) to the current constraint in the DB-MAIN repository.
 void addNextConstraintMember(DBMConstraintMember cur, DBMConstraintMember prev)
          Adds a constraint member (cur) following the constraint member (prev) to the current constraint in the DB-MAIN repository.
static DBMConstraint createConstraint(char type)
          Creates a new instance of constraint attached to the current constraint in the DB-MAIN repository.
 void deleteConstraint()
          Deletes the constraint of the DB-MAIN repository represented by the current DBMConstraint instance.
 DBMConstraintMember getFirstConstraintMember()
          Returns the first constraint member of the current constraint in the DB-MAIN repository.
 DBMConstraintMember getLastConstraintMember()
          Returns the last constraint member of the current constraint in the DB-MAIN repository.
 DBMConstraintMember getNextConstraintMember(DBMConstraintMember cur)
          Returns the constraint member (of the current constraint) that follows the constraint member cur in the DB-MAIN repository.
 DBMConstraintMember getPreviousConstraintMember(DBMConstraintMember cur)
          Returns the constraint member (of the current constraint) that precedes the constraint member cur in the DB-MAIN repository.
 char getType()
          Returns the type of the current constraint.
 java.lang.String getTypeName()
          Returns the type constant name of the current constraint.
 void removeConstraintMember()
          Removes the list of constraint member attached to the current constraint in the DB-MAIN repository.
 void setType(char val)
          Updates the value of type in the current constraint in the DB-MAIN repository.
 
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, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REF_CONSTRAINT

public static final char REF_CONSTRAINT
Constant of field type: Referential constraint.

See Also:
Constant Field Values

EQ_CONSTRAINT

public static final char EQ_CONSTRAINT
Constant of field type: Equality constraint.

See Also:
Constant Field Values

INV_CONSTRAINT

public static final char INV_CONSTRAINT
Constant of field type: Inverse constraint.

See Also:
Constant Field Values

GEN_CONSTRAINT

public static final char GEN_CONSTRAINT
Constant of field type: Generic user-defined constraint.

See Also:
Constant Field Values

INC_CONSTRAINT

public static final char INC_CONSTRAINT
Constant of field type: Inclusion constraint.

See Also:
Constant Field Values
Constructor Detail

DBMConstraint

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

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

DBMConstraint

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

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

getType

public char getType()
Returns the type of the current constraint.

Returns:
the char value of the field type.

getTypeName

public java.lang.String getTypeName()
Returns the type constant name of the current constraint.

Returns:
the string representation of the field type.

setType

public void setType(char val)
Updates the value of type in the current constraint in the DB-MAIN repository.

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

deleteConstraint

public void deleteConstraint()
Deletes the constraint of the DB-MAIN repository represented by the current DBMConstraint instance.


createConstraint

public static DBMConstraint createConstraint(char type)
Creates a new instance of constraint attached to the current constraint in the DB-MAIN repository.

Parameters:
type - the value of the field type.
Returns:
the DBMConstraint instance representing the new constraint.

getFirstConstraintMember

public DBMConstraintMember getFirstConstraintMember()
Returns the first constraint member of the current constraint in the DB-MAIN repository.

Returns:
the DBMConstraintMember instance representing the first constraint member.

getLastConstraintMember

public DBMConstraintMember getLastConstraintMember()
Returns the last constraint member of the current constraint in the DB-MAIN repository.

Returns:
the DBMConstraintMember instance representing the last constraint member.

getNextConstraintMember

public DBMConstraintMember getNextConstraintMember(DBMConstraintMember cur)
Returns the constraint member (of the current constraint) that follows the constraint member cur in the DB-MAIN repository.

Parameters:
cur - the current constraint member.
Returns:
the DBMConstraintMember instance representing the next constraint member.

getPreviousConstraintMember

public DBMConstraintMember getPreviousConstraintMember(DBMConstraintMember cur)
Returns the constraint member (of the current constraint) that precedes the constraint member cur in the DB-MAIN repository.

Parameters:
cur - the current constraint member.
Returns:
the DBMConstraintMember instance representing the previous constraint member.

addFirstConstraintMember

public void addFirstConstraintMember(DBMConstraintMember cur)
Adds a first constraint member (cur) to the current constraint in the DB-MAIN repository.

Parameters:
cur - the added constraint member.

addNextConstraintMember

public void addNextConstraintMember(DBMConstraintMember cur,
                                    DBMConstraintMember prev)
Adds a constraint member (cur) following the constraint member (prev) to the current constraint in the DB-MAIN repository.

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

removeConstraintMember

public void removeConstraintMember()
Removes the list of constraint member attached to the current constraint in the DB-MAIN repository.