1 // license-header java merge-point 2 // 3 // Attention: generated code (by Metafacade.vsl) - do not modify! 4 // 5 package org.andromda.cartridges.ejb3.metafacades; 6 7 import org.andromda.metafacades.uml.EntityAttribute; 8 9 /** 10 * Represents an EJB attribute. 11 * 12 * Metafacade interface to be used by AndroMDA cartridges. 13 */ 14 public interface EJB3EntityAttributeFacade 15 extends EntityAttribute 16 { 17 /** 18 * Indicates the metafacade type (used for metafacade mappings). 19 * 20 * @return boolean always <code>true</code> 21 */ 22 public boolean isEJB3EntityAttributeFacadeMetaType(); 23 24 /** 25 * Defines the column definition DDL used when creating table schema - use to override default 26 * container DDL. This is automatically defined if the attribute type is an enumeration. 27 * @return String 28 */ 29 public String getColumnDefinition(); 30 31 /** 32 * Set the column precision value. Only applies to double and float columns. 33 * ie Use for setting dollar precision. 34 * @return String 35 */ 36 public String getColumnPrecision(); 37 38 /** 39 * Column scale use denotes the decimal precision. 40 * ie Use to set the 2 digit cent scale. 41 * @return String 42 */ 43 public String getColumnScale(); 44 45 /** 46 * Returns the persistent property/field enumeration type. Will return either ORDINAL for enums 47 * mapped as an integer or STRING for enums mapped as a string. If not specified on an 48 * enumerated type, then the ORDINAL type is assumed 49 * @return String 50 */ 51 public String getEnumerationType(); 52 53 /** 54 * Gets the fetch type for this attribute. Default fetch type for attribute is EAGER. 55 * This will return either EAGER or LAZY. 56 * @return String 57 */ 58 public String getFetchType(); 59 60 /** 61 * Returns the amount to increment the generator value when allocating id numbers. 62 * @return int 63 */ 64 public int getGeneratorAllocationSize(); 65 66 /** 67 * Returns the org.hibernate.annotations.GenericGenerator strategy either a predefined Hibernate 68 * strategy or a fully qualified class name. 69 * @return String 70 */ 71 public String getGeneratorGenericStrategy(); 72 73 /** 74 * Returns the inital value assigned when allocating ids from the specified generator. 75 * @return int 76 */ 77 public int getGeneratorInitialValue(); 78 79 /** 80 * Return the name for the generator, if one exists and should exists for SequenceGenerator and 81 * TableGenerator, which can be reference by the id for its generator. 82 * @return String 83 */ 84 public String getGeneratorName(); 85 86 /** 87 * Returns the name of the primary key value in the generator table assigned to this set of 88 * generated values. 89 * @return String 90 */ 91 public String getGeneratorPkColumnValue(); 92 93 /** 94 * Returns the sequence name or table name for the generator depending on the generator type 95 * specified. 96 * @return String 97 */ 98 public String getGeneratorSourceName(); 99 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 }