com.change_vision.jude.api.inf.editor
Interface ERModelEditor

com.change_vision.jude.api.inf.editor.ERModelEditor

public abstract ERModelEditor

(create/delete) ER Models. Throws Exception when invalid models are generated. (e.g. Duplicated models with the same name are created in an ER Model.)


Method Summary
abstract  int createERAttribute(int entity, String logicalName, String physicalName, int type)
           
abstract  int createERAttribute(int entity, String logicalName, String physicalName, int domain)
          entity.
abstract  int createERDatatype(int erModel, String name)
           
abstract  int createERDomain(int erModel, int parentDomain, String logicalName, String physicalName, int type)
           
abstract  int createEREntity(int schema, String logicalName, String physicalName)
           
abstract  int createERIndex(String name, int parentEntity, boolean isUnique, boolean isKey, int[] erAttributes)
           
abstract  int createERModel(IModel root, String name)
           
abstract  int createIdentifyingRelationship(int parentEntity, int childEntity, String logicalName, String physicalName)
          parent EREntity and a child EREntity.
abstract  int createIdentifyingRelationship(int parentEntity, int childEntity, String logicalName, String physicalName, int erIndex)
          parent EREntity and a child EREntity.
abstract  int createMultiToMultiRelationship(int parentEntity, int childEntity, String logicalName, String physicalName)
          ER entities.
abstract  int createNonIdentifyingRelationship(int parentEntity, int childEntity, String logicalName, String physicalName)
          between a parent EREntity and a child EREntity.
abstract  int createNonIdentifyingRelationship(int parentEntity, int childEntity, String logicalName, String physicalName, int erIndex)
          between a parent EREntity and a child EREntity.
abstract  int createSubtypeRelationship(int parentEntity, int childEntity, String logicalName, String physicalName)
           
abstract  void delete(IElement element)
           
 

Method Detail

createERModel

abstract int createERModel(IModel root,
                           String name)
Parameters:
name -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       MULTI_ER_MODEL_ERROR_KEY - if an ER model cannot be created because an ER model exists in the project.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createEREntity

abstract int createEREntity(int schema,
                            String logicalName,
                            String physicalName)
Parameters:
schema -
logicalName -
physicalName -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createERAttribute

abstract int createERAttribute(int entity,
                               String logicalName,
                               String physicalName,
                               int type)
Parameters:
entity -
logicalName -
physicalName -
type -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createERAttribute

abstract int createERAttribute(int entity,
                               String logicalName,
                               String physicalName,
                               int domain)
entity.

Parameters:
entity -
logicalName -
physicalName -
domain -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createERDatatype

abstract int createERDatatype(int erModel,
                              String name)
Parameters:
erModel -
name -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createERDomain

abstract int createERDomain(int erModel,
                            int parentDomain,
                            String logicalName,
                            String physicalName,
                            int type)
Parameters:
erModel -
parentDomain -
logicalName -
physicalName -
type -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createIdentifyingRelationship

abstract int createIdentifyingRelationship(int parentEntity,
                                           int childEntity,
                                           String logicalName,
                                           String physicalName)
parent EREntity and a child EREntity.

Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
Returns:
       Keys:
       
       Values:
       
       Keys:
       INVALID_ERINDEX_FOR_RELATIONSHIP_ERROR_KEY - if an ERIndex is not unique.
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createIdentifyingRelationship

abstract int createIdentifyingRelationship(int parentEntity,
                                           int childEntity,
                                           String logicalName,
                                           String physicalName,
                                           int erIndex)
parent EREntity and a child EREntity.

Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
erIndex -
Returns:
       Keys:
       
       Values:
       
       Keys:
       INVALID_ERINDEX_FOR_RELATIONSHIP_ERROR_KEY - if an ERIndex is not unique.
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createNonIdentifyingRelationship

abstract int createNonIdentifyingRelationship(int parentEntity,
                                              int childEntity,
                                              String logicalName,
                                              String physicalName)
between a parent EREntity and a child EREntity.

Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createNonIdentifyingRelationship

abstract int createNonIdentifyingRelationship(int parentEntity,
                                              int childEntity,
                                              String logicalName,
                                              String physicalName,
                                              int erIndex)
between a parent EREntity and a child EREntity.

Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
erIndex -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createMultiToMultiRelationship

abstract int createMultiToMultiRelationship(int parentEntity,
                                            int childEntity,
                                            String logicalName,
                                            String physicalName)
ER entities.

Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       SELF_RELATION_KEY - if the self relationship is not allowed.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createSubtypeRelationship

abstract int createSubtypeRelationship(int parentEntity,
                                       int childEntity,
                                       String logicalName,
                                       String physicalName)
Parameters:
parentEntity -
childEntity -
logicalName -
physicalName -
Returns:
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       SUBTYPE_LOOP_KEY - if the subtype relationship is set.
       SUBTYPE_EXIST_KEY - if the subtype already exists.
       NO_NAME_ERROR_KEY - if the name is empty.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.
       
Throws:
InvalidEditingException

createERIndex

abstract int createERIndex(String name,
                           int parentEntity,
                           boolean isUnique,
                           boolean isKey,
                           int[] erAttributes)
Parameters:
name -
parentEntity -
isUnique -
isKey -
erAttributes -
Throws:
InvalidEditingException -
       Keys:
       
       Values:
       
       
Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       INVALID_ATTRIBUTE_FOR_ERINDEX_ERROR_KEY - if an attribute does not belong to ERIndex's parent entity.
       NAME_DOUBLE_ERROR_KEY - An element with the same name already exists.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       
       Values:
       Error messages for exceptions.
       

delete

abstract void delete(IElement element)
Parameters:
element -
Throws:
InvalidEditingException -
       Keys:
       
       Values:
       
       Keys:
       PARAMETER_ERROR_KEY - if a parameter is not set properly.
       ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
       BAD_TRANSACTION_KEY - Bad Transaction.
       HAS_EXCEPTION_KEY - if an exception has occurred.
       READ_ONLY_KEY - if a read-only element is edited.
       
       Values:
       Error messages for exceptions.