You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(178) |
Feb
(169) |
Mar
(286) |
Apr
(117) |
May
(98) |
Jun
(68) |
Jul
(63) |
Aug
(121) |
Sep
(88) |
Oct
(124) |
Nov
(2) |
Dec
(111) |
2007 |
Jan
(224) |
Feb
(69) |
Mar
(10) |
Apr
(72) |
May
(7) |
Jun
(21) |
Jul
(33) |
Aug
(35) |
Sep
(12) |
Oct
(22) |
Nov
(5) |
Dec
(6) |
2008 |
Jan
(2) |
Feb
(10) |
Mar
(39) |
Apr
(58) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(10) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Vance K. <va...@us...> - 2006-01-25 03:02:19
|
User: vancek Date: 06/01/24 19:02:13 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3FinderMethodFacadeLogicImpl.java Log: moved QUERY_USE_NAMED_PARAMETERS from EJB3Globals to here Revision Changes Path 1.2 +7 -2 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3FinderMethodFacadeLogicImpl.java Index: EJB3FinderMethodFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3FinderMethodFacadeLogicImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- EJB3FinderMethodFacadeLogicImpl.java 28 Dec 2005 00:32:55 -0000 1.1 +++ EJB3FinderMethodFacadeLogicImpl.java 25 Jan 2006 03:02:13 -0000 1.2 @@ -21,6 +21,11 @@ extends EJB3FinderMethodFacadeLogic { + /** + * Stores whether or not named parameters should be used in EJB queries. + */ + public static final String QUERY_USE_NAMED_PARAMETERS = "queryUseNamedParameters"; + // ---------------- constructor ------------------------------- public EJB3FinderMethodFacadeLogicImpl (Object metaObject, String context) @@ -104,7 +109,7 @@ protected boolean handleIsUseNamedParameters() { return Boolean.valueOf(String.valueOf( - this.getConfiguredProperty(EJB3Globals.QUERY_USE_NAMED_PARAMETERS))).booleanValue(); + this.getConfiguredProperty(QUERY_USE_NAMED_PARAMETERS))).booleanValue(); } } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-25 03:01:43
|
User: vancek Date: 06/01/24 19:01:38 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3FinderMethodArgumentFacadeLogicImpl.java Log: added isEnumerationTypeOrdinal and isEnumerationTypeString Revision Changes Path 1.3 +38 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3FinderMethodArgumentFacadeLogicImpl.java Index: EJB3FinderMethodArgumentFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3FinderMethodArgumentFacadeLogicImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- EJB3FinderMethodArgumentFacadeLogicImpl.java 3 Jan 2006 01:38:53 -0000 1.2 +++ EJB3FinderMethodArgumentFacadeLogicImpl.java 25 Jan 2006 03:01:36 -0000 1.3 @@ -2,6 +2,7 @@ import org.andromda.cartridges.ejb3.EJB3Globals; import org.andromda.cartridges.ejb3.EJB3Profile; +import org.andromda.metafacades.uml.AttributeFacade; import org.andromda.metafacades.uml.ClassifierFacade; import org.apache.commons.lang.StringUtils; @@ -87,4 +88,41 @@ return maxResults; } + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3FinderMethodArgumentFacadeLogic# + * handleIsEnumerationTypeOrdinal() + */ + protected boolean handleIsEnumerationTypeOrdinal() + { + //AttributeFacade attribute = this.getType().findAttribute(this.getName()); + boolean ordinalType = false; + if (this.getType().isEnumeration()) + { + AttributeFacade literal = (AttributeFacade)this.getType().getAttributes().iterator().next(); + if (!literal.getType().isStringType()) + { + ordinalType = true; + } + } + return ordinalType; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3FinderMethodArgumentFacadeLogic# + * handleGetEnumerationTypeString() + */ + protected boolean handleIsEnumerationTypeString() + { + boolean stringType = false; + if (this.getType().isEnumeration()) + { + AttributeFacade literal = (AttributeFacade)this.getType().getAttributes().iterator().next(); + if (literal.getType().isStringType()) + { + stringType = true; + } + } + return stringType; + } + } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-25 03:01:09
|
User: vancek Date: 06/01/24 19:01:01 Added: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EnumerationFacadeLogicImpl.java Log: initial revision Revision Changes Path 1.1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EnumerationFacadeLogicImpl.java Index: EJB3EnumerationFacadeLogicImpl.java =================================================================== package org.andromda.cartridges.ejb3.metafacades; /** * MetafacadeLogic implementation for org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacade. * * @see org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacade */ public class EJB3EnumerationFacadeLogicImpl extends EJB3EnumerationFacadeLogic { public EJB3EnumerationFacadeLogicImpl (Object metaObject, String context) { super (metaObject, context); } } |
From: Vance K. <va...@us...> - 2006-01-25 03:00:43
|
User: vancek Date: 06/01/24 19:00:38 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityFacadeLogicImpl.java Log: moved ENTITY_DEFAULT_VIEW_TYPE from EJB3Globals to here Revision Changes Path 1.8 +6 -1 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java Index: EJB3EntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- EJB3EntityFacadeLogicImpl.java 23 Jan 2006 05:53:32 -0000 1.7 +++ EJB3EntityFacadeLogicImpl.java 25 Jan 2006 03:00:37 -0000 1.8 @@ -62,6 +62,11 @@ private static final String ENTITY_DISCRIMINATOR_COLUMN_NAME = "entityDiscriminatorColumnName"; /** + * The default view type accessability for an entity POJO bean + */ + public static final String ENTITY_DEFAULT_VIEW_TYPE = "entityViewType"; + + /** * Value for one table per root class */ private static final String INHERITANCE_STRATEGY_TABLE_PER_CLASS = "TABLE_PER_CLASS"; @@ -259,7 +264,7 @@ protected java.lang.String handleGetViewType() { return EJB3MetafacadeUtils.getViewType(this, - String.valueOf(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_VIEW_TYPE))); + String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_VIEW_TYPE))); } /** |
From: Vance K. <va...@us...> - 2006-01-25 02:59:56
|
User: vancek Date: 06/01/24 18:59:49 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: update getColumnDefinition to return a schema definition if the attribute type is an enumeration and the literals are string based, moved static variables from EJB3Globals to here Revision Changes Path 1.6 +58 -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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- EJB3EntityAttributeFacadeLogicImpl.java 23 Jan 2006 05:51:55 -0000 1.5 +++ EJB3EntityAttributeFacadeLogicImpl.java 25 Jan 2006 02:59:49 -0000 1.6 @@ -5,6 +5,7 @@ import org.andromda.cartridges.ejb3.EJB3Globals; import org.andromda.cartridges.ejb3.EJB3Profile; +import org.andromda.metafacades.uml.AttributeFacade; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; @@ -18,6 +19,26 @@ extends EJB3EntityAttributeFacadeLogic { + /** + * The property that stores the default entity ID generator type + */ + public static final String ENTITY_DEFAULT_GENERATOR_TYPE = "entityDefaultGeneratorType"; + + /** + * The property that stores the default generator initial value + */ + public static final String ENTITY_DEFAULT_GENERATOR_INITIAL_VALUE = "entityDefaultGeneratorInitialValue"; + + /** + * The property that stores the default generator allocation size for incrementing ids + */ + public static final String ENTITY_DEFAULT_GENERATOR_ALLOCATION_SIZE = "entityDefaultGeneratorAllocationSize"; + + /** + * The property that stores the default enumeration string literal column length. + */ + public static final String DEFAULT_ENUM_LITERAL_COLUMN_LENGTH = "entityDefaultEnumLiteralColumnLength"; + // ---------------- constructor ------------------------------- public EJB3EntityAttributeFacadeLogicImpl (Object metaObject, String context) @@ -111,7 +132,7 @@ } else { - genType = String.valueOf(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_GENERATOR_TYPE)); + genType = String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_GENERATOR_TYPE)); if (StringUtils.isBlank(genType)) { genType = EJB3Globals.GENERATOR_TYPE_AUTO; @@ -242,15 +263,15 @@ (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_GENERATOR_INITIAL_VALUE); if (StringUtils.isNotBlank(initialValueStr)) { - initialValue = NumberUtils.stringToInt(initialValueStr); + initialValue = NumberUtils.toInt(initialValueStr); } else { initialValueStr = - String.valueOf(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_GENERATOR_INITIAL_VALUE)); + String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_GENERATOR_INITIAL_VALUE)); if (StringUtils.isNotBlank(initialValueStr)) { - initialValue = NumberUtils.stringToInt(initialValueStr); + initialValue = NumberUtils.toInt(initialValueStr); } } @@ -267,15 +288,15 @@ (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_GENERATOR_ALLOCATION_SIZE); if (StringUtils.isNotBlank(allocationSizeStr)) { - allocationSize = NumberUtils.stringToInt(allocationSizeStr); + allocationSize = NumberUtils.toInt(allocationSizeStr); } else { allocationSizeStr = - String.valueOf(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_GENERATOR_ALLOCATION_SIZE)); + String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_GENERATOR_ALLOCATION_SIZE)); if (StringUtils.isNotBlank(allocationSizeStr)) { - allocationSize = NumberUtils.stringToInt(allocationSizeStr); + allocationSize = NumberUtils.toInt(allocationSizeStr); } } @@ -316,10 +337,39 @@ /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleGetColumnDefinition() + * + * If the column definition has not manually been set and the attribute + * type is an enumeration, work out the schema from the length and type + * of the enumeration literals. The definition is only set for if the + * literal types are String. */ protected String handleGetColumnDefinition() { - return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_COLUMN_DEFINITION); + String definition = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_COLUMN_DEFINITION); + if (StringUtils.isBlank(definition) && this.getType().isEnumeration()) + { + boolean isOrdinal = false; + int length = NumberUtils.toInt( + String.valueOf(this.getConfiguredProperty(DEFAULT_ENUM_LITERAL_COLUMN_LENGTH))); + for (final Iterator iter = this.getType().getAttributes().iterator(); iter.hasNext(); ) + { + AttributeFacade attribute = (AttributeFacade)iter.next(); + if (!attribute.getType().isStringType()) + { + isOrdinal = true; + break; + } + if (attribute.getName().length() > length) + { + length = attribute.getName().length(); + } + } + if (!isOrdinal) + { + definition = "VARCHAR(" + length + ") NOT NULL"; + } + } + return definition; } /** |
From: Vance K. <va...@us...> - 2006-01-25 02:57:35
|
User: vancek Date: 06/01/24 18:57:29 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3AssociationEndFacadeLogicImpl.java Log: moved ENTITY_DEFAULT_ASSOCIATION_OPTIONAL, ENTITY_DEFAULT_COMPOSITE_CASCADE, ENTITY_DEFAULT_AGGREGATION_CASCADE from EJB3Global Revision Changes Path 1.3 +19 -4 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java Index: EJB3AssociationEndFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3AssociationEndFacadeLogicImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- EJB3AssociationEndFacadeLogicImpl.java 3 Jan 2006 01:34:57 -0000 1.2 +++ EJB3AssociationEndFacadeLogicImpl.java 25 Jan 2006 02:57:29 -0000 1.3 @@ -24,6 +24,21 @@ { /** + * The property that stores the default entity association optional attribute for Many-to-One and One-to-One + */ + public static final String ENTITY_DEFAULT_ASSOCIATION_OPTIONAL = "entityDefaultAssociationOptional"; + + /** + * The default composite association cascade property + */ + public static final String ENTITY_DEFAULT_COMPOSITE_CASCADE = "entityCompositeCascade"; + + /** + * The default aggregation association cascade property + */ + public static final String ENTITY_DEFAULT_AGGREGATION_CASCADE = "entityAggergationCascade"; + + /** * Represents the EJB3 <code>ALL</code> cascade option and fully qualified representation. */ private static final String ENTITY_CASCADE_ALL = "ALL"; @@ -184,7 +199,7 @@ if (StringUtils.isBlank(optionalString)) { optionalString = - String.valueOf(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_ASSOCIATION_OPTIONAL)); + String.valueOf(this.getConfiguredProperty(ENTITY_DEFAULT_ASSOCIATION_OPTIONAL)); } optional = Boolean.valueOf(optionalString).booleanValue(); return optional; @@ -336,7 +351,7 @@ protected String handleGetCompositionCascadeType() { return StringUtils.trimToEmpty( - ObjectUtils.toString(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_COMPOSITE_CASCADE))); + ObjectUtils.toString(this.getConfiguredProperty(ENTITY_DEFAULT_COMPOSITE_CASCADE))); } /** @@ -345,7 +360,7 @@ protected String handleGetAggregationCascadeType() { return StringUtils.trimToEmpty( - ObjectUtils.toString(this.getConfiguredProperty(EJB3Globals.ENTITY_DEFAULT_AGGREGATION_CASCADE))); + ObjectUtils.toString(this.getConfiguredProperty(ENTITY_DEFAULT_AGGREGATION_CASCADE))); } } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-25 02:56:20
|
User: vancek Date: 06/01/24 18:56:14 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Globals.java Log: refactored static variables to specific facade implementation classes Revision Changes Path 1.5 +0 -49 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.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- EJB3Globals.java 17 Jan 2006 04:08:45 -0000 1.4 +++ EJB3Globals.java 25 Jan 2006 02:56:14 -0000 1.5 @@ -7,10 +7,6 @@ */ public class EJB3Globals { - /** - * The property that stores the persistence container name. - */ - public static final String PERSISTENCE_CONTAINER = "persistenceContainerName"; /** * The property that stores the default EJB transaction type. @@ -23,51 +19,6 @@ public static final String JNDI_NAME_PREFIX = "jndiNamePrefix"; /** - * The property that stores the default entity ID generator type - */ - public static final String ENTITY_DEFAULT_GENERATOR_TYPE = "entityDefaultGeneratorType"; - - /** - * The property that stores the default generator initial value - */ - public static final String ENTITY_DEFAULT_GENERATOR_INITIAL_VALUE = "entityDefaultGeneratorInitialValue"; - - /** - * The property that stores the default generator allocation size for incrementing ids - */ - public static final String ENTITY_DEFAULT_GENERATOR_ALLOCATION_SIZE = "entityDefaultGeneratorAllocationSize"; - - /** - * The property that stores the default entity association optional attribute for Many-to-One and One-to-One - */ - public static final String ENTITY_DEFAULT_ASSOCIATION_OPTIONAL = "entityDefaultAssociationOptional"; - - /** - * Stores whether or not named parameters should be used in EJB queries. - */ - public static final String QUERY_USE_NAMED_PARAMETERS = "queryUseNamedParameters"; - - /** - * The default composite association cascade property - */ - public static final String ENTITY_DEFAULT_COMPOSITE_CASCADE = "entityCompositeCascade"; - - /** - * The default aggregation association cascade property - */ - public static final String ENTITY_DEFAULT_AGGREGATION_CASCADE = "entityAggergationCascade"; - - /** - * The default view type accessability for an entity POJO bean - */ - public static final String ENTITY_DEFAULT_VIEW_TYPE = "entityViewType"; - - /** - * The default view type accessability for the session bean - */ - public static final String SESSION_DEFAULT_VIEW_TYPE = "serviceViewType"; - - /** * Represents the eager fetch type */ public static final String FETCH_TYPE_EAGER = "EAGER"; |
From: Vance K. <va...@us...> - 2006-01-25 02:55:24
|
User: vancek Date: 06/01/24 18:55:18 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: fixed comment Revision Changes Path 1.10 +1 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl Index: SessionBean.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBean.vsl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- SessionBean.vsl 22 Jan 2006 06:21:55 -0000 1.9 +++ SessionBean.vsl 25 Jan 2006 02:55:17 -0000 1.10 @@ -157,7 +157,7 @@ #set ($instanceAttributes = $service.instanceAttributes) #if(!$instanceAttributes.empty) - // ------------ Attributes ------------------ + // --------- Attribute Definitions ------------ #**##foreach ($attribute in $instanceAttributes) /** |
From: Vance K. <va...@us...> - 2006-01-25 02:54:54
|
User: vancek Date: 06/01/24 18:54:49 Modified: andromda-ejb3/src/main/resources/META-INF/andromda profile.xml Log: added ENUMERATION stereotype element Revision Changes Path 1.8 +10 -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.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- profile.xml 23 Jan 2006 05:49:00 -0000 1.7 +++ profile.xml 25 Jan 2006 02:54:49 -0000 1.8 @@ -31,6 +31,16 @@ <value>MessageDriven</value> <appliedOnElement>class</appliedOnElement> </element> + <element name="ENUMERATION"> + <documentation> + This stereotype will instruct to define an + enumeration class variable of type enum introduced + in JDK 1.5. That way it is possible for Entities to + use this enumeration type for their attributes. + </documentation> + <value>Enumeration</value> + <appliedOnElement>class</appliedOnElement> + </element> <element name="VERSION"> <documentation> Identifies an attribute as an version property |
From: Vance K. <va...@us...> - 2006-01-25 02:54:16
|
User: vancek Date: 06/01/24 18:54:09 Modified: andromda-ejb3/src/main/resources/META-INF/andromda namespace.xml Log: added enumerations outlet, renamed outlet interceptors, added entityDefaultEnumLiteralColumnLength property Revision Changes Path 1.8 +27 -14 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -r1.7 -r1.8 --- namespace.xml 18 Jan 2006 08:55:07 -0000 1.7 +++ namespace.xml 25 Jan 2006 02:54:09 -0000 1.8 @@ -71,13 +71,19 @@ implementation files are generated. </documentation> </property> - <property name="interceptor"> + <property name="interceptors"> <documentation> The directory to which interceptor classes for session beans or message driven beans are generated. </documentation> </property> + <property name="enumerations"> + <documentation> + The directory to which entity JDK 1.5 + enumerations are generated. + </documentation> + </property> </propertyGroup> <propertyGroup name="JDBC"> <property name="entityManagerName" required="false"> @@ -530,6 +536,26 @@ always exist. </documentation> </property> + <property name="entityGenericFinders"> + <default>true</default> + <documentation> + Specifies whether to include the generic finder + property. Generic finders in the entity bean include + findByPrimaryKey and findAll. + Permitted values are: + <ul> + <li>true</li> + <li>false</li> + </ul> + </documentation> + </property> + <property name="entityDefaultEnumLiteralColumnLength"> + <default>20</default> + <documentation> + The default column length specified for the + storage of a string based enumeration literal. + </documentation> + </property> <property name="securityRealm" required="false"> <documentation> Specifies the security domain to use @@ -549,19 +575,6 @@ Does not apply to queries written in OCL. </documentation> </property> - <property name="entityGenericFinders"> - <default>true</default> - <documentation> - Specifies whether to include the generic finder - property. Generic finders in the entity bean include - findByPrimaryKey and findAll. - Permitted values are: - <ul> - <li>true</li> - <li>false</li> - </ul> - </documentation> - </property> <property name="valueObjectPackage"> <default>{0}</default> </property> |
From: Vance K. <va...@us...> - 2006-01-25 02:53:17
|
User: vancek Date: 06/01/24 18:53:10 Modified: andromda-ejb3/src/main/resources/META-INF/andromda metafacades.xml Log: added EJB3EnumerationFacadeLogicImpl metafacade Revision Changes Path 1.7 +7 -1 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml Index: metafacades.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/metafacades.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- metafacades.xml 18 Jan 2006 08:52:56 -0000 1.6 +++ metafacades.xml 25 Jan 2006 02:53:09 -0000 1.7 @@ -12,6 +12,7 @@ <property reference="entityInheritanceStrategy" /> <property reference="entityDiscriminatorType" /> <property reference="entityDiscriminatorColumnName" /> + <property reference="entityDefaultEnumLiteralColumnLength" /> <property reference="serviceViewType" /> <property reference="entityGenericFinders" /> <property reference="persistenceContainerName" /> @@ -120,11 +121,16 @@ <property reference="messageDrivenListenerNamePattern" /> <property reference="messageDrivenDestinationType" /> </metafacade> - <!-- Interceptor Metafacades --> + <!-- Common Metafacades --> <metafacade class="org.andromda.cartridges.ejb3.metafacades.EJB3InterceptorFacadeLogicImpl" contextRoot="true"> <mapping> <stereotype>INTERCEPTOR</stereotype> </mapping> <property reference="interceptorNamePattern" /> </metafacade> + <metafacade class="org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacadeLogicImpl"> + <mapping> + <stereotype>ENUMERATION</stereotype> + </mapping> + </metafacade> </metafacades> \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-25 02:52:14
|
User: vancek Date: 06/01/24 18:52:08 Modified: andromda-ejb3/src/main/resources/META-INF/andromda cartridge.xml Log: added Enumeration.vsl template and renamed outlet interceptors Revision Changes Path 1.10 +13 -1 cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- cartridge.xml 20 Jan 2006 17:17:26 -0000 1.9 +++ cartridge.xml 25 Jan 2006 02:52:07 -0000 1.10 @@ -265,7 +265,7 @@ <template path="templates/ejb3/Interceptor.vsl" outputPattern="$generatedFile" - outlet="interceptor" + outlet="interceptors" overwrite="false"> <modelElements variable="interceptor"> <modelElement> @@ -274,6 +274,18 @@ </modelElements> </template> + <template + path="templates/ejb3/Enumeration.vsl" + outputPattern="$generatedFile" + outlet="enumerations" + overwrite="true"> + <modelElements variable="enum"> + <modelElement> + <type name="org.andromda.cartridges.ejb3.metafacades.EJB3EnumerationFacade"/> + </modelElement> + </modelElements> + </template> + <!-- cartridge-template merge-point --> </cartridge> \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-25 02:51:13
|
User: vancek Date: 06/01/24 18:51:07 Added: andromda-ejb3/src/main/resources/templates/ejb3 Enumeration.vsl Log: initial revision - enumeration type Revision Changes Path 1.1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Enumeration.vsl Index: Enumeration.vsl =================================================================== // license-header java merge-point /* Autogenerated by AndroMDA (Enumeration.vsl) - do not edit */ #if ($stringUtils.isNotBlank($enum.packageName)) package $enum.packageName; #end #set ($generatedFile = "${stringUtils.replace($enum.fullyQualifiedName,'.','/')}.java") /** * Autogenerated enumeration ${enum.name}. * $enum.getDocumentation(" * ") */ public enum ${enum.name} implements java.io.Serializable { #foreach ($literal in $enum.literals) ${literal.name}#if ($velocityCount != $enum.literals.size()),#end #end } |
From: Vance K. <va...@us...> - 2006-01-25 02:50:53
|
User: vancek Date: 06/01/24 18:50:48 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: added enumeration type to attribute, finder method's setParameter adds ordinal() or name() if parameter is an enumeration type with the corresponding base. fixed comments. Revision Changes Path 1.6 +20 -11 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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- EntityEmbeddable.vsl 23 Jan 2006 05:45:31 -0000 1.5 +++ EntityEmbeddable.vsl 25 Jan 2006 02:50:46 -0000 1.6 @@ -93,7 +93,7 @@ #* *##set ($doAttribute = true) #* *##end #* *##if ($doAttribute) - private $attribute.type.fullyQualifiedName $attribute.name; + private ${attribute.type.fullyQualifiedName} $attribute.name; #* *##end #**##end #end @@ -127,7 +127,7 @@ #set ($instanceAttributes = $transform.filterByVisibility($entity.instanceAttributes, "public")) #if ($entity.syntheticCreateMethodAllowed) /** - * Implementation for the main constructor with all POJO attributes. + * Implementation for the constructor with all POJO attributes. * This method sets all POJO fields defined in this class to the * values provided by the parameters. * @@ -293,17 +293,20 @@ #* *##if ($attribute.lazy) @javax.persistence.Basic(fetch = javax.persistence.FetchType.LAZY) #* *##end - public $attribute.type.fullyQualifiedName ${attribute.getterName}() + public ${attribute.type.fullyQualifiedName} ${attribute.getterName}() { return $attribute.name; } -## Allow only if not a version attribute since they are set by the container - No setter method is made available +## +## Allow only if attribute is not a version attribute since they are +## set by the container - No setter method is made available. +## /** * Set the $attribute.name property. * @param value the new value */ - #if (!$attribute.version) public#else protected#end void ${attribute.setterName}($attribute.type.fullyQualifiedName value) + #if (!$attribute.version) public#else protected#end void ${attribute.setterName}(${attribute.type.fullyQualifiedName} value) { this.${attribute.name} = value; } @@ -467,6 +470,7 @@ { return em.createQuery("FROM ${entity.tableName} AS $stringUtils.uncapitalize(${entity.name})").getResultList(); } + #**##end ## Only include the findByPrimaryKey method if not an inheriting class. ## Classes that inherit from a base class use the primary key identifier @@ -511,9 +515,9 @@ #* *##set ($parameters = "javax.persistence.EntityManager em, ${parameterList}") #* *##end /** + * Finder method for ${entity.name} entity using a query. $finder.getDocumentation(" * ") * - * Finder method for ${entity.name} entity using a query. * @param em javax.persistence.EntityManager #* *##foreach ($parameter in $finder.arguments) * @param $parameter.type.fullyQualifiedName ${parameter.name} @@ -530,10 +534,15 @@ #* *##elseif ($parameter.maxResults) query.setMaxResults(${parameter.name}); #* *##else +## +## Find the attribute matching the parameter name +## If the parameter type is an enum: +## If +## #* *##if ($finder.useNamedParameters) - query.setParameter("${parameter.name}",#if ($parameter.type.primitive) new ${parameter.type.wrapperName}(${parameter.name})#else ${parameter.name}#end#if ($parameter.temporalType), javax.persistence.TemporalType.${parameter.temporalType}#end); + query.setParameter("${parameter.name}",#if ($parameter.type.primitive) new ${parameter.type.wrapperName}(${parameter.name})#else ${parameter.name}#if ($parameter.enumerationTypeOrdinal).ordinal()#elseif ($parameter.enumerationTypeString).name()#end#end#if ($parameter.temporalType), javax.persistence.TemporalType.${parameter.temporalType}#end); #* *##else - query.setParameter(${index},#if ($parameter.type.primitive) new ${parameter.type.wrapperName}(${parameter.name})#else ${parameter.name}#end#if ($parameter.temporalType), javax.persistence.TemporalType.${parameter.temporalType}#end); + query.setParameter(${index},#if ($parameter.type.primitive) new ${parameter.type.wrapperName}(${parameter.name})#else ${parameter.name}#if ($parameter.enumerationTypeOrdinal).ordinal()#elseif ($parameter.enumerationTypeString).name()#end#end#if ($parameter.temporalType), javax.persistence.TemporalType.${parameter.temporalType}#end); #* *##end #* *##end #* *##end |
From: Vance K. <va...@us...> - 2006-01-25 02:46:42
|
User: vancek Date: 06/01/24 18:46:36 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: used allInstanceAttributes for constructor Revision Changes Path 1.7 +2 -3 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl Index: Entity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- Entity.vsl 23 Jan 2006 05:43:43 -0000 1.6 +++ Entity.vsl 25 Jan 2006 02:46:35 -0000 1.7 @@ -40,15 +40,14 @@ } ## Autogenerate a constructor implementation with all attributes. -#set ($instanceAttributes = $transform.filterByVisibility($entity.instanceAttributes, "public")) #set ($allAttributes = $transform.filterByVisibility($entity.allInstanceAttributes, "public")) #if ($entity.syntheticCreateMethodAllowed) /** - * Implementation for the main constructor with all POJO attributes. + * Implementation for the constructor with all POJO attributes. * This method sets all POJO fields defined in this/super class to the * values provided by the parameters. * -#**##foreach($attribute in $transform.filterUpdatableAttributes($instanceAttributes)) +#**##foreach($attribute in $transform.filterUpdatableAttributes($allAttributes)) * @param $attribute.name Value for the ${attribute.name} property #**##end */ |
From: Vance K. <va...@us...> - 2006-01-23 05:57:45
|
User: vancek Date: 06/01/22 21:57:37 Modified: andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: added generatorTypeAuto, generatorTypeNone and generatorTypeIdetity to EJB3EntityFacade, added containerConfiguration to EJB3MessageDrivenFacade Revision Changes Path 1.8 +150 -148 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-01-23 05:56:33
|
User: vancek Date: 06/01/22 21:56:27 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3MessageDrivenFacadeLogicImpl.java Log: added getContainerConfiguration - currently used in the declarative configuration of the container for MDB in jboss.xml Revision Changes Path 1.4 +8 -0 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java Index: EJB3MessageDrivenFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MessageDrivenFacadeLogicImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- EJB3MessageDrivenFacadeLogicImpl.java 22 Jan 2006 06:24:43 -0000 1.3 +++ EJB3MessageDrivenFacadeLogicImpl.java 23 Jan 2006 05:56:27 -0000 1.4 @@ -326,4 +326,12 @@ return EJB3MetafacadeUtils.getEnvironmentEntries(this, follow); } + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3MessageDrivenFacadeLogic#handleGetContainerConfiguration() + */ + protected String handleGetContainerConfiguration() + { + return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_EJB_CONTAINER_CONFIGURATION); + } + } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-23 05:53:40
|
User: vancek Date: 06/01/22 21:53:32 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityFacadeLogicImpl.java Log: updated getAttributesAsList to filter identifiers with auto generator types Revision Changes Path 1.7 +29 -18 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java Index: EJB3EntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- EJB3EntityFacadeLogicImpl.java 20 Jan 2006 17:19:58 -0000 1.6 +++ EJB3EntityFacadeLogicImpl.java 23 Jan 2006 05:53:32 -0000 1.7 @@ -568,7 +568,8 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleGetFullyQualifiedEntityCompositePrimaryKeyName() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic# + * handleGetFullyQualifiedEntityCompositePrimaryKeyName() */ protected String handleGetFullyQualifiedEntityCompositePrimaryKeyName() { @@ -870,7 +871,8 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleIsEmbeddableSuperclassGeneralizationExists() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic# + * handleIsEmbeddableSuperclassGeneralizationExists() */ protected boolean handleIsEmbeddableSuperclassGeneralizationExists() { @@ -879,13 +881,13 @@ /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic# - * handleGetAttributesAsList(java.util.Collection, boolean, boolean) + * handleGetAttributesAsList(java.util.Collection, boolean, boolean, boolean) */ protected String handleGetAttributesAsList( Collection attributes, boolean includeTypes, boolean includeNames, - boolean includeCompPKAttr) + boolean includeAutoIdentifiers) { if (!includeNames && !includeTypes || attributes == null) { @@ -899,12 +901,20 @@ { EJB3EntityAttributeFacade attr = (EJB3EntityAttributeFacade)it.next(); /** - * Do not include attributes that are assigned for optimistic lock value for version or - * identifier attributes for entities with a composite primary key . + * Do not include attributes that are assigned for optimistic lock value as a version + */ + boolean isCompositePKPresent = this.isCompositePrimaryKeyPresent(); + if (!attr.isVersion()) + { + /** + * Do not include identifier attributes for entities with a composite primary key + * or if includeAutoIdentifiers is false, do not include identifiers with auto generated values. */ - boolean isCompositePK = this.isCompositePrimaryKeyPresent(); - if (!attr.isVersion() && - ((isCompositePK && (!attr.isIdentifier() || includeCompPKAttr)) || !isCompositePK)) + if ((isCompositePKPresent && (includeAutoIdentifiers || !attr.isIdentifier())) || + (!isCompositePKPresent && + ((!includeAutoIdentifiers && attr.isIdentifier() && attr.isGeneratorTypeNone()) || + (includeAutoIdentifiers && attr.isIdentifier()) || + !attr.isIdentifier()))) { sb.append(separator); separator = ", "; @@ -918,6 +928,7 @@ sb.append(attr.getName()); } } + } } return sb.toString(); |
From: Vance K. <va...@us...> - 2006-01-23 05:52:06
|
User: vancek Date: 06/01/22 21:51:55 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: added generatorTypeAuto, generatorTypeNone and generatorTypeIdentity Revision Changes Path 1.5 +48 -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.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- EJB3EntityAttributeFacadeLogicImpl.java 18 Jan 2006 09:19:11 -0000 1.4 +++ EJB3EntityAttributeFacadeLogicImpl.java 23 Jan 2006 05:51:55 -0000 1.5 @@ -154,6 +154,54 @@ } /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleIsGeneratorTypeAuto() + */ + protected boolean handleIsGeneratorTypeAuto() + { + boolean isAuto = false; + if (StringUtils.isNotBlank(this.getGeneratorType())) + { + if (this.getGeneratorType().equalsIgnoreCase(EJB3Globals.GENERATOR_TYPE_AUTO)) + { + isAuto = true; + } + } + return isAuto; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleIsGeneratorTypeNone() + */ + protected boolean handleIsGeneratorTypeNone() + { + boolean isNone = false; + if (StringUtils.isNotBlank(this.getGeneratorType())) + { + if (this.getGeneratorType().equalsIgnoreCase(EJB3Globals.GENERATOR_TYPE_NONE)) + { + isNone = true; + } + } + return isNone; + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleIsGeneratorTypeIdentity() + */ + protected boolean handleIsGeneratorTypeIdentity() + { + boolean isIdentity = false; + if (StringUtils.isNotBlank(this.getGeneratorType())) + { + if (this.getGeneratorType().equalsIgnoreCase(EJB3Globals.GENERATOR_TYPE_IDENTITY)) + { + isIdentity = true; + } + } + return isIdentity; + } + + /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleGetGeneratorName() */ protected String handleGetGeneratorName() |
From: Vance K. <va...@us...> - 2006-01-23 05:51:11
|
User: vancek Date: 06/01/22 21:51:05 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3ScriptHelper.java Log: fixed filterUpdatableAttributes to filter identifiers with a specified generator Revision Changes Path 1.4 +8 -4 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3ScriptHelper.java Index: EJB3ScriptHelper.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/EJB3ScriptHelper.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- EJB3ScriptHelper.java 18 Jan 2006 09:16:46 -0000 1.3 +++ EJB3ScriptHelper.java 23 Jan 2006 05:51:05 -0000 1.4 @@ -60,19 +60,23 @@ /** * Filter a list of EntityAttributes by removing all non-updatable attributes. * This filter currently removes all attributes that are of stereotype Version - * and identifier attributes for an entity with a composite primary key class. + * It also removes identifier attributes for an entity with a composite primary key class + * or if the identifier attribute have a specified generator. * * @param list The original list - * @param isCompositePK True if entity has a composite primary key + * @param isCompositePKPresent True if entity has a composite primary key * @return Collection A list of EntityAttributes from the original list that are updatable */ - public Collection filterUpdatableAttributes(Collection list, boolean isCompositePK) + public Collection filterUpdatableAttributes(Collection list, boolean isCompositePKPresent) { Collection retval = new ArrayList(list.size()); for (final Iterator iter = list.iterator(); iter.hasNext(); ) { EJB3EntityAttributeFacade attr = (EJB3EntityAttributeFacade)iter.next(); - if (!attr.isVersion() && ((isCompositePK && !attr.isIdentifier()) || !isCompositePK)) + if (!attr.isVersion() && + ((isCompositePKPresent && !attr.isIdentifier()) || + (!isCompositePKPresent && (attr.isIdentifier() && attr.isGeneratorTypeNone()) || + !attr.isIdentifier()))) { retval.add(attr); } |
From: Vance K. <va...@us...> - 2006-01-23 05:49:53
|
User: vancek Date: 06/01/22 21:49:43 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Profile.java Log: extracted noSyntheticCreateMethod to profile Revision Changes Path 1.7 +9 -3 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.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- EJB3Profile.java 22 Jan 2006 06:23:33 -0000 1.6 +++ EJB3Profile.java 23 Jan 2006 05:49:43 -0000 1.7 @@ -135,10 +135,10 @@ public static final String TAGGEDVALUE_EJB_TRANSACTION_MANAGEMENT = profile.get("SERVICE_TRANSACTION_MANAGEMENT"); /** - * Used in EJB2.x - * May be deprecated in future releases. + * The tagged value indicating whether to not allow synthetic + * (auto generated) create/constructors. */ - public static final String TAGGEDVALUE_EJB_NO_SYNTHETIC_CREATE_METHOD = "@andromda.ejb.noSyntheticCreateMethod"; + public static final String TAGGEDVALUE_EJB_NO_SYNTHETIC_CREATE_METHOD = profile.get("NO_SYNTHETIC_CREATE_METHOD"); /** * The tagged value indicating the finder temporal type. @@ -386,4 +386,10 @@ * Timer Service timeout callback method. */ public static final String TAGGEDVALUE_SERVICE_TIMER_TIMEOUT = profile.get("SERVICE_TIMER_TIMEOUT"); + + /** + * The tagged value indicating the MDB or session bean + * container configuration name specific to JBoss. + */ + public static final String TAGGEDVALUE_EJB_CONTAINER_CONFIGURATION = profile.get("CONTAINER_CONFIGURATION"); } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-23 05:49:05
|
User: vancek Date: 06/01/22 21:49:00 Modified: andromda-ejb3/src/main/resources/META-INF/andromda profile.xml Log: extracted noSyntheticCreateMethod tagged value to profile Revision Changes Path 1.7 +21 -1 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.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- profile.xml 22 Jan 2006 06:22:46 -0000 1.6 +++ profile.xml 23 Jan 2006 05:49:00 -0000 1.7 @@ -850,7 +850,19 @@ can not be used with combined primary keys. </documentation> <value>@andromda.ejb.automaticKey</value> - <appliedOnElement>Entity attribute</appliedOnElement> + <appliedOnElement> + Entity attribute + </appliedOnElement> + </element> + <element name="NO_SYNTHETIC_CREATE_METHOD"> + <documentation> + Used on an Entity bean to decide whether to allow + synthetic (auto generated) create/constructors. + </documentation> + <value>@andromda.ejb.noSyntheticCreateMethod</value> + <appliedOnElement> + Entity + </appliedOnElement> </element> <element name="QUERY"> <documentation> @@ -972,6 +984,14 @@ </documentation> <value>@andromda.ejb.mdb.subscription.durability</value> </element> + <element name="CONTAINER_CONFIGURATION"> + <documentation> + Defines the container configuration name set in + jboss.xml to configure the container for a + session bean or MDB. + </documentation> + <value>@andromda.ejb.container.configuration</value> + </element> </elementGroup> </elements> </profile> \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-23 05:48:05
|
User: vancek Date: 06/01/22 21:47:59 Modified: andromda-ejb3/src/main/resources/templates/ejb3 jboss.xml.vsl Log: added configuration-name to message-driven element for container configuration of MDB ie Singleton MDB, added jboss container merge-point with ejb3 merge mapping file - NOTE: JBoss RC3 does not pickup these setting from jboss.xml - RC4 should! Revision Changes Path 1.4 +6 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/jboss.xml.vsl Index: jboss.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/jboss.xml.vsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- jboss.xml.vsl 20 Jan 2006 17:08:16 -0000 1.3 +++ jboss.xml.vsl 23 Jan 2006 05:47:59 -0000 1.4 @@ -22,9 +22,14 @@ <message-driven> <ejb-name>${mdb.messageDrivenName}</ejb-name> <destination-jndi-name>${mdb.destination}</destination-jndi-name> +#**##if ($stringUtils.isNotBlank($mdb.containerConfiguration)) + <configuration-name>${mdb.containerConfiguration}</configuration-name> +#**##end </message-driven> #end </enterprise-beans> + <!-- jboss container merge-point --> + </jboss> \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-01-23 05:45:42
|
User: vancek Date: 06/01/22 21:45:31 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: check for syntheticCreateMethodAllowed for auto generated constructors and fixed composite PK column mapping by introducing AttributeOverrides annotation Revision Changes Path 1.5 +24 -10 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.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- EntityEmbeddable.vsl 20 Jan 2006 17:10:17 -0000 1.4 +++ EntityEmbeddable.vsl 23 Jan 2006 05:45:31 -0000 1.5 @@ -125,32 +125,35 @@ #set ($allAttributes = $transform.filterByVisibility($entity.allInstanceAttributes, "public")) #set ($inheritedAttributes = $transform.filterByVisibility($entity.inheritedInstanceAttributes, "public")) #set ($instanceAttributes = $transform.filterByVisibility($entity.instanceAttributes, "public")) +#if ($entity.syntheticCreateMethodAllowed) /** * Implementation for the main constructor with all POJO attributes. * This method sets all POJO fields defined in this class to the * values provided by the parameters. * -#foreach($attribute in $transform.filterUpdatableAttributes($allAttributes, $entity.compositePrimaryKeyPresent)) +#**##foreach($attribute in $transform.filterUpdatableAttributes($allAttributes, $entity.compositePrimaryKeyPresent)) * @param $attribute.name Value for the ${attribute.name} property -#end +#**##end */ public #if (!$entity.requiresGeneralizationMapping && !$entity.embeddableSuperclass)${entity.entityEmbeddableName}#else${entity.entityName}#end($entity.getAttributesAsList($allAttributes, true, true, false)) { -#if(!$inheritedAttributes.empty) +#**##if(!$inheritedAttributes.empty) super($entity.getAttributesAsList($inheritedAttributes, false, true, false)); -#end -#foreach ($attribute in $transform.filterUpdatableAttributes($instanceAttributes, $entity.compositePrimaryKeyPresent)) +#**##end +#**##foreach ($attribute in $transform.filterUpdatableAttributes($instanceAttributes, $entity.compositePrimaryKeyPresent)) ${attribute.setterName}(${attribute.name}); -#end +#**##end } +#end #set ($relations = $entity.allEntityRelations) #if (!$relations.empty) #**##if ($entity.syntheticCreateMethodAllowed) /** * Constructor with all POJO attribute values and CMR relations. -#* *##foreach($attribute in $allAttributes) - * @param $attribute.name Value for the $attribute.name property + * +#* *##foreach($attribute in $transform.filterUpdatableAttributes($allAttributes, $entity.compositePrimaryKeyPresent)) + * @param $attribute.name Value for the ${attribute.name} property #* *##end #* *##foreach ($relation in $relations) * @param $relation.otherEnd.name Value for the ${relation.otherEnd.name} relation role @@ -158,8 +161,9 @@ */ public #if (!$entity.requiresGeneralizationMapping && !$entity.embeddableSuperclass)${entity.entityEmbeddableName}#else${entity.entityName}#end($entity.getAttributesAsList($allAttributes, true, true, false)#if(!$allAttributes.empty), #end#foreach ($relation in $relations)#if ($relation.one2Many || $relation.many2Many)${relation.relationType}<${relation.otherEnd.type.name}> $relation.otherEnd.name#else${relation.relationType} $relation.otherEnd.name#end#if($velocityCount != $relations.size()), #end#end) { - // Call suitable class constructor - this($entity.getAttributesAsList($allAttributes, false, true, false)); +#* *##foreach ($attribute in $transform.filterUpdatableAttributes($instanceAttributes, $entity.compositePrimaryKeyPresent)) + ${attribute.setterName}(${attribute.name}); +#* *##end // Set the CMR relations #* *##foreach ($relation in $relations) @@ -224,6 +228,16 @@ * @return The composite primary key */ @javax.persistence.EmbeddedId +#**##set ($identifiers = $entity.getIdentifiers()) +#**##if (!$identifiers.empty) + @javax.persistence.AttributeOverrides + ({ +#* *##foreach ($attribute in $identifiers) + @javax.persistence.AttributeOverride(name = "${attribute.name}", column = @javax.persistence.Column(name = "${attribute.columnName}"#if ($attribute.unique), unique = ${attribute.unique}#end#if (!$attribute.columnNullable), nullable = ${attribute.columnNullable}#end#if ($attribute.columnLength), length = ${attribute.columnLength}#end#if ($attribute.columnDefinition), columnDefinition = "${attribute.columnDefinition}"#end#if ($attribute.columnPrecision), precision = ${attribute.columnPrecision}#end#if ($attribute.columnScale), scale = ${attribute.columnScale}#end))#if($velocityCount != $identifiers.size()),#end + +#* *##end + }) +#**##end public ${entity.fullyQualifiedEntityCompositePrimaryKeyName} getPk() { return this.pk; |
From: Vance K. <va...@us...> - 2006-01-23 05:43:51
|
User: vancek Date: 06/01/22 21:43:43 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: won't generate auto constructor if syntheticCreateMethodAllowed is false Revision Changes Path 1.6 +6 -3 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl Index: Entity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- Entity.vsl 18 Jan 2006 08:45:33 -0000 1.5 +++ Entity.vsl 23 Jan 2006 05:43:43 -0000 1.6 @@ -42,19 +42,21 @@ ## Autogenerate a constructor implementation with all attributes. #set ($instanceAttributes = $transform.filterByVisibility($entity.instanceAttributes, "public")) #set ($allAttributes = $transform.filterByVisibility($entity.allInstanceAttributes, "public")) +#if ($entity.syntheticCreateMethodAllowed) /** * Implementation for the main constructor with all POJO attributes. * This method sets all POJO fields defined in this/super class to the * values provided by the parameters. * -#foreach($attribute in $transform.filterUpdatableAttributes($instanceAttributes)) +#**##foreach($attribute in $transform.filterUpdatableAttributes($instanceAttributes)) * @param $attribute.name Value for the ${attribute.name} property -#end +#**##end */ public ${entity.entityName}($entity.getAttributesAsList($allAttributes, true, true, false)) { super($entity.getAttributesAsList($allAttributes, false, true, false)); } +#end #foreach ($operation in $entity.getCreateMethods(true)) #**##set ($opArguments = $transform.getArgumentsAsList(${operation.argumentNames})) @@ -69,6 +71,7 @@ { super(${operation.argumentNames}); } + #end #set ($operations = $entity.businessOperations) #if (!$operations.empty) |