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