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

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

public ERModelEditor

Interface to edit (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  IERAttribute createERAttribute(IEREntity entity, String logicalName, String physicalName, IERDatatype type)
          Create an ER attribute in an ER entity.
abstract  IERAttribute createERAttribute(IEREntity entity, String logicalName, String physicalName, IERDomain domain)
          Create an ER attribute with a domain in an ER entity.
abstract  IERDatatype createERDatatype(IERModel erModel, String name)
          Create an data type in a schema.
abstract  IERDomain createERDomain(IERModel erModel, IERDomain parentDomain, String logicalName, String physicalName, IERDatatype type)
          Create a domain in a schema or domain.
abstract  IEREntity createEREntity(IERSchema schema, String logicalName, String physicalName)
          Create an ER entity in a schema.
abstract  IERIndex createERIndex(String name, IEREntity parentEntity, boolean isUnique, boolean isKey, IERAttribute[] erAttributes)
          Create an Index of ERAttribute.
abstract  IERModel createERModel(IModel root, String name)
          Create an ER model in a project.
abstract  IERRelationship createIdentifyingRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName)
          Create an identifying relationship between a parent EREntity and a child EREntity.
abstract  IERRelationship createIdentifyingRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName, IERIndex erIndex)
          Create an identifying relationship between a parent EREntity and a child EREntity.
abstract  IERRelationship createMultiToMultiRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName)
          Create a multi-to-multi relationship between ER entities.
abstract  IERRelationship createNonIdentifyingRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName)
          Create a non-identifying relationship between a parent EREntity and a child EREntity.
abstract  IERRelationship createNonIdentifyingRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName, IERIndex erIndex)
          Create a non-identifying relationship between a parent EREntity and a child EREntity.
abstract  IERSubtypeRelationship createSubtypeRelationship(IEREntity parentEntity, IEREntity childEntity, String logicalName, String physicalName)
          Create a subtype between EREntities.
abstract  void delete(IElement element)
          Delete models or elements from a project.
 

Method Detail

createERModel

abstract IERModel createERModel(IModel root,
                                String name)
Create an ER model in a project.

Parameters:
name - ER Model Name
Returns:
IERModel ER Model
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createEREntity

abstract IEREntity createEREntity(IERSchema schema,
                                  String logicalName,
                                  String physicalName)
Create an ER entity in a schema.

Parameters:
schema - Schema
logicalName - Logical Name
physicalName - Physical Name
Returns:
IEREntity ER Entity
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createERAttribute

abstract IERAttribute createERAttribute(IEREntity entity,
                                        String logicalName,
                                        String physicalName,
                                        IERDatatype type)
Create an ER attribute in an ER entity.

Parameters:
entity - ER Entity
logicalName - Logical Name
physicalName - Physical Name
type - Data Type of Attribute
Returns:
IERAttribute ER Attribute
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createERAttribute

abstract IERAttribute createERAttribute(IEREntity entity,
                                        String logicalName,
                                        String physicalName,
                                        IERDomain domain)
Create an ER attribute with a domain in an ER entity.

Parameters:
entity - ER Entity
logicalName - Logical Name
physicalName - Physical Name
domain - Domain
Returns:
IERAttribute ER Attribute
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createERDatatype

abstract IERDatatype createERDatatype(IERModel erModel,
                                      String name)
Create an data type in a schema.

Parameters:
erModel - ER Model
name - Data Type Name
Returns:
IERDatatype ER Data Type
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createERDomain

abstract IERDomain createERDomain(IERModel erModel,
                                  IERDomain parentDomain,
                                  String logicalName,
                                  String physicalName,
                                  IERDatatype type)
Create a domain in a schema or domain.

Parameters:
erModel - ER Model
parentDomain - Parent Domain
logicalName - Logical Name
physicalName - Physical Name
type - Data Type
Returns:
IERDomain Domain
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createIdentifyingRelationship

abstract IERRelationship createIdentifyingRelationship(IEREntity parentEntity,
                                                       IEREntity childEntity,
                                                       String logicalName,
                                                       String physicalName)
Create an identifying relationship between a parent EREntity and a child EREntity.

Parameters:
parentEntity - Parent Entity
childEntity - Child Entity
logicalName - Identifying Logical Name
physicalName - Identifying Physical Name
Returns:
IERRelationship ER Identifying Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createIdentifyingRelationship

abstract IERRelationship createIdentifyingRelationship(IEREntity parentEntity,
                                                       IEREntity childEntity,
                                                       String logicalName,
                                                       String physicalName,
                                                       IERIndex erIndex)
Create an identifying relationship between a parent EREntity and a child EREntity.

Parameters:
parentEntity - Parent Entity
childEntity - Child Entity
logicalName - Identifying Logical Name
physicalName - Identifying Physical Name
erIndex - ERIndex of the relationship
Returns:
IERRelationship ER Identifying Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createNonIdentifyingRelationship

abstract IERRelationship createNonIdentifyingRelationship(IEREntity parentEntity,
                                                          IEREntity childEntity,
                                                          String logicalName,
                                                          String physicalName)
Create a non-identifying relationship between a parent EREntity and a child EREntity.

Parameters:
parentEntity - Parent Entity
childEntity - Child Entity
logicalName - Non-Identifying Relationship Logical Name
physicalName - Non-Identifying Relationship Physical Name
Returns:
IERRelationship ER Non-Identifying Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createNonIdentifyingRelationship

abstract IERRelationship createNonIdentifyingRelationship(IEREntity parentEntity,
                                                          IEREntity childEntity,
                                                          String logicalName,
                                                          String physicalName,
                                                          IERIndex erIndex)
Create a non-identifying relationship between a parent EREntity and a child EREntity.

Parameters:
parentEntity - Parent Entity
childEntity - Child Entity
logicalName - Non-Identifying Relationship Logical Name
physicalName - Non-Identifying Relationship Physical Name
erIndex - ERIndex of the relationship
Returns:
IERRelationship ER Non-Identifying Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createMultiToMultiRelationship

abstract IERRelationship createMultiToMultiRelationship(IEREntity parentEntity,
                                                        IEREntity childEntity,
                                                        String logicalName,
                                                        String physicalName)
Create a multi-to-multi relationship between ER entities.

Parameters:
entity1 - ER Entity 1
entity2 - ER Entity 2
logicalName - Multi-to-Multi Relationship Logical Name
physicalName - Multi-to-Multi Relationship Physical Name
Returns:
IERRelationship ER Multi-to-Multi Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createSubtypeRelationship

abstract IERSubtypeRelationship createSubtypeRelationship(IEREntity parentEntity,
                                                          IEREntity childEntity,
                                                          String logicalName,
                                                          String physicalName)
Create a subtype between EREntities.

Parameters:
entity1 - ER Entity 1
entity2 - ER Entity 2
logicalName - Subtype Logical Name
physicalName - Physical Name
Returns:
IERSubtypeRelationship ER Subtype Relationship
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.

createERIndex

abstract IERIndex createERIndex(String name,
                                IEREntity parentEntity,
                                boolean isUnique,
                                boolean isKey,
                                IERAttribute[] erAttributes)
Create an Index of ERAttribute.

Parameters:
name - Index Name
parentEntity - Parent EREntity
isUnique - Is unique or not
isKey - Is Key(AK,IE) or not
erAttributes - Target Attributes
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.
      READ_ONLY_KEY - if a read-only element is edited.
Values: 
      Error messages for exceptions.

delete

abstract void delete(IElement element)
Delete models or elements from a project.

Parameters:
element - Element
Throws:
InvalidEditingException - InvalidEditingException occurs.
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.