com.dbmain.jidbm
Class DBMCompoundAttribute

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.DBMAttribute
                  extended by com.dbmain.jidbm.DBMCompoundAttribute
All Implemented Interfaces:
DBMAttributeOwner

public class DBMCompoundAttribute
extends DBMAttribute
implements DBMAttributeOwner

The DBMCompoundAttribute class represents compound attribute objects of the DB-MAIN repository.

A compound attribute can have several attributes. The attribute instances fall into 2 classes: simple attribute and compound attribute.


Field Summary
 
Fields inherited from class com.dbmain.jidbm.DBMAttribute
ARRAY_ATT, BAG_ATT, LIST_ATT, N_CARD, SET_ATT, UARRAY_ATT, ULIST_ATT
 
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
DBMCompoundAttribute(int id)
          Creates a new instance of the DBMCompoundAttribute class representing the compound attribute identified by id and the current project in DB-MAIN.
DBMCompoundAttribute(int id, long sysid)
          Creates a new instance of the DBMCompoundAttribute class representing the compound attribute identified by id and sysid in the DB-MAIN repository.
 
Method Summary
 void addFirstAttribute(DBMAttribute cur)
          Adds a first attribute (cur) to the current compound attribute in the DB-MAIN repository.
 void addNextAttribute(DBMAttribute cur, DBMAttribute prev)
          Adds a attribute (cur) following the attribute (prev) to the current compound attribute in the DB-MAIN repository.
 DBMAttribute copyAttribute(DBMAttribute orig, DBMAttribute prev)
          Copies a instance of attribute attached to the current compound attribute in the DB-MAIN repository.
 DBMCompoundAttribute createCompoundAttribute(java.lang.String name, java.lang.String short_name, int min_rep, int max_rep, char set_type, DBMSchema schema, DBMAttribute prev)
          Creates a new instance of compound attribute attached to the current compound attribute in the DB-MAIN repository.
 DBMSimpleAttribute createSimpleAttribute(java.lang.String name, java.lang.String short_name, int min_rep, int max_rep, char set_type, char type, boolean stable, boolean recyclable, int length, short decim, DBMSchema schema, DBMAttribute prev)
          Creates a new instance of simple attribute attached to the current compound attribute in the DB-MAIN repository.
 DBMCompoundAttribute createUniqueCompoundAttribute(java.lang.String name, java.lang.String short_name, int min_rep, int max_rep, char set_type, DBMSchema schema, DBMAttribute prev)
          Creates a new unique instance of compound attribute attached to the current compound attribute in the DB-MAIN repository.
 DBMSimpleAttribute createUniqueSimpleAttribute(java.lang.String name, java.lang.String short_name, int min_rep, int max_rep, char set_type, char type, boolean stable, boolean recyclable, int length, short decim, DBMSchema schema, DBMAttribute prev)
          Creates a new unique instance of simple attribute attached to the current compound attribute in the DB-MAIN repository.
 void deleteCompoundAttribute()
          Deletes the compound attribute of the DB-MAIN repository represented by the current DBMCompoundAttribute instance.
 java.lang.Object[] disaggregate(boolean show)
          Disaggregate the current compound attribute.
 DBMAttribute findAttribute(java.lang.String name)
          Returns the attribute that have a specified name in the current compound attribute owner.
 DBMAttribute getFirstAttribute()
          Returns the first attribute of the current compound attribute in the DB-MAIN repository.
 DBMCompoundAttribute getFirstAttributeCompoundAttribute()
          Returns the first compound attribute attribute of the current compound attribute in the DB-MAIN repository.
 DBMSimpleAttribute getFirstAttributeSimpleAttribute()
          Returns the first simple attribute attribute of the current compound attribute in the DB-MAIN repository.
 DBMAttribute getLastAttribute()
          Returns the last attribute of the current compound attribute in the DB-MAIN repository.
 DBMCompoundAttribute getLastAttributeCompoundAttribute()
          Returns the last compound attribute attribute of the current compound attribute in the DB-MAIN repository.
 DBMSimpleAttribute getLastAttributeSimpleAttribute()
          Returns the last simple attribute attribute of the current compound attribute in the DB-MAIN repository.
 DBMAttribute getNextAttribute(DBMAttribute cur)
          Returns the attribute (of the current compound attribute) that follows the attribute cur in the DB-MAIN repository.
 DBMCompoundAttribute getNextAttributeCompoundAttribute(DBMCompoundAttribute cur)
          Returns the compound attribute attribute (of the current compound attribute) that follows the compound attribute cur in the DB-MAIN repository.
 DBMSimpleAttribute getNextAttributeSimpleAttribute(DBMSimpleAttribute cur)
          Returns the simple attribute attribute (of the current compound attribute) that follows the simple attribute cur in the DB-MAIN repository.
 DBMAttribute getPreviousAttribute(DBMAttribute cur)
          Returns the attribute (of the current compound attribute) that precedes the attribute cur in the DB-MAIN repository.
 DBMCompoundAttribute getPreviousAttributeCompoundAttribute(DBMCompoundAttribute cur)
          Returns the compound attribute attribute (of the current compound attribute) that precedes the compound attribute cur in the DB-MAIN repository.
 DBMSimpleAttribute getPreviousAttributeSimpleAttribute(DBMSimpleAttribute cur)
          Returns the simple attribute attribute (of the current compound attribute) that precedes the simple attribute cur in the DB-MAIN repository.
 void removeAttribute()
          Removes the list of attribute attached to the current compound attribute in the DB-MAIN repository.
 DBMCompoundAttribute unprefixAttribute(boolean show)
          Unprefix the attribute names of the current compound attribute.
 
