From: Vance K. <va...@us...> - 2007-06-13 16:31:38
|
User: vancek Date: 07/06/13 09:31:40 Modified: andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip andromda-ejb3/src/main/resources/META-INF/andromda profile.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Globals.java EJB3Profile.java andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: ejb-50 - add hibernate uuid extension support Revision Changes Path 1.19 +5 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -r1.18 -r1.19 --- changes.xml 12 Jun 2007 16:23:25 -0000 1.18 +++ changes.xml 13 Jun 2007 16:31:34 -0000 1.19 @@ -469,6 +469,11 @@ is explicity modelled. It is fine to apply this naming pattern when this is not explicitly modelled and instance scoped operations exist on the entity and a mapped superclass is generated. </action> + <action dev="vancek" due-to="daveangulo" type="add"> + JIRA EJB-50 - Add UUID generic generator support as a Hibernate extension. This will render the + @GenericGenerator annotation. Modified the persistence profile (uml1.4 and 2.0) to support the necessary + tagged value. + </action> </release> </body> </document> \ No newline at end of file 1.51 +7 -0 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl Index: EntityEmbeddable.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl,v retrieving revision 1.50 retrieving revision 1.51 diff -u -w -r1.50 -r1.51 --- EntityEmbeddable.vsl 7 May 2007 13:32:32 -0000 1.50 +++ EntityEmbeddable.vsl 13 Jun 2007 16:31:35 -0000 1.51 @@ -416,9 +416,16 @@ @javax.persistence.TableGenerator(name = "${attribute.generatorName}"#if ($attribute.generatorTypeTable), table = "${attribute.generatorSourceName}"#end#if ($attribute.generatorPkColumnValue), pkColumnValue = "${attribute.generatorPkColumnValue}"#end#if ($attribute.generatorInitialValue), initialValue = ${attribute.generatorInitialValue}#end#if ($attribute.generatorAllocationSize), allocationSize = ${attribute.generatorAllocationSize}#end) #* *##end #* *##if (!$attribute.generatorTypeNone) +#* *##if ($attribute.generatorTypeGeneric) + @javax.persistence.GeneratedValue(generator = "${attribute.generatorName}") +#* *##else @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.${attribute.generatorType}#if ($attribute.generatorTypeSequence || $attribute.generatorTypeTable), generator = "${attribute.generatorName}"#end) #* *##end #* *##end +#* *##if ($attribute.generatorTypeGeneric && $hibernateExtensionEnabled) + @org.hibernate.annotations.GenericGenerator(name="${attribute.generatorName}", strategy = "${attribute.generatorGenericStrategy}") +#* *##end +#* *##end #* *##if ($attribute.lob) ## ## Add if LOB type is specified - do not set LOB type as of PFD Spec - inferred from type. 1.57 +238 -239 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> 1.36 +14 -0 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/profile.xml Index: profile.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/profile.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -w -r1.35 -r1.36 --- profile.xml 29 Apr 2007 13:45:07 -0000 1.35 +++ profile.xml 13 Jun 2007 16:31:37 -0000 1.36 @@ -975,6 +975,7 @@ <value>SEQUENCE</value> <value>IDENTITY</value> <value>TABLE</value> + <value>GENERIC</value> <value>NONE</value> </allowedValues> </element> @@ -991,6 +992,19 @@ Entity Attribute </appliedOnElement> </element> + <element name="GENERATOR_GENERIC_STRATEGY"> + <documentation> + Defines either a predefined Hibernate strategy + or a fully qualified class name for use in + id generation using persistence layer extensions. + </documentation> + <value> + @andromda.persistence.generator.genericStrategy + </value> + <appliedOnElement> + Entity Attribute + </appliedOnElement> + </element> <element name="GENERATOR_SOURCE_NAME"> <documentation> Specifies either the table name that stores the 1.16 +5 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java Index: EJB3Globals.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Globals.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -r1.15 -r1.16 --- EJB3Globals.java 25 Apr 2007 03:47:51 -0000 1.15 +++ EJB3Globals.java 13 Jun 2007 16:31:39 -0000 1.16 @@ -102,6 +102,11 @@ public static final String GENERATOR_TYPE_AUTO = "AUTO"; /** + * Represents the generic generator type + */ + public static final String GENERATOR_TYPE_GENERIC = "GENERIC"; + + /** * Represents the none generator type */ public static final String GENERATOR_TYPE_NONE = "NONE"; 1.29 +6 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Profile.java Index: EJB3Profile.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3Profile.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -r1.28 -r1.29 --- EJB3Profile.java 29 Apr 2007 13:45:08 -0000 1.28 +++ EJB3Profile.java 13 Jun 2007 16:31:39 -0000 1.29 @@ -553,6 +553,12 @@ profile.get("GENERATOR_NAME"); /** + * The tagged value indicating the generator generic strategy. + */ + public static final String TAGGEDVALUE_PERSISTENCE_GENERATOR_GENERIC_STRATEGY = + profile.get("GENERATOR_GENERIC_STRATEGY"); + + /** * The tagged value indicating the generator source name. */ public static final String TAGGEDVALUE_PERSISTENCE_GENERATOR_SOURCE_NAME = 1.19 +24 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java Index: EJB3EntityAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -r1.18 -r1.19 --- EJB3EntityAttributeFacadeLogicImpl.java 17 Jan 2007 00:50:55 -0000 1.18 +++ EJB3EntityAttributeFacadeLogicImpl.java 13 Jun 2007 16:31:39 -0000 1.19 @@ -250,6 +250,22 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleIsGeneratorTypeGeneric() + */ + protected boolean handleIsGeneratorTypeGeneric() + { + boolean isGeneric = false; + if (StringUtils.isNotBlank(this.getGeneratorType())) + { + if (this.getGeneratorType().equalsIgnoreCase(EJB3Globals.GENERATOR_TYPE_GENERIC)) + { + isGeneric = true; + } + } + return isGeneric; + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleIsGeneratorTypeNone() */ protected boolean handleIsGeneratorTypeNone() @@ -290,6 +306,14 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#getGeneratorGenericStrategy() + */ + protected String handleGetGeneratorGenericStrategy() + { + return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_GENERATOR_GENERIC_STRATEGY); + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleGetGeneratorSourceName() */ protected String handleGetGeneratorSourceName() |
From: Vance K. <va...@us...> - 2007-06-23 08:06:45
|
User: vancek Date: 07/06/23 01:06:45 Modified: andromda-ejb3/src/site changes.xml andromda-ejb3/src/test/expected cartridge-output.zip andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: ejb-56 add support for multiplicity on enumeration types Revision Changes Path 1.22 +3 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -r1.21 -r1.22 --- changes.xml 14 Jun 2007 15:06:08 -0000 1.21 +++ changes.xml 23 Jun 2007 08:06:44 -0000 1.22 @@ -481,6 +481,9 @@ JIRA EJB-55 - Fix optimistic locking - version attribute. Set the annotation on the getter and change modifier on version attribute to public. </action> + <action dev="vancek" due-to="heapifyman" type="add"> + JIRA EJB-56 - Add support for multiplicity on enumeration types. + </action> </release> </body> </document> \ No newline at end of file 1.12 +480 -469 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip <<Binary file>> 1.20 +2 -2 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java Index: EJB3EntityAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- EJB3EntityAttributeFacadeLogicImpl.java 13 Jun 2007 16:31:39 -0000 1.19 +++ EJB3EntityAttributeFacadeLogicImpl.java 23 Jun 2007 08:06:45 -0000 1.20 @@ -74,7 +74,7 @@ EJB3EntityFacade entity = (EJB3EntityFacade)this.getOwner(); /** - * Excluse ONLY if single table inheritance exists + * Exclude ONLY if single table inheritance exists */ if (entity.isRequiresGeneralizationMapping() && entity.isInheritanceSingleTable() && !entity.isEmbeddableSuperclassGeneralizationExists()) @@ -449,7 +449,7 @@ } if (!isOrdinal) { - definition = "VARCHAR(" + length + ") NOT NULL"; + definition = "VARCHAR(" + length + ")"; } } return definition; |
From: Vance K. <va...@us...> - 2007-11-07 12:57:31
|
User: vancek Date: 07/11/07 04:57:34 Modified: andromda-ejb3/src/site changes.xml andromda-ejb3/src/test/expected cartridge-output.zip andromda-ejb3/src/test/uml EJB3CartridgeTestModel.xml.zip andromda-ejb3/src/site/axdoc howto1.xml andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: EJB-89 - attributes of type boolean/Boolean should have the getter starting with is instead of get Revision Changes Path 1.28 +4 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -r1.27 -r1.28 --- changes.xml 27 Aug 2007 14:19:07 -0000 1.27 +++ changes.xml 7 Nov 2007 12:57:31 -0000 1.28 @@ -528,6 +528,10 @@ EJB3ValueObjectFacade metafacade for the cartridge and modifying the components.xml generation to account for the new type Seam component. </action> + <action dev="vancek" due-to="aabdelaziz" type="fix"> + JIRA EJB-89 - Fixed prefix for getter methods of type boolean by using the (is) keyword rather than + (get). + </action> </release> </body> </document> \ No newline at end of file 1.17 +554 -540 cartridges/andromda-ejb3/src/test/expected/cartridge-output.zip <<Binary file>> 1.12 +268 -294 cartridges/andromda-ejb3/src/test/uml/EJB3CartridgeTestModel.xml.zip <<Binary file>> 1.3 +5 -5 cartridges/andromda-ejb3/src/site/axdoc/howto1.xml Index: howto1.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/axdoc/howto1.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- howto1.xml 19 Jan 2007 14:35:42 -0000 1.2 +++ howto1.xml 7 Nov 2007 12:57:34 -0000 1.3 @@ -450,11 +450,11 @@ </p> <p> <ul> - <li class="gen"><a class="changed" href="howto/org/andromda/test/howto1/g/Car.java"><code>Car.java</code></a></li> - <li class="gen"><a href="howto/org/andromda/test/howto1/g/CarDao.java"><code>CarDao.java</code></a></li> - <li class="gen"><a href="howto/org/andromda/test/howto1/g/CarDaoBase.java"><code>CarDaoBase.java</code></a></li> - <li class="gen"><a href="howto/org/andromda/test/howto1/g/CarDaoImpl.java"><code>CarDaoImpl.java</code></a></li> - <li class="gen"><a href="howto/org/andromda/test/howto1/g/CarDaoException.java"><code>CarDaoException.java</code></a></li> + <li class="gen"><a class="changed" href="howto/org/andromda/test/howto1/hg/Car.java"><code>Car.java</code></a></li> + <li class="gen"><a href="howto/org/andromda/test/howto1/h/CarDao.java"><code>CarDao.java</code></a></li> + <li class="gen"><a href="howto/org/andromda/test/howto1/hg/CarDaoBase.java"><code>CarDaoBase.java</code></a></li> + <li class="gen"><a href="howto/org/andromda/test/howto1/h/CarDaoImpl.java"><code>CarDaoImpl.java</code></a></li> + <li class="gen"><a href="howto/org/andromda/test/howto1/h/CarDaoException.java"><code>CarDaoException.java</code></a></li> </ul> </p> <p> 1.21 +0 -8 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java Index: EJB3EntityAttributeFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityAttributeFacadeLogicImpl.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -r1.20 -r1.21 --- EJB3EntityAttributeFacadeLogicImpl.java 23 Jun 2007 08:06:45 -0000 1.20 +++ EJB3EntityAttributeFacadeLogicImpl.java 7 Nov 2007 12:57:34 -0000 1.21 @@ -54,14 +54,6 @@ // --------------- methods --------------------- /** - * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName() - */ - public String getGetterName() - { - return "get" + StringUtils.capitalize(super.getName()); - } - - /** * Overridden to provide handling of inheritance. * * @see org.andromda.metafacades.uml.AttributeFacade#isRequired() |