org.andromda.metafacades.uml
Interface Entity

All Superinterfaces:
ClassifierFacade, GeneralizableElementFacade, ModelElementFacade
All Known Subinterfaces:
ManageableEntity

public interface Entity
extends ClassifierFacade

Represents a persistent entity.

Metafacade interface to be used by AndroMDA cartridges.


Method Summary
 java.util.Collection getAllEntityReferences()
           Returns a collection of all entities this entity and its ancestors have a relation to.
 java.lang.String getAttributeNameList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute names.
 java.util.Collection getAttributes(boolean follow, boolean withIdentifiers)
           Gets all attributes of the entity, and optionally retieves the super entities attributes as well as excludes the entity's identifiers if 'withIdentifiers' is set to false.
 java.lang.String getAttributeTypeList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute types.
 java.util.Collection getBusinessOperations()
           All business operations of the entity, these include any operations that aren't queries.
 java.util.Collection getChildEnds()
           Gets any children association ends (i.e.
 java.util.Collection getEmbeddedValues()
           The embedded values belonging to this entity.
 java.util.Collection getEntityReferences()
           All entities referenced by this entity.
 java.util.Collection getIdentifierAssociationEnds()
           Gets all the associationEnds of this entity marked with the identifiers stereotype.
 java.util.Collection getIdentifiers()
           All the attributes of the entity which make up its identifier (primary key).
 java.util.Collection getIdentifiers(boolean follow)
           Gets all identifiers for an entity.
 java.lang.Short getMaxSqlNameLength()
           The maximum length a SQL name may be.
 java.lang.String getOperationCallFromAttributes(boolean withIdentifiers)
           Gets the attributes as a list within an operation call, optionally including the type names and the identifier attributes.
 java.lang.String getOperationCallFromAttributes(boolean withIdentifiers, boolean follow)
           Gets the attributes as a list within an operation call.
 EntityAssociationEnd getParentEnd()
           Returns the parent association end of this entity if its a child entity.
 java.util.Collection getProperties(boolean follow, boolean withIdentifiers)
           Gets all properties of this entity, this includes the attributes and navigable association ends of the entity.
 java.util.Collection getQueryOperations()
           Returns all the operations that can perform queries on the entity.
 java.util.Collection getQueryOperations(boolean follow)
           Gets all query operations for an entity.
 java.lang.String getRequiredAttributeNameList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of required attribute names.
 java.util.Collection getRequiredAttributes(boolean follow, boolean withIdentifiers)
           Returns all attributes that are specified as 'required' in the model.
 java.lang.String getRequiredAttributeTypeList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute types with are required.
 java.util.Collection getRequiredProperties(boolean follow, boolean withIdentifiers)
           Gets all required properties for this entity.
 java.lang.String getRequiredPropertyNameList(boolean follow, boolean withIdentifiers)
           Creates a comma seperated list of the required property names.
 java.lang.String getRequiredPropertyTypeList(boolean follow, boolean withIdentifiers)
           A comma seperated list of the required property types.
 java.lang.String getSchema()
           The name of the schema that contains the database table
 java.lang.String getTableName()
           The name of the database table to which this entity is persisted.
 boolean isChild()
           Returns true/false depending on whether or not this entity represetns a child in an association (this occurs when this entity is on the opposite end of an assocation end defined as composite).
 boolean isCompositeIdentifier()
           
 boolean isDynamicIdentifiersPresent()
           True if the entity has its identifiers dynamically added, false otherwise.
 boolean isEntityMetaType()
          Indicates the metafacade type (used for metafacade mappings).
 boolean isIdentifiersPresent()
           True if the entity has any identifiers defined, false otherwise.
 boolean isUsingAssignedIdentifier()
           Indiciates if this entity is using an assigned identifier or not.
 boolean isUsingForeignIdentifier()
           Indicates whether or not this entity is using a foreign identifier as its identifiers.
 
Methods inherited from interface org.andromda.metafacades.uml.ClassifierFacade
findAttribute, getAbstractions, getAllAssociatedClasses, getAllProperties, getAllRequiredConstructorParameters, getArray, getArrayName, getAssociatedClasses, getAssociationEnds, getAttributes, getAttributes, getFullyQualifiedArrayName, getImplementationOperations, getImplementedInterfaceList, getInstanceAttributes, getInstanceOperations, getInterfaceAbstractions, getJavaNullString, getNavigableConnectingEnds, getNavigableConnectingEnds, getNonArray, getOperationCallFromAttributes, getOperations, getProperties, getProperties, getRequiredConstructorParameters, getSerialVersionUID, getStaticAttributes, getStaticOperations, getSuperClass, getWrapperName, isAbstract, isArrayType, isAssociationClass, isBlobType, isBooleanType, isClassifierFacadeMetaType, isClobType, isCollectionType, isDataType, isDateType, isEmbeddedValue, isEnumeration, isFileType, isInterface, isLeaf, isListType, isMapType, isPrimitive, isSetType, isStringType, isTimeType
 
Methods inherited from interface org.andromda.metafacades.uml.GeneralizableElementFacade
findTaggedValue, getAllGeneralizations, getAllSpecializations, getGeneralization, getGeneralizationLinks, getGeneralizationList, getGeneralizationRoot, getGeneralizations, getSpecializations, isGeneralizableElementFacadeMetaType
 
Methods inherited from interface org.andromda.metafacades.uml.ModelElementFacade
copyTaggedValues, findTaggedValue, findTaggedValues, getConstraints, getConstraints, getDocumentation, getDocumentation, getDocumentation, getFullyQualifiedName, getFullyQualifiedName, getFullyQualifiedNamePath, getId, getLanguageMappings, getModel, getName, getPackage, getPackageName, getPackageName, getPackagePath, getRootPackage, getSourceDependencies, getStateMachineContext, getStereotypeNames, getStereotypes, getTaggedValues, getTargetDependencies, getTemplateParameter, getTemplateParameters, getValidationName, getValidationOwner, getVisibility, hasExactStereotype, hasStereotype, initialize, isBindingDependenciesPresent, isConstraintsPresent, isModelElementFacadeMetaType, isTemplateParametersPresent, translateConstraint, translateConstraints, translateConstraints, validateInvariants
 

Method Detail

isEntityMetaType

boolean isEntityMetaType()
Indicates the metafacade type (used for metafacade mappings).

Returns:
always true

getAllEntityReferences

java.util.Collection getAllEntityReferences()

Returns a collection of all entities this entity and its ancestors have a relation to.


getAttributeNameList

java.lang.String getAttributeNameList(boolean follow,
                                      boolean withIdentifiers)

Gets a comma seperated list of attribute names. If 'follow' is true, will travel up the inheritance hiearchy to include attributes in parent entities as well. If 'withIdentifiers' is true, will include identifiers.


getAttributeTypeList

java.lang.String getAttributeTypeList(boolean follow,
                                      boolean withIdentifiers)

Gets a comma seperated list of attribute types. If 'follow' is true, will travel up the inheritance hiearchy to include attributes in parent entities as well. If 'withIdentifiers' is true, will include identifiers.


getAttributes

java.util.Collection getAttributes(boolean follow,
                                   boolean withIdentifiers)

Gets all attributes of the entity, and optionally retieves the super entities attributes as well as excludes the entity's identifiers if 'withIdentifiers' is set to false.


getBusinessOperations

java.util.Collection getBusinessOperations()

All business operations of the entity, these include any operations that aren't queries.


getChildEnds

java.util.Collection getChildEnds()

Gets any children association ends (i.e. entity association ends that are participants in an association with this entity and this entity has composite aggregation defined for those associations).


getEmbeddedValues

java.util.Collection getEmbeddedValues()

The embedded values belonging to this entity.


getEntityReferences

java.util.Collection getEntityReferences()

All entities referenced by this entity.


getIdentifierAssociationEnds

java.util.Collection getIdentifierAssociationEnds()

Gets all the associationEnds of this entity marked with the identifiers stereotype.


getIdentifiers

java.util.Collection getIdentifiers()

All the attributes of the entity which make up its identifier (primary key). Will search any super classes as well. If no identifiers exist, a default identifier will be created if the allowDefaultIdentifiers property is set to true.


getIdentifiers

java.util.Collection getIdentifiers(boolean follow)

Gets all identifiers for an entity. If 'follow' is true, and if no identifiers can be found on the entity, a search up the inheritance chain will be performed, and the identifiers from the first super class having them will be used. If no identifiers exist, a default identifier will be created if the allowDefaultIdentifiers property is set to true.


getMaxSqlNameLength

java.lang.Short getMaxSqlNameLength()

The maximum length a SQL name may be.


getOperationCallFromAttributes

java.lang.String getOperationCallFromAttributes(boolean withIdentifiers)

Gets the attributes as a list within an operation call, optionally including the type names and the identifier attributes.


getOperationCallFromAttributes

java.lang.String getOperationCallFromAttributes(boolean withIdentifiers,
                                                boolean follow)

Gets the attributes as a list within an operation call. If 'withTypeNames' is true, it will include the type names, if 'withIdentifiers' is true it will include the identifiers. If 'follow' is true it will follow the inheritance hierarchy and get the attributes of the super class as well.


getParentEnd

EntityAssociationEnd getParentEnd()

Returns the parent association end of this entity if its a child entity. The parent is the entity that is the participant the association that has composite aggregation defined. Will return null if the entity has no parent.


getProperties

java.util.Collection getProperties(boolean follow,
                                   boolean withIdentifiers)

Gets all properties of this entity, this includes the attributes and navigable association ends of the entity. The 'follow' flag indcates whether or not the inheritance hierachy should be followed when getting all the properties. The 'withIdentifiers' flag indicates whether or not identifiers should be included in the collection of properties.


getQueryOperations

java.util.Collection getQueryOperations(boolean follow)

Gets all query operations for an entity. If 'follow' is true, and if no query operations can be found on the entity, a search up the inheritance chain will be performed, and the identifiers from the first super class having them will be used. If no identifiers exist, a default identifier will be created if the allowDefaultIdentifiers property is set to true.


getQueryOperations

java.util.Collection getQueryOperations()

Returns all the operations that can perform queries on the entity.


getRequiredAttributeNameList

java.lang.String getRequiredAttributeNameList(boolean follow,
                                              boolean withIdentifiers)

Gets a comma seperated list of required attribute names. If 'follow' is true, will travel up the inheritance hiearchy to include attributes in parent entities as well. If 'withIdentifiers' is true, will include identifiers.


getRequiredAttributeTypeList

java.lang.String getRequiredAttributeTypeList(boolean follow,
                                              boolean withIdentifiers)

Gets a comma seperated list of attribute types with are required. If 'follow' is true, will travel up the inheritance hiearchy to include attributes in parent entities as well. If 'withIdentifiers' is true, will include identifiers.


getRequiredAttributes

java.util.Collection getRequiredAttributes(boolean follow,
                                           boolean withIdentifiers)

Returns all attributes that are specified as 'required' in the model. If 'follow' is true, then required attributes in super classes will also be returned, if false, just the ones directly on the entity will be returned. If 'withIdentifiers' is true, the identifiers will be include, if false, no identifiers will be included.


getRequiredProperties

java.util.Collection getRequiredProperties(boolean follow,
                                           boolean withIdentifiers)

Gets all required properties for this entity. These consist of any required attributes as well as navigable associations that are marked as 'required'. If 'follow' is true, then the inheritance hierchy will be followed and all required properties from super classes will be included as well.

If 'withIdentifiers' is true, the identifiers will be include, if false, no identifiers will be included.


getRequiredPropertyNameList

java.lang.String getRequiredPropertyNameList(boolean follow,
                                             boolean withIdentifiers)

Creates a comma seperated list of the required property names.


getRequiredPropertyTypeList

java.lang.String getRequiredPropertyTypeList(boolean follow,
                                             boolean withIdentifiers)

A comma seperated list of the required property types.


getSchema

java.lang.String getSchema()

The name of the schema that contains the database table


getTableName

java.lang.String getTableName()

The name of the database table to which this entity is persisted.


isChild

boolean isChild()

Returns true/false depending on whether or not this entity represetns a child in an association (this occurs when this entity is on the opposite end of an assocation end defined as composite).


isCompositeIdentifier

boolean isCompositeIdentifier()

isDynamicIdentifiersPresent

boolean isDynamicIdentifiersPresent()

True if the entity has its identifiers dynamically added, false otherwise.


isIdentifiersPresent

boolean isIdentifiersPresent()

True if the entity has any identifiers defined, false otherwise.


isUsingAssignedIdentifier

boolean isUsingAssignedIdentifier()

Indiciates if this entity is using an assigned identifier or not.


isUsingForeignIdentifier

boolean isUsingForeignIdentifier()

Indicates whether or not this entity is using a foreign identifier as its identifiers. That is: the foreignIdentifier flag was set on an incoming association end and the entity is therefore using the related foreign parent entity's identifier.



Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.