001// license-header java merge-point
002//
003// Attention: generated code (by Metafacade.vsl) - do not modify!
004//
005package org.andromda.cartridges.ejb.metafacades;
006
007import java.util.Collection;
008import java.util.List;
009import org.andromda.metafacades.uml.Entity;
010
011/**
012 * Represents an entity EJB.
013 *
014 * Metafacade interface to be used by AndroMDA cartridges.
015 */
016public interface EJBEntityFacade
017    extends Entity
018{
019    /**
020     * Indicates the metafacade type (used for metafacade mappings).
021     *
022     * @return boolean always <code>true</code>
023     */
024    public boolean isEJBEntityFacadeMetaType();
025
026    /**
027     * Find all associations that define relations to other entities.
028     * This method returns the source association ends for all associations that define
029     * a container managed relation.  The returned collection includes both
030     * direct relations and inherited relations. A direct relation is an association with some other
031     * class matching the following criteria: 1) The class at the other side of the association is
032     * stereotyped <<Entity>> 2) The association is navigable from to the other side.
033     * An inherited relation is an association from an abstract super type matching the following
034     * criteria: 1) The inheritance path to this abstract super type, including this super type
035     * itself, consists only of abstract classes with stereotype <<Entity>> 2)  The class at the
036     * other side of the association is stereotyped <<Entity>>. 3) The association is navigable from
037     * this abstract super type to the other side.
038     * Relations must match the following integrity constraint:
039     * - The <<Entity>> at the target end is not abstract.
040     * The integrity constraint is necessary because the target of a container managed relation in
041     * the EJB framework must be a concrete entity bean; there is no such thing as an
042     * "abstract entity bean" in the EJB specification. It is possible, however, to generate and
043     * compile code for this case, an error will only show up at deploy time. In order to catch
044     * this kind of error at the earliest possible stage, this method checks the integrity
045     * constraint and throws an exception if it is violated.
046     * @return Collection
047     */
048    public Collection getAllEntityRelations();
049
050    /**
051     * All instanceAttributes for this entity. The list includes the instanceAttributes that are
052     * inherited from super classes. The list contains the inherited instanceAttributes first,
053     * followed by the instanceAttributes defined in this class.
054     * @return List
055     */
056    public List getAllInstanceAttributes();
057
058    /**
059     * Gets all constants for this entity. Constants are defined as static read-only attributes
060     * which do NOT have the <<EnvEntry>> stereotype.   If 'follow' is true, then the inheritance
061     * hierachy will be followed and we'll retrieve all constants from any super types as well.
062     * @param follow boolean
063     * @return Collection
064     */
065    public Collection getConstants(boolean follow);
066
067    /**
068     * Gets create methods for the entity.  If 'follow'l is set to true, create methods from any
069     * super types will also be retrieved by following up the inheritance chain.
070     * @param follow boolean
071     * @return Collection
072     */
073    public Collection getCreateMethods(boolean follow);
074
075    /**
076     * TODO: Model Documentation for
077     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.entityRelations
078     * @return Collection
079     */
080    public Collection getEntityRelations();
081
082    /**
083     * Gets all env-entries for the specified entity EJB. Env-entries are stored as static
084     * attributes on the entity and stereotyped as <<EnvEntry>>.  If 'follow' is true, then the
085     * inheritance hierachy will be followed and we'll retrieve all env-entries from any super types
086     * as well.
087     * @param follow boolean
088     * @return Collection
089     */
090    public Collection getEnvironmentEntries(boolean follow);
091
092    /**
093     * A String representing the name of a home interface for this entity EJB.
094     * @return String
095     */
096    public String getHomeInterfaceName();
097
098    /**
099     * All inherited instanceAttributes this class.  The instanceAttributes are grouped by the class
100     * that defines the instanceAttributes, with instanceAttributes from the most removed super
101     * class first.
102     * @return List
103     */
104    public List getInheritedInstanceAttributes();
105
106    /**
107     * TODO: Model Documentation for
108     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.jndiName
109     * @return String
110     */
111    public String getJndiName();
112
113    /**
114     * Gets select methods for the entity, if all is set to 'true' then ALL select methods will be
115     * retrieved (including those inherited from any superclasses).
116     * @param follow boolean
117     * @return Collection
118     */
119    public Collection getSelectMethods(boolean follow);
120
121    /**
122     * TODO: Model Documentation for
123     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.getSqlType
124     * @return String
125     */
126    public String getSqlType();
127
128    /**
129     * Gets the transaction type for this entity (i.e. REQUIRED, etc)
130     * @return String
131     */
132    public String getTransactionType();
133
134    /**
135     * TODO: Model Documentation for
136     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.valueDependencies
137     * @return Collection
138     */
139    public Collection getValueDependencies();
140
141    /**
142     * A string indicating whether the Bean is a local or remotely accessable bean.
143     * @return String
144     */
145    public String getViewType();
146
147    /**
148     * TODO: Model Documentation for
149     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.isAttributePresent
150     * @param att String
151     * @return boolean
152     */
153    public boolean isAttributePresent(String att);
154
155    /**
156     * TODO: Model Documentation for
157     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.isIdentifierPresent
158     * @param id String
159     * @return boolean
160     */
161    public boolean isIdentifierPresent(String id);
162
163    /**
164     * TODO: Model Documentation for
165     * org.andromda.cartridges.ejb.metafacades.EJBEntityFacade.isOperationPresent
166     * @param op String
167     * @return boolean
168     */
169    public boolean isOperationPresent(String op);
170
171    /**
172     * Whether or not to allow a synthetic (auto generated) create method.
173     * @return boolean
174     */
175    public boolean isSyntheticCreateMethodAllowed();
176}