001// license-header java merge-point
002//
003// Attention: generated code (by Metafacade.vsl) - do not modify!
004//
005package org.andromda.cartridges.ejb3.metafacades;
006
007import org.andromda.metafacades.uml.EntityAttribute;
008
009/**
010 * Represents an EJB attribute.
011 *
012 * Metafacade interface to be used by AndroMDA cartridges.
013 */
014public interface EJB3EntityAttributeFacade
015    extends EntityAttribute
016{
017    /**
018     * Indicates the metafacade type (used for metafacade mappings).
019     *
020     * @return boolean always <code>true</code>
021     */
022    public boolean isEJB3EntityAttributeFacadeMetaType();
023
024    /**
025     * Defines the column definition DDL used when creating table schema - use to override default
026     * container DDL.  This is automatically defined if the attribute type is an enumeration.
027     * @return String
028     */
029    public String getColumnDefinition();
030
031    /**
032     * Set the column precision value.  Only applies to double and float columns.
033     * ie Use for setting dollar precision.
034     * @return String
035     */
036    public String getColumnPrecision();
037
038    /**
039     * Column scale use denotes the decimal precision.
040     * ie Use to set the 2 digit cent scale.
041     * @return String
042     */
043    public String getColumnScale();
044
045    /**
046     * Returns the persistent property/field enumeration type.  Will return either ORDINAL for enums
047     * mapped as an integer or STRING for enums mapped as a string.  If not specified on an
048     * enumerated type, then the ORDINAL type is assumed
049     * @return String
050     */
051    public String getEnumerationType();
052
053    /**
054     * Gets the fetch type for this attribute.  Default fetch type for attribute is EAGER.
055     * This will return either EAGER or LAZY.
056     * @return String
057     */
058    public String getFetchType();
059
060    /**
061     * Returns the amount to increment the generator value when allocating id numbers.
062     * @return int
063     */
064    public int getGeneratorAllocationSize();
065
066    /**
067     * Returns the org.hibernate.annotations.GenericGenerator strategy either a predefined Hibernate
068     * strategy or a fully qualified class name.
069     * @return String
070     */
071    public String getGeneratorGenericStrategy();
072
073    /**
074     * Returns the inital value assigned when allocating ids from the specified generator.
075     * @return int
076     */
077    public int getGeneratorInitialValue();
078
079    /**
080     * Return the name for the generator, if one exists and should exists for SequenceGenerator and
081     * TableGenerator, which can be reference by the id for its generator.
082     * @return String
083     */
084    public String getGeneratorName();
085
086    /**
087     * Returns the name of the primary key value in the generator table assigned to this set of
088     * generated values.
089     * @return String
090     */
091    public String getGeneratorPkColumnValue();
092
093    /**
094     * Returns the sequence name or table name for the generator depending on the generator type
095     * specified.
096     * @return String
097     */
098    public String getGeneratorSourceName();
099
100    /**
101     * Determine the generator type for the Id annotation on the entity attribute - the PK strategy.
102     * If the attribute type is numeric, the default generator type is AUTO.  Otherwise, the
103     * generator type is NONE, ie for String types.
104     * @return String
105     */
106    public String getGeneratorType();
107
108    /**
109     * Returns the user overridden lob type for this property.  This is set via tagged value
110     * andromda_persistence_lob_type.  Default values are String for Clob and byte[] for Blob.
111     * @return String
112     */
113    public String getLobType();
114
115    /**
116     * The overridden hibernate type for the annotation on the entity attribute, to manually specify
117     * a type using the @org.hibernate.annotations.Type or in other persistence provider. Generally
118     * used for Boolean types in legacy databases, i.e yes_no, true_false. Could be:The name of a
119     * Hibernate basic type: integer, string, character, date, timestamp, float, binary,
120     * serializable, object, blob etc.; The name of a Java class with a default basic type: int,
121     * float, char, String, java.util.Date, java.lang.Integer, java.sql.Clob etc.; The
122     * name of a serializable Java class; The class name of a custom type:
123     * com.illflow.type.MyCustomType etc.
124     * @return String
125     */
126    public String getOverrideType();
127
128    /**
129     * Returns the temporal type value set via tagged value on attribute if one exists.  Expect one
130     * of DATE, TIME, TIMESTAMP or NONE.  This can only be applied to attributes of type
131     * java.util.Date or java.util.Calendar.
132     * @return String
133     */
134    public String getTemporalType();
135
136    /**
137     * Whether the column can be nullable.  False for identifier and unique fields.  If
138     * andromda_persistence_column_nullable tag is set, the tagged value is used.  Otherwise,
139     * determine if this attribute is required from the multiplicity set on the attribute.
140     * @return boolean
141     */
142    public boolean isColumnNullable();
143
144    /**
145     * Returns true if this attribute's type is an embedded value object.
146     * @return boolean
147     */
148    public boolean isContainsEmbeddedObject();
149
150    /**
151     * Determine if the fetch type for this attribute is eager loading.
152     * @return boolean
153     */
154    public boolean isEager();
155
156    /**
157     * Returns true if an auto generator has been assigned to this attribute, false otherwise.
158     * @return boolean
159     */
160    public boolean isGeneratorTypeAuto();
161
162    /**
163     * Returns true if a generic generator has been assigned to this attribute, false otherwise.
164     * @return boolean
165     */
166    public boolean isGeneratorTypeGeneric();
167
168    /**
169     * Returns true if an identity generator has been assigned to this attribute, false otherwise.
170     * @return boolean
171     */
172    public boolean isGeneratorTypeIdentity();
173
174    /**
175     * Returns true no generator has been assigned to this attribute, false otherwise.
176     * @return boolean
177     */
178    public boolean isGeneratorTypeNone();
179
180    /**
181     * Returns true if a sequence generator has been assigned to this attribute, false otherwise.
182     * @return boolean
183     */
184    public boolean isGeneratorTypeSequence();
185
186    /**
187     * Returns true if a table generator has been assigned to this attribute, false otherwise.
188     * @return boolean
189     */
190    public boolean isGeneratorTypeTable();
191
192    /**
193     * Specifies whether a mapped column should be included in SQL INSERT statements.
194     * @return boolean
195     */
196    public boolean isInsertEnabled();
197
198    /**
199     * Determine if the fetch type for this attribute is lazy loading.
200     * @return boolean
201     */
202    public boolean isLazy();
203
204    /**
205     * Returns true if the property type is specified as datatype::Blob or datatype::Clob.
206     * LOB type is CLOB for characters or BLOB for binary data.
207     * @return boolean
208     */
209    public boolean isLob();
210
211    /**
212     * Specifies whether a mapped column should be included in SQL UPDATE statements.
213     * @return boolean
214     */
215    public boolean isUpdateEnabled();
216
217    /**
218     * True is this attribute is a version property (optimistic lock value) for this entity class.
219     * @return boolean
220     */
221    public boolean isVersion();
222}