001package org.andromda.cartridges.hibernate; 002 003import org.andromda.core.profile.Profile; 004import org.andromda.metafacades.uml.UMLProfile; 005 006 007/** 008 * The Hibernate profile. Contains the profile information (tagged values, and stereotypes) for the Hibernate 009 * cartridge. 010 * 011 * @author Chad Brandon 012 * @author Carlos Cuenca 013 */ 014public class HibernateProfile 015 extends UMLProfile 016{ 017 /** 018 * The Profile instance from which we retrieve the mapped profile names. 019 */ 020 private static final Profile profile = Profile.instance(); 021 022 /* ----------------- Stereotypes -------------------- */ 023 /* ----------------- Tagged Values -------------------- */ 024 025 /** 026 * andromda_hibernate_xml_tagName 027 * Tag attached to entities, attributes, and/or association ends to specify the 028 * name of the XML node to generate when v3 XML Persistence is activated. 029 */ 030 public static final String TAGGEDVALUE_HIBERNATE_XML_TAG_NAME = profile.get("HIBERNATE_XML_TAG_NAME"); 031 032 /** 033 * andromda_hibernate_xml_embed 034 * Tag attached to association ends to determine if the associated entity should be embed 035 * in as XML when v3 XML Persistence is activated. 036 */ 037 public static final String TAGGEDVALUE_HIBERNATE_XML_EMBED = profile.get("HIBERNATE_XML_EMBED"); 038 039 /** 040 * andromda_hibernate_generator_class: Stores the hibernate generator class. 041 */ 042 public static final String TAGGEDVALUE_HIBERNATE_GENERATOR_CLASS = profile.get("HIBERNATE_GENERATOR_CLASS"); 043 044 /** 045 * andromda_hibernate_query: Stores a hibernate query string. 046 */ 047 public static final String TAGGEDVALUE_HIBERNATE_QUERY = profile.get("HIBERNATE_QUERY"); 048 049 /** 050 * andromda_hibernate_query_useNamedParameters 051 * Define whether the marked finder will use named parameters or positional parameters. 052 */ 053 public static final String TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS = 054 profile.get("HIBERNATE_USE_NAMED_PARAMETERS"); 055 056 /** 057 * andromda_ejb_viewType: Stores the viewtype of the Hibernate Session EJB. 058 */ 059 public static final String TAGGEDVALUE_EJB_VIEWTYPE = profile.get("EJB_VIEWTYPE"); 060 061 /** 062 * andromda_ejb_transaction_type: Stores the EJB service transaction type. 063 */ 064 public static final String TAGGEDVALUE_EJB_TRANSACTION_TYPE = profile.get("EJB_TRANSACTION_TYPE"); 065 066 /** 067 * andromda_hibernate_lazy 068 * Stores the aggregation kind (lazy/eager) of the Hibernate Session EJB. 069 */ 070 public static final String TAGGEDVALUE_HIBERNATE_LAZY = profile.get("HIBERNATE_LAZY"); 071 072 /** 073 * andromda_hibernate_inheritance 074 * Support for hibernate inheritance strategy, supported values are <ul> <li>class : one table per base class</li> 075 * <li>subclass : one table per subclass</li> <li>concrete : one table per class, subclasses may implement subclass 076 * or joined-subclass</li> <li>union-subclass: generate per concrete class with union-subclass mapping</li> <li> 077 * interface : generate interface and put attributes etc on subclasses</li> </ul> See Hibernate documentation for 078 * specific details. 079 */ 080 public static final String TAGGEDVALUE_HIBERNATE_INHERITANCE = profile.get("HIBERNATE_INHERITANCE"); 081 082 /** 083 * andromda_hibernate_outerjoin 084 * Defines outer join fetching on many to one and one to one associations 085 */ 086 public static final String TAGGEDVALUE_HIBERNATE_OUTER_JOIN = profile.get("HIBERNATE_OUTER_JOIN"); 087 088 /** 089 * andromda_hibernate_query_useCache 090 * Defines if a query within a finder method should use the cache 091 */ 092 public static final String TAGGEDVALUE_HIBERNATE_USE_QUERY_CACHE = profile.get("HIBERNATE_USE_QUERY_CACHE"); 093 094 /** 095 * andromda_hibernate_entity_cache 096 * Defines the cache type for the Entity 097 */ 098 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_CACHE = profile.get("HIBERNATE_ENTITY_CACHE"); 099 100 /** 101 * andromda_hibernate_entity_dynamicInsert 102 * Defines if the entity will limit the SQL insert statement to properties with values 103 */ 104 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_INSERT = 105 profile.get("HIBERNATE_ENTITY_DYNAMIC_INSERT"); 106 107 /** 108 * andromda_hibernate_entity_dynamicUpdate 109 * Defines if the entity will limit the SQL update statements to properties that are modified 110 */ 111 public static final String TAGGEDVALUE_HIBERNATE_ENTITY_DYNAMIC_UPDATE = 112 profile.get("HIBERNATE_ENTITY_DYNAMIC_UPDATE"); 113 114 /** 115 * andromda_hibernate_association_cache 116 * Defines the cache type for an association 117 */ 118 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_CACHE = profile.get("HIBERNATE_ASSOCIATION_CACHE"); 119 120 /** 121 * andromda_hibernate_entity_proxy: Defines if the entity has a proxy 122 */ 123 public static final String TAGGEDVALUE_HIBERNATE_PROXY = profile.get("HIBERNATE_PROXY"); 124 125 /** 126 * andromda_hibernate_ehcache_maxElementsInMemory 127 * Defines the maximum number of objects that will be created in memory 128 */ 129 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_MAX_ELEMENTS = 130 profile.get("HIBERNATE_EHCACHE_MAX_ELEMENTS"); 131 132 /** 133 * andromda_hibernate_ehcache_eternal 134 * Defines if elements are eternal. 135 */ 136 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_ETERNAL = profile.get("HIBERNATE_EHCACHE_ETERNAL"); 137 138 /** 139 * andromda_hibernate_ehcache_timeToIdleSeconds 140 * Defines the time to idle for an element before it expires. 141 */ 142 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_IDLE = 143 profile.get("HIBERNATE_EHCACHE_TIME_TO_IDLE"); 144 145 /** 146 * andromda_hibernate_ehcache_timeToLiveSeconds 147 * Defines the time to live for an element before it expires. 148 */ 149 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_TIME_TO_LIVE = 150 profile.get("HIBERNATE_EHCACHE_TIME_TO_LIVE"); 151 152 /** 153 * andromda_hibernate_ehcache_overflowToDisk 154 * Defines if elements can overflow to disk. 155 */ 156 public static final String TAGGEDVALUE_HIBERNATE_EHCACHE_OVERFLOW_TO_DISK = 157 profile.get("HIBERNATE_EHCACHE_OVERFLOW_TO_DISK"); 158 159 /** 160 * andromda_hibernate_entity_cache_distributed 161 * Defines if the cache for this entity is to be distributed. 162 */ 163 public static final String TAGGEDVALUE_HIBERNATE_ENTITYCACHE_DISTRIBUTED = 164 profile.get("HIBERNATE_ENTITYCACHE_DISTRIBUTED"); 165 166 /** 167 * andromda_hibernate_association_cache_distributed 168 * Defines if the cache for this association is to be distributed. 169 */ 170 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATIONCACHE_DISTRIBUTED = 171 profile.get("HIBERNATE_ASSOCIATIONCACHE_DISTRIBUTED"); 172 173 /** 174 * andromda_hibernate_collection_type 175 * Defines the association collection type 176 */ 177 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_COLLECTION_TYPE = 178 profile.get("HIBERNATE_ASSOCIATION_COLLECTION_TYPE"); 179 180 /** 181 * andromda_hibernate_sort_type: Defines the association sort type. 182 */ 183 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_SORT_TYPE = 184 profile.get("HIBERNATE_ASSOCIATION_SORT_TYPE"); 185 186 /** 187 * andromda_hibernate_orderByColumns 188 * Defines the association order by columns names. 189 */ 190 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_ORDER_BY_COLUMNS = 191 profile.get("HIBERNATE_ASSOCIATION_ORDER_BY_COLUMNS"); 192 193 /** 194 * andromda_hibernate_whereClause: Defines the association where clause. 195 */ 196 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_WHERE_CLAUSE = 197 profile.get("HIBERNATE_ASSOCIATION_WHERE_CLAUSE"); 198 199 /** 200 * andromda_hibernate_collection_index 201 * Defines the index column for hibernate indexed collections 202 */ 203 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX = profile.get("HIBERNATE_ASSOCIATION_INDEX"); 204 205 /** 206 * andromda_hibernate_collection_index_type 207 * Defines the index column type for hibernate indexed collections 208 */ 209 public static final String TAGGEDVALUE_HIBERNATE_ASSOCIATION_INDEX_TYPE = 210 profile.get("HIBERNATE_ASSOCIATION_INDEX_TYPE"); 211 212 /** 213 * andromda_hibernate_version 214 * Defines the tagged value for hibernate version property on entities 215 */ 216 public static final String TAGGEDVALUE_HIBERNATE_VERSION_PROPERTY = profile.get("HIBERNATE_VERSION_PROPERTY"); 217 218 /** 219 * andromda_hibernate_cascade 220 * Defines the tagged value for hibernate cascade on an association end 221 */ 222 public static final String TAGGEDVALUE_HIBERNATE_CASCADE = profile.get("HIBERNATE_CASCADE"); 223 224 /** 225 * andromda_hibernate_formula: Stores sql formula for an attribute. 226 */ 227 public static final String TAGGEDVALUE_HIBERNATE_FORMULA = profile.get("HIBERNATE_FORMULA"); 228 229 /** 230 * andromda_persistence_discriminator_column_name 231 * Column name of the discriminator-column 232 */ 233 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_COLUMN = 234 profile.get("ENTITY_DISCRIMINATOR_COLUMN"); 235 236 /** 237 * andromda_persistence_discriminator_type 238 * Column type of the discriminator-column 239 */ 240 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_TYPE = profile.get("ENTITY_DISCRIMINATOR_TYPE"); 241 242 /** 243 * andromda_persistence_discriminator_value 244 * Value of the class for the discriminator-column 245 */ 246 public static final String TAGGEDVALUE_ENTITY_DISCRIMINATOR_VALUE = profile.get("ENTITY_DISCRIMINATOR_VALUE"); 247 248 /** 249 * andromda_hibernate_property_insert 250 * Specifies whether a mapped column should be included in SQL INSERT statements. 251 */ 252 public static final String TAGGEDVALUE_HIBERNATE_PROPERTY_INSERT = profile.get("HIBERNATE_PROPERTY_INSERT"); 253 254 /** 255 * andromda_hibernate_property_update 256 * Specifies whether a mapped column should be included in SQL UPDATE statements. 257 */ 258 public static final String TAGGEDVALUE_HIBERNATE_PROPERTY_UPDATE = profile.get("HIBERNATE_PROPERTY_UPDATE"); 259 260}