Methods inherited from class com.dbmain.jidbm.DBMAttribute
convertAttribute, convertAttribute, deleteAttribute, getAttributeOwner, getFirstMemberOfGroup, getLastMemberOfGroup, getMaximumCardinality, getMinimumCardinality, getNextMemberOfGroup, getPreviousMemberOfGroup, getSetType, getSetTypeName, isBoolean, isCharacter, isCompound, isDate, isFloat, isIndex, isNumeric, isObject, isSequence, isUserDefined, isVariableCharacter, materializeAttribute, removeAttributeOwner, removeMemberOfGroup, removeMemberOfGroup, setMaximumCardinality, setMinimumCardinality, setSetType, transformIntoEntityType, transformIntoRelationshipType, transformMonovaluedIntoMultivaluedAttribute, transformMultivaluedIntoAttributeList, transformMultivaluedIntoMonovaluedAttribute
 
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

DBMCompoundAttribute

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

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

DBMCompoundAttribute

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

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

deleteCompoundAttribute

public void deleteCompoundAttribute()
Deletes the compound attribute of the DB-MAIN repository represented by the current DBMCompoundAttribute instance.


createSimpleAttribute

public DBMSimpleAttribute createSimpleAttribute(java.lang.String name,
                                                java.lang.String short_name,
                                                int min_rep,
                                                int max_rep,
                                                char set_type,
                                                char type,
                                                boolean stable,
                                                boolean recyclable,
                                                int length,
                                                short decim,
                                                DBMSchema schema,
                                                DBMAttribute prev)
Creates a new instance of simple attribute attached to the current compound attribute in the DB-MAIN repository.

Specified by:
createSimpleAttribute in interface DBMAttributeOwner
Parameters:
name - the value of the field name.
short_name - the value of the field short name.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
set_type - the value of the field set type.
type - the value of the field type.
stable - the value of the field stable.
recyclable - the value of the field recyclable.
length - the value of the field length.
decim - the value of the field decimal number.
schema - the schema linked to the created object.
prev - the attribute after which the created object is inserted.
Returns:
the DBMSimpleAttribute instance representing the new simple attribute.

createCompoundAttribute

public DBMCompoundAttribute createCompoundAttribute(java.lang.String name,
                                                    java.lang.String short_name,
                                                    int min_rep,
                                                    int max_rep,
                                                    char set_type,
                                                    DBMSchema schema,
                                                    DBMAttribute prev)
Creates a new instance of compound attribute attached to the current compound attribute in the DB-MAIN repository.

Specified by:
createCompoundAttribute in interface DBMAttributeOwner
Parameters:
name - the value of the field name.
short_name - the value of the field short name.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
set_type - the value of the field set type.
schema - the schema linked to the created object.
prev - the attribute after which the created object is inserted.
Returns:
the DBMCompoundAttribute instance representing the new compound attribute.

