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
 String getAttributeNameList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute names.
 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.
 String getAttributeTypeList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute types.
 Collection getBusinessOperations()
           All business operations of the entity, these include any operations that aren't queries.
 Collection getChildEnds()
           Gets any children association ends (i.e.
 Collection getEntityReferences()
           All entities referenced by this entity.
 Collection getIdentifierAssociationEnds()
           Gets all the associationEnds of this entity marked with the identifiers stereotype.
 Collection getIdentifiers()
           All the attributes of the entity which make up its identifier (primary key).
 Collection getIdentifiers(boolean follow)
           Gets all identifiers for an entity.
 Short getMaxSqlNameLength()
           The maximum length a SQL name may be.
 String getOperationCallFromAttributes(boolean withIdentifiers)
           Gets the attributes as a list within an operation call, optionally including the type names and the identifier attributes.
 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.
 Collection getProperties(boolean follow, boolean withIdentifiers)
           Gets all properties of this entity, this includes the attributes and navigable association ends of the entity.
 Collection getQueryOperations()
           Returns all the operations that can perform queries on the entity.
 Collection getQueryOperations(boolean follow)
           Gets all query operations for an entity.
 String getRequiredAttributeNameList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of required attribute names.
 Collection getRequiredAttributes(boolean follow, boolean withIdentifiers)
           Returns all attributes that are specified as 'required' in the model.
 String getRequiredAttributeTypeList(boolean follow, boolean withIdentifiers)
           Gets a comma seperated list of attribute types with are required.
 Collection getRequiredProperties(boolean follow, boolean withIdentifiers)
           Gets all required properties for this entity.
 String getRequiredPropertyNameList(boolean follow, boolean withIdentifiers)
           Creates a comma seperated list of the required property names.
 String getRequiredPropertyTypeList(boolean follow, boolean withIdentifiers)
           A comma seperated list of the required property types.
 String getSchema()
           The name of the schema that contains the database table
 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, 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

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

Returns:
always true

getAttributeNameList

public 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

public 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

public 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

public Collection getBusinessOperations()

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


getChildEnds

public 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).


getEntityReferences

public Collection getEntityReferences()

All entities referenced by this entity.


getIdentifierAssociationEnds

public Collection getIdentifierAssociationEnds()

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


getIdentifiers

public 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

public 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

public Short getMaxSqlNameLength()

The maximum length a SQL name may be.


getOperationCallFromAttributes

public String getOperationCallFromAttributes(boolean withIdentifiers)

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


getOperationCallFromAttributes

public 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

public 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

public 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

public 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

public Collection getQueryOperations()

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


getRequiredAttributeNameList

public 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

public 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

public 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

public 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

public String getRequiredPropertyNameList(boolean follow,
                                          boolean withIdentifiers)

Creates a comma seperated list of the required property names.


getRequiredPropertyTypeList

public String getRequiredPropertyTypeList(boolean follow,
                                          boolean withIdentifiers)

A comma seperated list of the required property types.


getSchema

public String getSchema()

The name of the schema that contains the database table


getTableName

public String getTableName()

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


isChild

public 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

public boolean isCompositeIdentifier()

isDynamicIdentifiersPresent

public boolean isDynamicIdentifiersPresent()

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


isIdentifiersPresent

public boolean isIdentifiersPresent()

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


isUsingAssignedIdentifier

public boolean isUsingAssignedIdentifier()

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


isUsingForeignIdentifier

public 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-2006 The AndroMDA Team. All Rights Reserved.