001package org.andromda.cartridges.hibernate.metafacades; 002 003/** 004 * Stores Globals specific to the Hibernate cartridge. 005 * 006 * @author Chad Brandon 007 * @author Wouter Zoons 008 */ 009public class HibernateGlobals 010{ 011 /** 012 * Denotes whether or not subclasses require their own mapping file. 013 */ 014 static public final String HIBERNATE_MAPPING_STRATEGY = "hibernateMappingStrategy"; 015 016 /** 017 * A mapping file per subclass. 018 */ 019 static public final String HIBERNATE_MAPPING_STRATEGY_SUBCLASS = "subclass"; 020 021 /** 022 * A mapping file per hierarchy. 023 */ 024 static public final String HIBERNATE_MAPPING_STRATEGY_HIERARCHY = "hierarchy"; 025 026 /** 027 * A mapping file per hierarchy. 028 */ 029 static public final String HIBERNATE_MAPPING_STRATEGY_CONCRETE = "concrete"; 030 031 /** 032 * Indicates if "XML Persistence" code generation is enabled. Requires Hibernate 3. 033 */ 034 static public final String HIBERNATE_XML_PERSISTENCE = "hibernateXMLPersistence"; 035 036 /** 037 * Determines if the identifier attribute on an entity is generated as an attribute 038 * or as a separate element. 039 */ 040 static final String HIBERNATE_XML_PERSISTENCE_ID_AS_ATTRIBUTE = "hibernateXMLPersistIDAsAttribute"; 041 042 /** 043 * Hibernate version to use. 044 */ 045 static public final String HIBERNATE_VERSION = "hibernateVersion"; 046 047 /** 048 * The version for Hibernate 2. 049 */ 050 public static final String HIBERNATE_VERSION_2 = "2"; 051 052 /** 053 * The version for Hibernate 3. 054 */ 055 public static final String HIBERNATE_VERSION_3 = "3"; 056 057 /** 058 * The version for Hibernate 4. 059 */ 060 public static final String HIBERNATE_VERSION_4 = "4"; 061 062 /** 063 * EJB implementation class suffix. 064 */ 065 static final String EJB_IMPLEMENTATION_SUFFIX = "Bean"; 066 067 /** 068 * Represents the hibernate <code>delete</code> cascade option. 069 */ 070 static final String HIBERNATE_CASCADE_DELETE = "delete"; 071 072 /** 073 * Represents the hibernate <code>all-delete-orphan</code> cascade option. 074 */ 075 static final String HIBERNATE_CASCADE_ALL_DELETE_ORPHAN = "all-delete-orphan"; 076 077 /** 078 * Represents the hibernate <code>save-update</code> cascade option. 079 */ 080 static final String HIBERNATE_CASCADE_SAVE_UPDATE = "save-update"; 081 082 /** 083 * Represents the hibernate <code>all</code> cascade option. 084 */ 085 static final String HIBERNATE_CASCADE_ALL = "all"; 086 087 /** 088 * Represents the hibernate <code>none</code> cascade option. 089 */ 090 static final String HIBERNATE_CASCADE_NONE = "none"; 091 092 /** 093 * The property used to specify the implementation operation name prefix (on 094 * services). 095 */ 096 static final String PROPERTY_IMPLEMENTATION_OPERATION_NAME_PREFIX = "implementationOperationNamePrefix"; 097 098 /** 099 * The namespace property storing default ehCache maxElementsInMemory 100 * parameter 101 */ 102 static final String HIBERNATE_EHCACHE_MAX_ELEMENTS = "ehCacheMaxElementsInMemory"; 103 104 /** 105 * The namespace property storing default ehCache eternal parameter 106 */ 107 static final String HIBERNATE_EHCACHE_ETERNAL = "ehCacheEternal"; 108 109 /** 110 * The namespace property storing default ehCache eternal parameter 111 */ 112 static final String HIBERNATE_EHCACHE_TIME_TO_IDLE = "ehCacheTimeToIdleSeconds"; 113 114 /** 115 * The namespace property storing default ehCache eternal parameter 116 */ 117 static final String HIBERNATE_EHCACHE_TIME_TO_LIVE = "ehCacheTimeToLiveSeconds"; 118 119 /** 120 * The namespace property storing default ehCache eternal parameter 121 */ 122 static final String HIBERNATE_EHCACHE_OVERFLOW_TO_DISK = "ehCacheOverflowToDisk"; 123 124 /** 125 * The namespace property storing whether distributed caching is turned on at all. 126 */ 127 static final String HIBERNATE_ENTITYCACHE_DISTRIBUTED = "hibernateEnableDistributedCache"; 128 129 /** 130 * The namespace property storing default dynamic-insert parameter 131 */ 132 static final String HIBERNATE_ENTITY_DYNAMIC_INSERT = "hibernateEntityDynamicInsert"; 133 134 /** 135 * The namespace property storing default dynamic-update parameter 136 */ 137 static final String HIBERNATE_ENTITY_DYNAMIC_UPDATE = "hibernateEntityDynamicUpdate"; 138 139 /** 140 * The namespace property storing default collection type for associations 141 */ 142 static final String HIBERNATE_ASSOCIATION_COLLECTION_TYPE = "hibernateAssociationCollectionType"; 143 144 /** 145 * The namespace property storing default sort method for collections 146 */ 147 static final String HIBERNATE_ASSOCIATION_SORT_TYPE = "hibernateAssociationSortType"; 148 149 /** 150 * The namespace property to specify the pattern for determining the entity 151 * name. 152 */ 153 static final String ENTITY_NAME_PATTERN = "entityNamePattern"; 154 155 /** 156 * The property which stores the pattern defining the entity implementation 157 * name. 158 */ 159 static final String ENTITY_IMPLEMENTATION_NAME_PATTERN = "entityImplementationNamePattern"; 160 161 /** 162 * The property which stores the pattern defining the embedded value 163 * implementation name. 164 */ 165 static final String EMBEDDED_VALUE_IMPLEMENTATION_NAME_PATTERN = "embeddedValueImplementationNamePattern"; 166 167 /** 168 * The property which defines a default value for hibernate entities 169 * versioning. 170 */ 171 static final String HIBERNATE_VERSION_PROPERTY = "versionProperty"; 172 173 /** 174 * The 'list' type implementation to use. 175 */ 176 static final String LIST_TYPE_IMPLEMENTATION = "listTypeImplementation"; 177 178 /** 179 * The 'set' type implementation to use. 180 */ 181 static final String SET_TYPE_IMPLEMENTATION = "setTypeImplementation"; 182 183 /** 184 * The 'map' type implementation to use. 185 */ 186 static final String MAP_TYPE_IMPLEMENTATION = "mapTypeImplementation"; 187 188 /** 189 * The 'bag' type implementation to use. 190 */ 191 static final String BAG_TYPE_IMPLEMENTATION = "bagTypeImplementation"; 192 193 /** 194 * A flag indicating whether or not specific (java.util.Set, java.util.List, 195 * etc) collection interfaces should be used in association mutators and 196 * accessors or whether the generic java.util.Collection interface should be 197 * used. 198 */ 199 static final String SPECIFIC_COLLECTION_INTERFACES = "specificCollectionInterfaces"; 200 201 /** 202 * The property that defines the default collection interface, this is the 203 * interface used if the property defined by 204 * {@link #SPECIFIC_COLLECTION_INTERFACES} is true. 205 */ 206 static final String DEFAULT_COLLECTION_INTERFACE = "defaultCollectionInterface"; 207 208 /** 209 * The default Hibernate discriminator column name 210 */ 211 static final String ENTITY_DISCRIMINATOR_COLUMN = "defaultEntityDiscriminatorColumn"; 212 213 /** 214 * The default Hibernate discriminator column type 215 */ 216 static final String ENTITY_DISCRIMINATOR_TYPE = "defaultEntityDiscriminatorType"; 217 218 /** 219 * Optional definition of the package name where all Hibernate enumeration types are 220 * to be generated. This will overrride the default model package name where the 221 * enumeration class itself will still be placed. 222 */ 223 static final String ENUM_TYPES_PACKAGE = "enumTypesPackage"; 224}