createUniqueSimpleAttribute

public DBMSimpleAttribute createUniqueSimpleAttribute(java.lang.String name,
                                                      java.lang.String short_name,
                                                      int min_rep,
                                                      int max_rep,
                                                      char set_type,
                                                      char type,
                                                      boolean stable,
                                                      boolean recyclable,
                                                      int length,
                                                      short decim,
                                                      DBMSchema schema,
                                                      DBMAttribute prev)
Creates a new unique instance of simple attribute attached to the current compound attribute in the DB-MAIN repository. This method insures that the name of the created object is unique in the repository (suffix must be added).

Specified by:
createUniqueSimpleAttribute in interface DBMAttributeOwner
Parameters:
name - the value of the field name.
short_name - the value of the field short name.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
set_type - the value of the field set type.
type - the value of the field type.
stable - the value of the field stable.
recyclable - the value of the field recyclable.
length - the value of the field length.
decim - the value of the field decimal number.
schema - the schema linked to the created object.
prev - the attribute after which the created object is inserted.
Returns:
the DBMSimpleAttribute instance representing the new unique simple attribute.

createUniqueCompoundAttribute

public DBMCompoundAttribute createUniqueCompoundAttribute(java.lang.String name,
                                                          java.lang.String short_name,
                                                          int min_rep,
                                                          int max_rep,
                                                          char set_type,
                                                          DBMSchema schema,
                                                          DBMAttribute prev)
Creates a new unique instance of compound attribute attached to the current compound attribute in the DB-MAIN repository. This method insures that the name of the created object is unique in the repository (suffix must be added).

Specified by:
createUniqueCompoundAttribute in interface DBMAttributeOwner
Parameters:
name - the value of the field name.
short_name - the value of the field short name.
min_rep - the value of the field minimum cardinality.
max_rep - the value of the field maximum cardinality.
set_type - the value of the field set type.
schema - the schema linked to the created object.
prev - the attribute after which the created object is inserted.
Returns:
the DBMCompoundAttribute instance representing the new unique compound attribute.

copyAttribute

public DBMAttribute copyAttribute(DBMAttribute orig,
                                  DBMAttribute prev)
Copies a instance of attribute attached to the current compound attribute in the DB-MAIN repository.

Specified by:
copyAttribute in interface DBMAttributeOwner
Parameters:
orig - the attribute to be copied.
prev - the attribute after which the copied object is inserted.
Returns:
the DBMAttribute instance representing the copied attribute.

getFirstAttribute

public DBMAttribute getFirstAttribute()
Returns the first attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getFirstAttribute in interface DBMAttributeOwner
Returns:
the DBMAttribute instance representing the first attribute.

getLastAttribute

public DBMAttribute getLastAttribute()
Returns the last attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getLastAttribute in interface DBMAttributeOwner
Returns:
the DBMAttribute instance representing the last attribute.

getNextAttribute

public DBMAttribute getNextAttribute(DBMAttribute cur)
Returns the attribute (of the current compound attribute) that follows the attribute cur in the DB-MAIN repository.

Specified by:
getNextAttribute in interface DBMAttributeOwner
Parameters:
cur - the current attribute.
Returns:
the DBMAttribute instance representing the next attribute.

getPreviousAttribute

public DBMAttribute getPreviousAttribute(DBMAttribute cur)
Returns the attribute (of the current compound attribute) that precedes the attribute cur in the DB-MAIN repository.

Specified by:
getPreviousAttribute in interface DBMAttributeOwner
Parameters:
cur - the current attribute.
Returns:
the DBMAttribute instance representing the previous attribute.

getFirstAttributeSimpleAttribute

public DBMSimpleAttribute getFirstAttributeSimpleAttribute()
Returns the first simple attribute attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getFirstAttributeSimpleAttribute in interface DBMAttributeOwner
Returns:
the DBMSimpleAttribute instance representing the first simple attribute.

getLastAttributeSimpleAttribute

public DBMSimpleAttribute getLastAttributeSimpleAttribute()
Returns the last simple attribute attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getLastAttributeSimpleAttribute in interface DBMAttributeOwner
Returns:
the DBMSimpleAttribute instance representing the last simple attribute.

getNextAttributeSimpleAttribute

public DBMSimpleAttribute getNextAttributeSimpleAttribute(DBMSimpleAttribute cur)
Returns the simple attribute attribute (of the current compound attribute) that follows the simple attribute cur in the DB-MAIN repository.

Specified by:
getNextAttributeSimpleAttribute in interface DBMAttributeOwner
Parameters:
cur - the current simple attribute.
Returns:
the DBMSimpleAttribute instance representing the next simple attribute.

getPreviousAttributeSimpleAttribute

public DBMSimpleAttribute getPreviousAttributeSimpleAttribute(DBMSimpleAttribute cur)
Returns the simple attribute attribute (of the current compound attribute) that precedes the simple attribute cur in the DB-MAIN repository.

Specified by:
getPreviousAttributeSimpleAttribute in interface DBMAttributeOwner
Parameters:
cur - the current simple attribute.
Returns:
the DBMSimpleAttribute instance representing the previous simple attribute.

getFirstAttributeCompoundAttribute

public DBMCompoundAttribute getFirstAttributeCompoundAttribute()
Returns the first compound attribute attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getFirstAttributeCompoundAttribute in interface DBMAttributeOwner
Returns:
the DBMCompoundAttribute instance representing the first compound attribute.

getLastAttributeCompoundAttribute

public DBMCompoundAttribute getLastAttributeCompoundAttribute()
Returns the last compound attribute attribute of the current compound attribute in the DB-MAIN repository.

Specified by:
getLastAttributeCompoundAttribute in interface DBMAttributeOwner
Returns:
the DBMCompoundAttribute instance representing the last compound attribute.

getNextAttributeCompoundAttribute

public DBMCompoundAttribute getNextAttributeCompoundAttribute(DBMCompoundAttribute cur)
Returns the compound attribute attribute (of the current compound attribute) that follows the compound attribute cur in the DB-MAIN repository.

Specified by:
getNextAttributeCompoundAttribute in interface DBMAttributeOwner
Parameters:
cur - the current compound attribute.
Returns:
the DBMCompoundAttribute instance representing the next compound attribute.

getPreviousAttributeCompoundAttribute

public DBMCompoundAttribute getPreviousAttributeCompoundAttribute(DBMCompoundAttribute cur)
Returns the compound attribute attribute (of the current compound attribute) that precedes the compound attribute cur in the DB-MAIN repository.

Specified by:
getPreviousAttributeCompoundAttribute in interface DBMAttributeOwner
Parameters:
cur - the current compound attribute.
Returns:
the DBMCompoundAttribute instance representing the previous compound attribute.

addFirstAttribute

public void addFirstAttribute(DBMAttribute cur)
Adds a first attribute (cur) to the current compound attribute in the DB-MAIN repository.

Specified by:
addFirstAttribute in interface DBMAttributeOwner
Parameters:
cur - the added attribute.

addNextAttribute

public void addNextAttribute(DBMAttribute cur,
                             DBMAttribute prev)
Adds a attribute (cur) following the attribute (prev) to the current compound attribute in the DB-MAIN repository.

Specified by:
addNextAttribute in interface DBMAttributeOwner
Parameters:
cur - the added attribute.
prev - the attribute after which the attribute cur is inserted.

removeAttribute

public void removeAttribute()
Removes the list of attribute attached to the current compound attribute in the DB-MAIN repository.

Specified by:
removeAttribute in interface DBMAttributeOwner

disaggregate

public java.lang.Object[] disaggregate(boolean show)
Disaggregate the current compound attribute.

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

unprefixAttribute

public DBMCompoundAttribute unprefixAttribute(boolean show)
Unprefix the attribute names of the current compound attribute.

Specified by:
unprefixAttribute in interface DBMAttributeOwner
Parameters:
show - indicate if the transformation dialogs must be displayed.
Returns:
the DBMCompoundAttribute instance representing the owner.

findAttribute

public DBMAttribute findAttribute(java.lang.String name)
Returns the attribute that have a specified name in the current compound attribute owner. The search is case insensitive and is applied to all the attribute hierarchy.

Specified by:
findAttribute in interface DBMAttributeOwner
Parameters:
name - the name of the attribute that must be found.
Returns:
the DBMAttribute instance named 'name'.