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-02-06 04:06:38
|
User: vancek Date: 06/02/05 20:06:30 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3SessionFacadeLogicImpl.java Log: moved getInterceptorsAsList to util class getInterceptorReferences transforms collection of dependencies to return the target elements Revision Changes Path 1.10 +8 -21 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java Index: EJB3SessionFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3SessionFacadeLogicImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- EJB3SessionFacadeLogicImpl.java 29 Jan 2006 01:55:58 -0000 1.9 +++ EJB3SessionFacadeLogicImpl.java 6 Feb 2006 04:06:30 -0000 1.10 @@ -719,7 +719,6 @@ DependencyFacade dependency = (DependencyFacade)object; ModelElementFacade targetElement = dependency.getTargetElement(); return (targetElement != null - && dependency.hasStereotype(EJB3Profile.STEREOTYPE_MESSAGE_DRIVEN_REF) && targetElement.hasStereotype(EJB3Profile.STEREOTYPE_MESSAGE_DRIVEN)); } }); @@ -731,7 +730,7 @@ */ protected Collection handleGetInterceptorReferences() { - Collection references = super.getSourceDependencies(); + Collection references = this.getSourceDependencies(); CollectionUtils.filter(references, new Predicate() { public boolean evaluate(Object object) @@ -741,26 +740,14 @@ return (targetElement != null && targetElement.hasStereotype(EJB3Profile.STEREOTYPE_INTERCEPTOR)); } }); - return references; - } - - /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3SessionFacadeLogic# - * handleGetInterceptorsAsList(java.util.Collection) - */ - protected String handleGetInterceptorsAsList(Collection interceptors) + CollectionUtils.transform(references, new Transformer() { - StringBuffer sb = new StringBuffer(); - String separator = ""; - - for (final Iterator it = interceptors.iterator(); it.hasNext();) + public Object transform(final Object object) { - DependencyFacade dependency = (DependencyFacade)it.next(); - sb.append(separator); - separator = ", "; - sb.append(dependency.getTargetElement().getFullyQualifiedName() + ".class"); + return ((DependencyFacade)object).getTargetElement(); } - return sb.toString(); + }); + return references; } /** |
From: Vance K. <va...@us...> - 2006-02-06 04:04:55
|
User: vancek Date: 06/02/05 20:04:39 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3FinderMethodArgumentFacadeLogicImpl.java Log: fixed getTemporalType to reference TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE Revision Changes Path 1.4 +1 -1 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.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- EJB3FinderMethodArgumentFacadeLogicImpl.java 25 Jan 2006 03:01:36 -0000 1.3 +++ EJB3FinderMethodArgumentFacadeLogicImpl.java 6 Feb 2006 04:04:39 -0000 1.4 @@ -27,7 +27,7 @@ protected java.lang.String handleGetTemporalType() { String temporalType = - (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_FINDER_PARAMETER_TEMPORAL_TYPE); + (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE); if (StringUtils.isBlank(temporalType)) { ClassifierFacade classifier = this.getType(); |
From: Vance K. <va...@us...> - 2006-02-06 04:03:31
|
User: vancek Date: 06/02/05 20:03:25 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityFacadeLogicImpl.java Log: removed ENTITY_ACCESS_TYPE static removed getAccessType method Revision Changes Path 1.12 +0 -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.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- EJB3EntityFacadeLogicImpl.java 1 Feb 2006 08:42:26 -0000 1.11 +++ EJB3EntityFacadeLogicImpl.java 6 Feb 2006 04:03:25 -0000 1.12 @@ -36,11 +36,6 @@ extends EJB3EntityFacadeLogic { /** - * The default entity access type - */ - public static final String ENTITY_ACCESS_TYPE = "entityAccessType"; - - /** * The default entity association cascade property */ public static final String ENTITY_DEFAULT_CASCADE = "entityDefaultCascade"; @@ -846,19 +841,6 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleGetAccessType() - */ - protected String handleGetAccessType() - { - String accessType = (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_ACCESS_TYPE); - if (StringUtils.isBlank(accessType)) - { - accessType = String.valueOf(this.getConfiguredProperty(ENTITY_ACCESS_TYPE)); - } - return accessType; - } - - /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleIsEmbeddableSuperclass() */ protected boolean handleIsEmbeddableSuperclass() |
From: Vance K. <va...@us...> - 2006-02-06 04:02:38
|
User: vancek Date: 06/02/05 20:02:32 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityAttributeFacadeLogicImpl.java Log: changed getLobType to isLob added getTemporalType and getEnumerationType Revision Changes Path 1.9 +19 -3 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.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- EJB3EntityAttributeFacadeLogicImpl.java 31 Jan 2006 15:25:10 -0000 1.8 +++ EJB3EntityAttributeFacadeLogicImpl.java 6 Feb 2006 04:02:32 -0000 1.9 @@ -154,11 +154,11 @@ } /** - * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacade#getLobType() + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacade#isLob() */ - protected String handleGetLobType() + protected boolean handleIsLob() { - return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_LOB_TYPE); + return this.hasStereotype(EJB3Profile.STEREOTYPE_LOB); } /** @@ -463,4 +463,20 @@ } return isTransient; } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleGetTemporalType() + */ + protected String handleGetTemporalType() + { + return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE); + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityAttributeFacadeLogic#handleGetEnumerationType() + */ + protected String handleGetEnumerationType() + { + return (String)this.findTaggedValue(EJB3Profile.TAGGEDVALUE_PERSISTENCE_ENUMERATION_TYPE); + } } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-06 04:01:43
|
User: vancek Date: 06/02/05 20:01:37 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3Profile.java Log: added STEREOTYPE_SERVICE_TIMER_TIMEOUT and STEREOTYPE_LOB renamed TAGGEDVALUE_PERSISTENCE_FINDER_PARAMETER_TEMPORAL_TYPE to TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE added TAGGEDVALUE_PERSISTENCE_ENUMERATION_TYPE removed TAGGEDVALUE_PERSISTENCE_ACCESS_TYPE Revision Changes Path 1.10 +32 -22 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.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- EJB3Profile.java 29 Jan 2006 01:54:27 -0000 1.9 +++ EJB3Profile.java 6 Feb 2006 04:01:36 -0000 1.10 @@ -94,7 +94,7 @@ public static final String STEREOTYPE_DATA_SOURCE = profile.get("DATA_SOURCE"); /** - * Represents an interceptor class for a session bean. + * Represents an class for a session bean. */ public static final String STEREOTYPE_INTERCEPTOR = profile.get("INTERCEPTOR"); @@ -110,6 +110,17 @@ */ public static final String STEREOTYPE_LISTENER = profile.get("LISTENER"); + /** + * Specifies the session bean operation as a + * Timer Service timeout callback method. + */ + public static final String STEREOTYPE_SERVICE_TIMER_TIMEOUT = profile.get("SERVICE_TIMER_TIMEOUT"); + + /** + * Represents a LOB type attribute. + */ + public static final String STEREOTYPE_LOB = profile.get("LOB"); + /* ----------------- Tagged Values -------------------- */ /** @@ -147,10 +158,10 @@ public static final String TAGGEDVALUE_EJB_NO_SYNTHETIC_CREATE_METHOD = profile.get("NO_SYNTHETIC_CREATE_METHOD"); /** - * The tagged value indicating the finder temporal type. + * The tagged value indicating the temporal type specified on attributes or + * finder method arguments of temporal nature. */ - public static final String TAGGEDVALUE_PERSISTENCE_FINDER_PARAMETER_TEMPORAL_TYPE = - profile.get("ENTITY_FINDER_TEMPORAL_TYPE"); + public static final String TAGGEDVALUE_PERSISTENCE_TEMPORAL_TYPE = profile.get("TEMPORAL_TYPE"); /** * The tagged value indicating the finder method parameter result type @@ -170,14 +181,14 @@ public static final String TAGGEDVALUE_PERSISTENCE_FETCH_TYPE = profile.get("FETCH_TYPE"); /** - * The tagged value indicating the LOB type. + * The tagged value indicating the cascade type. */ - public static final String TAGGEDVALUE_PERSISTENCE_LOB_TYPE = profile.get("LOB_TYPE"); + public static final String TAGGEDVALUE_PERSISTENCE_CASCADE_TYPE = profile.get("CASCADE_TYPE"); /** - * The tagged value indicating the cascade type. + * The tagged value indicating the enumeration type (ORDINAL, STRING). */ - public static final String TAGGEDVALUE_PERSISTENCE_CASCADE_TYPE = profile.get("CASCADE_TYPE"); + public static final String TAGGEDVALUE_PERSISTENCE_ENUMERATION_TYPE = profile.get("ENUMERATION_TYPE"); /** * The tagged value indicating the generator type. @@ -291,12 +302,6 @@ profile.get("ENTITY_DISCRIMINATOR_COLUMN_LENGTH"); /** - * The tagged value representing the access type for the - * entity class - */ - public static final String TAGGEDVALUE_PERSISTENCE_ACCESS_TYPE = profile.get("ENTITY_ACCESS_TYPE"); - - /** * The tagged value representing whether this entity is an * embeddable superclass */ @@ -388,12 +393,6 @@ public static final String TAGGEDVALUE_EJB_SESSION_JNDI_NAME_Local = profile.get("SERVICE_JNDI_NAME_LOCAL"); /** - * The tagged value indicating the session bean operation as a - * 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. */ @@ -404,4 +403,15 @@ */ public static final String TAGGEDVALUE_ASSOCIATION_COLLECTION_TYPE = profile.get("ASSOCIATION_COLLECTION_TYPE"); + /** + * Defines whether to exclude the default interceptors for the session operation. + */ + public static final String TAGGEDVALUE_SERVICE_INTERCEPTOR_EXCLUDE_DEFAULT = + profile.get("EXCLUDE_DEFAULT_INTERCEPTORS"); + + /** + * Defines whether to exclude the class interceptors for the session operation. + */ + public static final String TAGGEDVALUE_SERVICE_INTERCEPTOR_EXCLUDE_CLASS = + profile.get("EXCLUDE_CLASS_INTERCEPTORS"); } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-06 03:36:26
|
User: vancek Date: 06/02/05 19:36:21 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3 EJB3ScriptHelper.java Log: added getInterceptorsAsList used in EJB3SessionFacade and EJB3SessionOperationFacade Revision Changes Path 1.6 +28 -0 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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- EJB3ScriptHelper.java 31 Jan 2006 15:23:40 -0000 1.5 +++ EJB3ScriptHelper.java 6 Feb 2006 03:36:21 -0000 1.6 @@ -102,4 +102,32 @@ return result; } + + /** + * Returns the comma separated list of interceptor classes. + * + * @param interceptors The collection ModelElementFacade elements representing the interceptors + * @param prepend Prefix any interceptors to the comma separated list + * @return String containing the comma separated fully qualified class names + */ + public String getInterceptorsAsList(Collection interceptors, String prepend) + { + StringBuffer sb = new StringBuffer(); + String separator = ""; + + if (StringUtils.isNotBlank(prepend)) + { + sb.append(prepend); + separator = ", "; + } + + for (final Iterator it = interceptors.iterator(); it.hasNext();) + { + ModelElementFacade interceptor = (ModelElementFacade)it.next(); + sb.append(separator); + separator = ", "; + sb.append(interceptor.getFullyQualifiedName() + ".class"); + } + return sb.toString(); + } } |
From: Vance K. <va...@us...> - 2006-02-06 03:35:07
|
User: vancek Date: 06/02/05 19:34:58 Modified: andromda-ejb3/src/main/resources/META-INF/andromda profile.xml Log: changed SERVICE_TIMER_TIMEOUT element to define a stereotype from a tagged value change LOB_TYPE element to LOB element and to define a stereotype rather than a tagged value removed ENTITY_ACCESS_TYPE element change ENTITY_FINDER_TEMPORAL_TYPE to TEMPORAL_TYPE element added ENUMERATION_TYPE element added EXCLUDE_DEFAULT_INTERCEPTORS and EXCLUDE_CLASS_INTERCEPTORS Revision Changes Path 1.11 +81 -93 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.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- profile.xml 29 Jan 2006 01:53:46 -0000 1.10 +++ profile.xml 6 Feb 2006 03:34:58 -0000 1.11 @@ -226,6 +226,30 @@ Attribute </appliedOnElement> </element> + <element name="SERVICE_TIMER_TIMEOUT"> + <documentation> + Specifies whether the session bean operation + as a Timer Service timeout callback method. + </documentation> + <value>Timeout</value> + <appliedOnElement> + Service Operation + </appliedOnElement> + </element> + <element name="LOB"> + <documentation> + Specifies whether the entity attribute is + defined as either a large binary or character + type. + BLOB fields represent Byte[] or Serializable types. + CLOB fiels represent char[], Character[] or String + types. + </documentation> + <value>LOB</value> + <appliedOnElement> + Entity Attribute + </appliedOnElement> + </element> </elementGroup> <elementGroup name="Tagged Values"> <element name="ATTRIBUTE_PERSISTENCE_OPTIONAL"> @@ -241,46 +265,6 @@ <value>false</value> </allowedValues> </element> - <element name="ENTITY_ACCESS_TYPE"> - <documentation> - Used to override the default entity access type - specified by - <a href="namespace.html#entityAccessType"> - entityAccessType - </a> - namespace property. - <ul> - Permitted values are: - <li>PROPERTY</li> - <li>FIELD</li> - </ul> - <p> - The tagged value of - @andromda.persistence.access.type is set once on - the entity class to indicate whether the - persistence runtime uses properties or fields to - access the entity state. The persistence runtime - will default to - <code>PROPERTY</code> - if not specified. Currenly, AndroMDA support the - <code>PROPERTY</code> - value only. The default access type is defined - by the - <a href="namespaces.html#entityAccessType"> - entityAccessType - </a> - namespace property. - </p> - </documentation> - <value>@andromda.persistence.access.type</value> - <appliedOnElement> - <![CDATA[<<Entity>>]]> - </appliedOnElement> - <allowedValues> - <value>PROPERTY</value> - <value>FIELD</value> - </allowedValues> - </element> <element name="ENTITY_INHERITANCE"> <documentation> Used to override the default entity inheritance @@ -426,41 +410,42 @@ <![CDATA[<<Entity>>]]> </appliedOnElement> </element> - <element name="ENTITY_FINDER_TEMPORAL_TYPE"> + <element name="ENTITY_FINDER_RESULT_TYPE"> <documentation> - The temporal type tagged value specified on - the finder method parameter specifying - whether to expect one of the following - types Date, Time or Timestamp. + Specifies the finder method parameter + result type to specify the limit and/or + starting index. </documentation> <value> - @andromda.persistence.finder.temporal.type + @andromda.persistence.finder.result.type </value> <appliedOnElement> Entity Finder Method Parameter </appliedOnElement> <allowedValues> - <value default="true">DATE</value> - <value>TIME</value> - <value>TIMESTAMP</value> - <value>NONE</value> + <value default="true">First</value> + <value>Max</value> </allowedValues> </element> - <element name="ENTITY_FINDER_RESULT_TYPE"> + <element name="TEMPORAL_TYPE"> <documentation> - Specifies the finder method parameter - result type to specify the limit and/or - starting index. + The temporal type tagged value specified on + the attributes of type java.util.Date or + java.util.Calendar or on finder method parameter + specifying, whether to expect one of the following + types Date, Time or Timestamp. </documentation> <value> - @andromda.persistence.finder.result.type + @andromda.persistence.temporal.type </value> <appliedOnElement> - Entity Finder Method Parameter + Entity Attribute or Entity Finder Method Parameter </appliedOnElement> <allowedValues> - <value default="true">First</value> - <value>Max</value> + <value default="true">DATE</value> + <value>TIME</value> + <value>TIMESTAMP</value> + <value>NONE</value> </allowedValues> </element> <element name="FETCH_TYPE"> @@ -486,25 +471,6 @@ <value>EAGER</value> </allowedValues> </element> - <element name="LOB_TYPE"> - <documentation> - Specifies either binary or character types - for an entity attribute. - BLOB fields represent Byte[] or Serializable types. - CLOB fiels represent char[], Character[] or String - types. - </documentation> - <value> - @andromda.persistence.lob.type - </value> - <appliedOnElement> - Entity Attribute - </appliedOnElement> - <allowedValues> - <value default="true">CLOB</value> - <value>BLOB</value> - </allowedValues> - </element> <element name="CASCADE_TYPE"> <documentation> Specifies the override value for the default @@ -524,6 +490,22 @@ <value>REFRESH</value> </allowedValues> </element> + <element name="ENUMERATION_TYPE"> + <documentation> + Specifies the enumeration type for the + persistent property or field. + </documentation> + <value> + @andromda.persistence.enumeration.type + </value> + <appliedOnElement> + Entity Attribute + </appliedOnElement> + <allowedValues> + <value default="true">ORDINAL</value> + <value>STRING</value> + </allowedValues> + </element> <element name="GENERATOR_TYPE"> <documentation> Specifies the primary key generation strategy @@ -784,22 +766,6 @@ <![CDATA[<<Service>>]]> </appliedOnElement> </element> - <element name="SERVICE_TIMER_TIMEOUT"> - <documentation> - Specifies whether the session bean operation - as a Timer Service timeout callback method. - </documentation> - <value> - @andromda.service.timer.timeout - </value> - <appliedOnElement> - Service Operation - </appliedOnElement> - <allowedValues> - <value>true</value> - <value>false</value> - </allowedValues> - </element> <element name="SERVICE_TRANSACTION_MANAGEMENT"> <documentation> Specifies the transaction demarcation strategy @@ -877,6 +843,28 @@ Service </appliedOnElement> </element> + <element name="EXCLUDE_DEFAULT_INTERCEPTORS"> + <documentation> + Determines whether to exclude the invocation + of the default interceptors for the applied + business method. + </documentation> + <value>@andromda.service.interceptor.excludeDefault</value> + <appliedOnElement> + Service Operation + </appliedOnElement> + </element> + <element name="EXCLUDE_CLASS_INTERCEPTORS"> + <documentation> + Determines whether to exclude the invocation + of the class interceptors for the applied + business method. + </documentation> + <value>@andromda.service.interceptor.excludeClass</value> + <appliedOnElement> + Service Operation + </appliedOnElement> + </element> <element name="AUTOMATIC_KEY"> <documentation> Can be used in class level of an entity. If you set |
From: Vance K. <va...@us...> - 2006-02-06 03:26:14
|
User: vancek Date: 06/02/05 19:25:58 Modified: andromda-ejb3/src/main/resources/META-INF/andromda namespace.xml Log: removed entityAccessType property definition Revision Changes Path 1.12 +0 -15 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.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- namespace.xml 1 Feb 2006 08:39:45 -0000 1.11 +++ namespace.xml 6 Feb 2006 03:25:58 -0000 1.12 @@ -380,21 +380,6 @@ </ul> </documentation> </property> - <property name="entityAccessType"> - <default>PROPERTY</default> - <documentation> - The value of the - <code>AccessType</code> - element of an annotation of the entity that - determines whether to use properties or fields to - access the entity state. Currenly, AndroMDA support - the PROPERTY value ONLY. Possible values are: - <ul> - <li>PROPERTY</li> - <li>FIELD</li> - </ul> - </documentation> - </property> <property name="entityDefaultCascade"> <default>NONE</default> <documentation> |
From: Vance K. <va...@us...> - 2006-02-06 03:25:26
|
User: vancek Date: 06/02/05 19:25:21 Modified: andromda-ejb3/src/main/resources/META-INF/andromda metafacades.xml Log: removed entityAccessType property Revision Changes Path 1.11 +0 -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.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- metafacades.xml 1 Feb 2006 08:39:45 -0000 1.10 +++ metafacades.xml 6 Feb 2006 03:25:21 -0000 1.11 @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <metafacades> <property reference="transactionType"/> - <property reference="entityAccessType"/> <property reference="entityViewType"/> <property reference="entityListenerNamePattern"/> <property reference="entityEmbeddableNamePattern"/> |
From: Vance K. <va...@us...> - 2006-02-06 03:24:27
|
User: vancek Date: 06/02/05 19:24:19 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionListener.vsl Log: changed lifecycle callback method arg to InvocationContext moved 'remove' method with @Remove annotation to entity Revision Changes Path 1.3 +4 -9 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionListener.vsl Index: SessionListener.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionListener.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- SessionListener.vsl 17 Jan 2006 03:14:41 -0000 1.2 +++ SessionListener.vsl 6 Feb 2006 03:24:19 -0000 1.3 @@ -19,31 +19,26 @@ } @javax.ejb.PostConstruct - public void postConstruct(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void postConstruct(javax.ejb.InvocationContext ctx) { // post construct implementation } @javax.ejb.PostActivate - public void postActivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void postActivate(javax.ejb.InvocationContext ctx) { // post construct implementation } @javax.ejb.PrePassivate - public void prePassivate(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void prePassivate(javax.ejb.InvocationContext ctx) { // pre passivate implementation } @javax.ejb.PreDestroy - public void preDestroy(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) + public void preDestroy(javax.ejb.InvocationContext ctx) { // pre destroy implementation } - - @javax.ejb.Remove - public void remove(${service.fullyQualifiedServiceName} ${stringUtils.uncapitalize(${service.name})}) { - // remove implementation - } } |
From: Vance K. <va...@us...> - 2006-02-06 03:18:55
|
User: vancek Date: 06/02/05 19:18:49 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBeanImpl.vsl Log: added handleRemove implementation called from embeddable superclass remove method that has the @Remove annotation Revision Changes Path 1.7 +9 -0 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl Index: SessionBeanImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- SessionBeanImpl.vsl 29 Jan 2006 01:50:58 -0000 1.6 +++ SessionBeanImpl.vsl 6 Feb 2006 03:18:49 -0000 1.7 @@ -73,4 +73,13 @@ #**##end #end + // ----------- Generic Methods ----------- + + /** + * @see ${service.fullyQualifiedServiceName}#remove()} + */ + protected void handleRemove() + { + //TODO: put your implementation here + } } |
From: Vance K. <va...@us...> - 2006-02-06 03:12:36
|
User: vancek Date: 06/02/05 19:12:29 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBean.vsl Log: renamed @Interceptor to @Interceptors removed @CallbackListener @Interceptors not include lifecycle callback listener @Interceptors now applied on session bean methods added @ExcludeDefaultInterceptors and @ExcludeClassInterceptors fixed casing for EntityManager variable name when persistent context references exist Revision Changes Path 1.13 +35 -8 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.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- SessionBean.vsl 29 Jan 2006 01:49:00 -0000 1.12 +++ SessionBean.vsl 6 Feb 2006 03:12:29 -0000 1.13 @@ -24,9 +24,6 @@ @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.${service.transactionType}) #**##end #end -#if ($service.listenerEnabled) -...@ja...llbackListener(${service.fullyQualifiedServiceListenerName}.class) -#end #if ($stringUtils.isNotBlank($service.securityRealm)) #**##if ($service.persistenceContainerJboss) @org.jboss.annotation.security.SecurityDomain("${service.securityRealm}") @@ -58,11 +55,17 @@ #if ($service.viewTypeRemote) @javax.ejb.Remote({${service.fullyQualifiedServiceRemoteInterfaceName}.class}) #end +## +## Service listener - lifecycle callbacks is defined as an interceptor +## #set ($interceptors = $service.interceptorReferences) -#if ($collectionUtils.size($interceptors) == 1) -...@ja...erceptor($service.getInterceptorsAsList($interceptors)) -#elseif ($collectionUtils.size($interceptors) > 1) -...@ja...erceptors({$service.getInterceptorsAsList($interceptors)}) +#if ($collectionUtils.size($interceptors) >= 1 || $service.listenerEnabled) +#**##if ($service.listenerEnabled) +#* *##set ($lifecycleCallback = "${service.fullyQualifiedServiceListenerName}.class") +#**##else +#* *##set ($lifecycleCallback = "null") +#**##end +...@ja...erceptors({$transform.getInterceptorsAsList(${interceptors}, ${lifecycleCallback})}) #end public abstract class ${service.serviceName} #if($service.generalization) @@ -102,7 +105,7 @@ */ @javax.persistence.PersistenceContext#if ($persistenceContext.persistenceContextUnitName || $persistenceContext.persistenceContextType)(#end#if ($persistenceContext.persistenceContextUnitName)unitName = "${persistenceContext.persistenceContextUnitName}"#set ($argExists = true)#end#if ($persistenceContext.persistenceContextType)#if ($argExists),#end type = javax.persistence.PersistenceContextType.${persistenceContext.persistenceContextType}#end#if ($persistenceContext.persistenceContextUnitName || $persistenceContext.persistenceContextType))#end - protected javax.persistence.EntityManager ${persistenceContext.name}; + protected javax.persistence.EntityManager $stringUtils.uncapitalize(${persistenceContext.name}); #end #set ($references = $service.serviceReferences) #if (!$references.empty) @@ -302,6 +305,16 @@ #* *##if ($operation.timeoutCallback) @javax.ejb.Timeout #* *##end +#* *##set ($interceptors = $operation.interceptorReferences) +#* *##if ($collectionUtils.size($interceptors) >= 1) + @javax.ejb.Interceptors({$transform.getInterceptorsAsList(${interceptors}, null)}) +#* *##end +#* *##if ($operation.excludeDefaultInterceptors) + @javax.ejb.ExcludeDefaultInterceptors +#* *##end +#* *##if ($operation.excludeClassInterceptors) + @javax.ejb.ExcludeClassInterceptors +#* *##end $operation.visibility $operation.returnType.fullyQualifiedName $operation.signature #* *##if ($operation.exceptionsPresent) $operation.throwsClause @@ -364,4 +377,18 @@ #**##end #end + // ------------ Generic Methods ------------ + + /** + * Generic remove method + */ + @javax.ejb.Remove + public void remove() { + handleRemove(); + } + + /** + * Performs the core logic for {@link #remove()) + */ + protected abstract void handleRemove(); } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-06 03:05:23
|
User: vancek Date: 06/02/05 19:05:17 Modified: andromda-ejb3/src/main/resources/templates/ejb3 persistence.xml.vsl Log: restructured inline with EJB 3.0 PFD Revision Changes Path 1.3 +20 -22 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/persistence.xml.vsl Index: persistence.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/persistence.xml.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- persistence.xml.vsl 17 Jan 2006 03:09:10 -0000 1.2 +++ persistence.xml.vsl 6 Feb 2006 03:05:17 -0000 1.3 @@ -1,12 +1,10 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="${xmlEncoding}"?> <!-- Attention: Generated code! Do not modify by hand! Generated by: persistence.xml.vsl in andromda-ejb3-cartridge. --> -<entity-manager> -#if ($stringUtils.isNotBlank($entityManagerName)) - <name>${entityManagerName}</name> -#end +<persistence> + <persistence-unit name="${entityManagerName}"> #if ($stringUtils.isNotBlank($entityManagerJTADataSource)) <jta-data-source>${entityManagerJTADataSource}</jta-data-source> #end @@ -48,5 +46,5 @@ <property name="hibernate.transaction.auto_close_session" value="${hibernateTransactionAutoCloseSession}"/> #end </properties> - -</entity-manager> \ No newline at end of file + </persistence-unit> +</persistence> \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-06 03:04:39
|
User: vancek Date: 06/02/05 19:04:29 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Interceptor.vsl Log: fixed comment Revision Changes Path 1.2 +1 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Interceptor.vsl Index: Interceptor.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Interceptor.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- Interceptor.vsl 17 Jan 2006 03:05:58 -0000 1.1 +++ Interceptor.vsl 6 Feb 2006 03:04:29 -0000 1.2 @@ -5,7 +5,7 @@ #set ($generatedFile = "${stringUtils.replace($interceptor.fullyQualifiedInterceptorName,'.','/')}.java") /** - * Interceptor class + * Interceptor class ${interceptor.interceptorName} */ public class ${interceptor.interceptorName} { |
From: Vance K. <va...@us...> - 2006-02-06 03:04:14
|
User: vancek Date: 06/02/05 19:04:06 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: renamed @EmbeddableSuperclass to @MappedSuperclass removed access type for @MappedSuperclass and @Entity - figured out automatically moved generator properties from @Id to @GeneratedValue added @SequenceGenerator and fixed @TableGenerator properties removed type property from @Lob - determined from attribute type moved fetch property from @Lob to @Basic added @Temporal annotation to entity attribute getter added @Enumerated annotation to entity attribute getter fixed inheritance discriminator annotations, @Inheritance, @DiscriminatorColumn and @DiscriminatorValue (new) renamed @EntityListener to @EntityListeners when defining attributes, use instanceAttributes only, not allInstanceAttributes (excludes inherited isntance atts) added @JoinColumns if composite PK present on Many-To-One and One-To-One relationships added @JoinTable on owning side of Many-To-Many relationship removed entity business operations - only exist in impl class Revision Changes Path 1.14 +88 -48 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.13 retrieving revision 1.14 diff -u -w -r1.13 -r1.14 --- EntityEmbeddable.vsl 1 Feb 2006 08:38:44 -0000 1.13 +++ EntityEmbeddable.vsl 6 Feb 2006 03:04:06 -0000 1.14 @@ -19,10 +19,10 @@ #set ($identifier = $entity.identifiers.iterator().next()) /** - * Autogenerated POJO EJB#if (!$entity.requiresGeneralizationMapping || $entity.embeddableSuperclass) embeddable super#end class for ${entity.entityName} containing the + * Autogenerated POJO EJB#if (!$entity.requiresGeneralizationMapping || $entity.embeddableSuperclass) embeddable/mapped super#end class for ${entity.entityName} containing the * bulk of the entity implementation. * - * This is#if (!$entity.requiresGeneralizationMapping || $entity.embeddableSuperclass) an embeddable super class and#end autogenerated by AndroMDA using the EJB3 + * This is#if (!$entity.requiresGeneralizationMapping || $entity.embeddableSuperclass) an embeddable/mapped super class and#end autogenerated by AndroMDA using the EJB3 * cartridge. * * DO NOT MODIFY this class. @@ -31,11 +31,9 @@ * */ #if (!$entity.requiresGeneralizationMapping || $entity.embeddableSuperclass) -...@ja...rsistence.EmbeddableSuperclass#if ($entity.accessType)(access = javax.persistence.AccessType.${entity.accessType})#end - +...@ja...ppedSuperclass #else -...@ja...rsistence.Entity#if ($entity.accessType)(access = javax.persistence.AccessType.${entity.accessType})#end - +...@ja...rsistence.Entity #end ## ## Include the Table annotation for a base class in single table inheritence hierarchy @@ -48,20 +46,25 @@ @javax.persistence.Table(name = "${entity.tableName}") #end #if ($entity.requiresGeneralizationMapping && $entity.listenerEnabled) -...@ja...rsistence.EntityListener(${entity.fullyQualifiedEntityListenerName}.class) +...@ja...rsistence.EntityListeners({${entity.fullyQualifiedEntityListenerName}.class}) #end +## ## Only include the inheritance related annotations for inheritance mapping ## that doesn't involve embeddable superclass hierarchy. +## #if ($entity.requiresSpecializationMapping && !$entity.embeddableSuperclass) -...@ja...heritance(strategy = javax.persistence.InheritanceType.${entity.inheritanceStrategy}, discriminatorType = javax.persistence.DiscriminatorType.${entity.discriminatorType}#if ($entity.discriminatorValue), discriminatorValue = "${entity.discriminatorValue}"#end) +...@ja...heritance(strategy = javax.persistence.InheritanceType.${entity.inheritanceStrategy}) #**##if ($entity.inheritanceSingleTable || $entity.inheritanceJoined) -...@ja...rsistence.DiscriminatorColumn(name = "${entity.discriminatorColumn}"#if ($entity.discriminatorColumnDefinition), columnDefinition = "${entity.discriminatorColumnDefinition}"#end#if ($entity.discriminatorLength > 0), length = ${entity.discriminatorLength}#end) +#* *##set ($argExists = false) +...@ja...rsistence.DiscriminatorColumn(#if ($entity.discriminatorColumn)name = "${entity.discriminatorColumn}"#set ($argExists = true)#end#if ($entity.discriminatorType)#if ($argExists), #end#**#discriminatorType = javax.persistence.DiscriminatorType.${entity.discriminatorType}#set ($argExists = true)#end#if ($entity.discriminatorColumnDefinition)#if ($argExists), #end#**#columnDefinition = "${entity.discriminatorColumnDefinition}"#set ($argExists = true)#end#if ($entity.discriminatorLength > 0)#if ($argExists), #end#**#length = ${entity.discriminatorLength}#end) +...@ja...rsistence.DiscriminatorValue("${entity.discriminatorValue}") #**##end #elseif ($entity.requiresGeneralizationMapping && !$entity.embeddableSuperclassGeneralizationExists) -## Only include the inheritance annotation for subclasses if the super class +## +## Only include the DiscriminatorValue annotation for subclasses if the super class ## is NOT an embeddable superclass. -...@ja...heritance#if ($entity.discriminatorValue)(discriminatorValue = "${entity.discriminatorValue}")#end - +## +...@ja...rsistence.DiscriminatorValue("${entity.discriminatorValue}") #end public#if (!$entity.requiresGeneralizationMapping && !$entity.embeddableSuperclass) abstract class ${entity.entityEmbeddableName}#else class ${entity.entityName}#end @@ -82,7 +85,10 @@ public static final $constant.type.fullyQualifiedName $constant.name = $constant.defaultValue; #**##end #end -#set ($attributes = $entity.allInstanceAttributes) +## +## Only declase instance attributes that are NOT inherited +## +#set ($attributes = $entity.instanceAttributes) #if (!$attributes.empty) // ----------- Attribute Definitions ------------ @@ -277,10 +283,15 @@ * @return $attribute.type.fullyQualifiedName The value of ${attribute.name} */ #* *##if ($attribute.identifier) -#* *##if ($attribute.sequenceGeneratorType || $attribute.tableGeneratorType) - @javax.persistence.TableGenerator(name = "${attribute.generatorName}"#if ($attribute.sequenceGeneratorType), sequenceName = "${attribute.generatorSourceName}"#elseif ($attribute.tableGeneratorType), tableName = "${attribute.generatorSourceName}"#end,#if ($attribute.tableGeneratorType) pkColumnValue = "${attribute.generatorPkColumnValue}",#end#if ($attribute.sequenceGeneratorType) initialValue = ${attribute.generatorInitialValue},#end allocationSize = ${attribute.generatorAllocationSize}) + @javax.persistence.Id +#* *##if ($attribute.sequenceGeneratorType) + @javax.persistence.SequenceGenerator(name = "${attribute.generatorName}"#if ($attribute.sequenceGeneratorType), sequenceName = "${attribute.generatorSourceName}"#end#if ($attribute.sequenceGeneratorType), initialValue = ${attribute.generatorInitialValue}#end#if ($attribute.generatorAllocationSize), allocationSize = ${attribute.generatorAllocationSize}#end) +#* *##elseif ($attribute.tableGeneratorType) + @javax.persistence.TableGenerator(name = "${attribute.generatorName}"#if ($attribute.tableGeneratorType), 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) + @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.${attribute.generatorType}#if ($attribute.sequenceGeneratorType || $attribute.tableGeneratorType), generator = "${attribute.generatorName}"#end) #* *##end - @javax.persistence.Id(generate = javax.persistence.GeneratorType.${attribute.generatorType}#if ($attribute.sequenceGeneratorType || $attribute.tableGeneratorType), generator = "${attribute.generatorName}"#end) #* *##end #* *##if ($attribute.version) @javax.persistence.Version @@ -288,15 +299,30 @@ #* *##if ($attribute.transient) @javax.persistence.Transient #* *##end -#* *##if ($attribute.lobType) -## LOB type is specified - also sepcify FetchType if set to EAGER since default fetch type for LOB annotation is LAZY - @javax.persistence.Lob(type = javax.persistence.LobType.${attribute.lobType}#if ($attribute.eager), fetch = javax.persistence.FetchType.EAGER#end) +#* *##if ($attribute.lob) +## +## Add if LOB type is specified - do not set LOB type as of PFD Spec - inferred from type. +## Also sepcify Fetch type in Basic annotation if set to EAGER since +## default fetch type for LOB annotation is LAZY. +## + @javax.persistence.Lob +#* *##if ($attribute.eager) + @javax.persistence.Basic(fetch = javax.persistence.FetchType.EAGER) +#* *##end #* *##end @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 (!$attribute.lob && $attribute.lazy) +## ## Only add the fetch type property for LAZY hints - default is EAGER -#* *##if ($attribute.lazy) +## @javax.persistence.Basic(fetch = javax.persistence.FetchType.LAZY) #* *##end +#* *##if ($stringUtils.isNotBlank($attribute.temporalType)) + @javax.persistence.Temporal(javax.persistence.TemporalType.${attribute.temporalType}) +#* *##end +#* *##if ($stringUtils.isNotBlank($attribute.enumerationType)) + @javax.persistence.Enumerated(${attribute.enumerationType}) +#* *##end public ${attribute.type.fullyQualifiedName} ${attribute.getterName}() { return $attribute.name; @@ -338,7 +364,22 @@ */ #* *##set ($argExists = false) @javax.persistence.ManyToOne(#if (!$target.optional)optional = false#set ($argExists = true)#end#if ($target.cascadeType)#if ($argExists), #end#**#cascade = {${target.cascadeType}}#set ($argExists = true)#end#if ($target.lazy)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.LAZY#end) +## +## Add the JoinColumns annotation if the target entity has a composite primary key +## Otherwise add the JoinColumn annotation. +## +#* *##if (!$target.type.compositePrimaryKeyPresent) @javax.persistence.JoinColumn(name = "$stringUtils.upperCase(${target.name})"#if ($associationEnd.columnDefinition), columnDefinition = "${associationEnd.columnDefinition}"#end) +#* *##else +#* *##set ($identifiers = $target.type.getIdentifiers()) + @javax.persistence.JoinColumns + ({ +#* *##foreach ($attribute in $identifiers) + @javax.persistence.JoinColumn(name = "$stringUtils.upperCase(${target.name})_${attribute.columnName}", referencedColumnName = "${attribute.columnName}")#if($velocityCount != $identifiers.size()),#end + +#* *##end + }) +#* *##end public $target.getterSetterTypeName ${target.getterName}() { return this.${target.name}; @@ -408,7 +449,22 @@ #* *##set ($argExists = false) @javax.persistence.OneToOne(#if($associationEnd.owning)#if (!$target.optional)optional = false#set ($argExists = true)#end#end#if ($target.cascadeType)#if ($argExists), #end#**#cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.lazy)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.LAZY#end) #* *##if($associationEnd.owning) +## +## Add the JoinColumns annotation if the target entity has a composite primary key +## Otherwise add the JoinColumn annotation. +## +#* *##if (!$target.type.compositePrimaryKeyPresent) @javax.persistence.JoinColumn(name = "$stringUtils.upperCase(${target.name})"#if ($associationEnd.columnDefinition), columnDefinition = "${associationEnd.columnDefinition}"#end) +#* *##else +#* *##set ($identifiers = $target.type.getIdentifiers()) + @javax.persistence.JoinColumns + ({ +#* *##foreach ($attribute in $identifiers) + @javax.persistence.JoinColumn(name = "$stringUtils.upperCase(${target.name})_${attribute.columnName}", referencedColumnName = "${attribute.columnName}")#if($velocityCount != $identifiers.size()),#end + +#* *##end + }) +#* *##end #* *##end public $target.getterSetterTypeName ${target.getterName}() { @@ -441,8 +497,18 @@ #* *##set ($argExists = false) @javax.persistence.ManyToMany(#if ($target.cascadeType)cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.eager)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.EAGER#end) ## Use Aggregation and Composition to determine owning side -#* *##if(($associationEnd.owning) && ${associationEnd.association.tableName}) - @javax.persistence.JoinTable(table = @javax.persistence.Table(name = "${associationEnd.association.tableName}")) +#* *##if (${associationEnd.association.tableName}) +#* *##if($associationEnd.owning) +## +## Add the JoinTable annotation on the owning side +## + @javax.persistence.JoinTable + ( + name = "${associationEnd.association.tableName}", + joinColumns = {#set ($identifiers = $entity.getIdentifiers())#foreach ($attribute in $identifiers)@javax.persistence.JoinColumn(name = "${attribute.columnName}")#if($velocityCount != $identifiers.size()), #end#end#**#}, + inverseJoinColumns = {#set ($identifiers = $target.type.getIdentifiers())#foreach ($attribute in $identifiers)@javax.persistence.JoinColumn(name = "${attribute.columnName}")#if($velocityCount != $identifiers.size()), #end#end#**#} + ) +#* *##end #* *##end #* *##if ($target.hasTaggedValue("@andromda.persistence.orderBy")) #* *##if ($stringUtils.isNotEmpty(${target.orderByClause})) @@ -576,30 +642,4 @@ #**##end #end -#set ($businessOperations = $entity.businessOperations) -#if (!$businessOperations.empty) - - // --------------- Entity Methods ----------------- - -## -## Method with a static modifier will be defined in the inheriting subclass -## -#**##foreach ($operation in $businessOperations) -#* *##if (!$operation.static) -#* *##set ($signature = $operation.signature) -#* *##set ($visibility = $operation.visibility.toString()) -#* *##set ($returnType = $operation.returnType.fullyQualifiedName) - /** -$operation.getDocumentation(" * ") - */ -#* *##if ($operation.exceptionsPresent) - $visibility abstract $returnType $signature - throws $operation.exceptionList; -#* *##else - $visibility abstract $returnType $signature; -#* *##end - -#* *##end -#**##end -#end } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-06 02:46:43
|
User: vancek Date: 06/02/05 18:46:38 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: removed accessType for @MappedSuperclass (formerly EmbeddableSuperclass) annotation, renamed @EntityListener to @EntityListeners, added @Transient annotation to entity methods Revision Changes Path 1.14 +4 -5 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.13 retrieving revision 1.14 diff -u -w -r1.13 -r1.14 --- Entity.vsl 1 Feb 2006 08:36:25 -0000 1.13 +++ Entity.vsl 6 Feb 2006 02:46:38 -0000 1.14 @@ -16,12 +16,10 @@ * */ - -...@ja...rsistence.Entity#if ($entity.accessType)(access = javax.persistence.AccessType.${entity.accessType})#end - +...@ja...rsistence.Entity @javax.persistence.Table(name = "${entity.tableName}") #if ($entity.listenerEnabled) -...@ja...rsistence.EntityListener(${entity.fullyQualifiedEntityListenerName}.class) +...@ja...rsistence.EntityListeners({${entity.fullyQualifiedEntityListenerName}.class}) #end public#if ($entity.abstract) abstract#end class ${entity.entityName} extends ${entity.fullyQualifiedEntityEmbeddableName} @@ -108,6 +106,7 @@ /** $operation.getDocumentation(" * ") */ + @javax.persistence.Transient $visibility #if ($operation.static)static#end $returnType $signature #* *##if ($operation.exceptionsPresent) throws $operation.exceptionList |
From: Vance K. <va...@us...> - 2006-02-06 02:21:23
|
User: vancek Date: 06/02/05 18:21:15 Modified: andromda-ejb3/src/main/resources/templates/ejb3 ejb-jar.xml.vsl Log: removed DOCTYPE element and added version="3.0" to ejb-jar element Revision Changes Path 1.6 +3 -2 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/ejb-jar.xml.vsl Index: ejb-jar.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/ejb-jar.xml.vsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- ejb-jar.xml.vsl 29 Jan 2006 01:46:40 -0000 1.5 +++ ejb-jar.xml.vsl 6 Feb 2006 02:21:15 -0000 1.6 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="${xmlEncoding}"?> +<!-- <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> - -<ejb-jar> +--> +<ejb-jar version="3.0"> <description><![CDATA[No Description.]]></description> <display-name>Generated by AndroMDA EJB3 Cartridge</display-name> |
From: Vance K. <va...@us...> - 2006-02-01 08:44:38
|
User: vancek Date: 06/02/01 00:44:33 Modified: andromda-ejb3 pom.xml Log: added maven-site-plugin for site generation Revision Changes Path 1.2 +6 -0 cartridges/andromda-ejb3/pom.xml Index: pom.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/pom.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- pom.xml 28 Dec 2005 00:32:56 -0000 1.1 +++ pom.xml 1 Feb 2006 08:44:33 -0000 1.2 @@ -35,6 +35,12 @@ </dependency> </dependencies> </plugin> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <configuration> + <locales>en</locales> + </configuration> + </plugin> </plugins> </build> <properties> |
From: Vance K. <va...@us...> - 2006-02-01 08:43:30
|
User: vancek Date: 06/02/01 00:43:25 Modified: andromda-ejb3/src/main/uml EJB3MetafacadeModel.xml.zip Log: fixed comments for some attributes Revision Changes Path 1.13 +136 -147 cartridges/andromda-ejb3/src/main/uml/EJB3MetafacadeModel.xml.zip <<Binary file>> |
From: Vance K. <va...@us...> - 2006-02-01 08:42:31
|
User: vancek Date: 06/02/01 00:42:26 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityFacadeLogicImpl.java Log: fixed isFinderFindAllExists to detec findAll finder without args Revision Changes Path 1.11 +2 -3 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.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- EJB3EntityFacadeLogicImpl.java 31 Jan 2006 15:26:01 -0000 1.10 +++ EJB3EntityFacadeLogicImpl.java 1 Feb 2006 08:42:26 -0000 1.11 @@ -978,11 +978,10 @@ for (final Iterator iter = this.getQueryOperations().iterator(); iter.hasNext();) { final OperationFacade operation = (OperationFacade)iter.next(); - if (operation.getName().equalsIgnoreCase("findAll")) + if (StringUtils.trimToEmpty(operation.getName()).equalsIgnoreCase("findAll")) { // Check for no finder arguments - final Collection parameters = operation.getParameters(); - if (parameters.size() == 0) + if (operation.getArguments().size() == 0) { finderExists = true; break; |
From: Vance K. <va...@us...> - 2006-02-01 08:41:40
|
User: vancek Date: 06/02/01 00:41:34 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3MetafacadeUtils.java Log: fixed comment Revision Changes Path 1.5 +2 -2 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MetafacadeUtils.java Index: EJB3MetafacadeUtils.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3MetafacadeUtils.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- EJB3MetafacadeUtils.java 25 Jan 2006 03:02:41 -0000 1.4 +++ EJB3MetafacadeUtils.java 1 Feb 2006 08:41:34 -0000 1.5 @@ -160,8 +160,8 @@ } /** - * Gets all instance attributes including those instance attributes belonging to the <code>classifier</code> and any - * inherited ones. + * Gets all instance attributes including those instance attributes belonging to the + * <code>classifier</code> and any inherited ones. * * @param classifier the ClassifierFacade from which to retrieve the instance attributes. * @return the list of all instance attributes. |
From: Vance K. <va...@us...> - 2006-02-01 08:41:10
|
User: vancek Date: 06/02/01 00:41:04 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3AssociationEndFacadeLogicImpl.java Log: getFetchType now checked for compositionDefinesEagerLoading if no fetch type tagged value exists. Revision Changes Path 1.6 +36 -16 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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- EJB3AssociationEndFacadeLogicImpl.java 28 Jan 2006 02:57:44 -0000 1.5 +++ EJB3AssociationEndFacadeLogicImpl.java 1 Feb 2006 08:41:04 -0000 1.6 @@ -139,6 +139,12 @@ collectionTypes.add(COLLECTION_TYPE_COLLECTION); } + /** + * Stores the property indicating whether or not composition should define + * the eager loading strategy and aggregation define lazy loading strategy. + */ + private static final String COMPOSITION_DEFINES_EAGER_LOADING = "compositionDefinesEagerLoading"; + // ---------------- constructor ------------------------------- public EJB3AssociationEndFacadeLogicImpl (Object metaObject, String context) @@ -246,14 +252,6 @@ /** * @see org.andromda.cartridges.ejb3.metafacades.EJB3AssociationEndFacade#getFetchType() - * - * This method is always called on the target association end. - * If a fetch type tagged value is not found on the target end, then compare the association - * relationship from the source end to indicate the default fetch types. - * <ul> - * <li>One-2-Many and Many-2-Many defaults to LAZY loading</li> - * <li>Many-2-One and One-2-One default to EAGER loading</li> - * </ul> */ protected String handleGetFetchType() { @@ -261,6 +259,29 @@ if (StringUtils.isBlank(fetchType)) { + // check whether or not composition defines eager loading is turned on + boolean compositionDefinesEagerLoading = + Boolean.valueOf(String.valueOf(this.getConfiguredProperty(COMPOSITION_DEFINES_EAGER_LOADING))) + .booleanValue(); + + if (compositionDefinesEagerLoading) + { + if (this.getOtherEnd().isComposition()) + { + fetchType = EJB3Globals.FETCH_TYPE_EAGER; + } + else if (this.getOtherEnd().isAggregation()) + { + fetchType = EJB3Globals.FETCH_TYPE_LAZY; + } + } + } + + /** + * Go for defaults if blank + */ + if (StringUtils.isBlank(fetchType)) + { if (this.getOtherEnd().isOne2Many() || this.getOtherEnd().isMany2Many()) { fetchType = EJB3Globals.FETCH_TYPE_LAZY; @@ -270,7 +291,6 @@ fetchType = EJB3Globals.FETCH_TYPE_EAGER; } } - return fetchType; } |
From: Vance K. <va...@us...> - 2006-02-01 08:39:50
|
User: vancek Date: 06/02/01 00:39:45 Modified: andromda-ejb3/src/main/resources/META-INF/andromda namespace.xml metafacades.xml Log: added compositionDefinesEgagerLoading propery/namespace Revision Changes Path 1.11 +7 -0 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.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- namespace.xml 28 Jan 2006 03:10:37 -0000 1.10 +++ namespace.xml 1 Feb 2006 08:39:45 -0000 1.11 @@ -615,6 +615,13 @@ Used to define the default mapping for EJB3 collections. </documentation> </property> + <property name="compositionDefinesEagerLoading"> + <default>true</default> + <documentation> + Allows you to turn on/off whether or not composite associations will define eager loading + and aggregate associations define lazy loading. + </documentation> + </property> <property name="securityRealm" required="false"> <documentation> Specifies the security domain to use 1.10 +38 -37 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.9 retrieving revision 1.10 diff -u -w -r1.9 -r1.10 --- metafacades.xml 28 Jan 2006 03:04:40 -0000 1.9 +++ metafacades.xml 1 Feb 2006 08:39:45 -0000 1.10 @@ -19,6 +19,7 @@ <property reference="persistenceContextUnitName" /> <property reference="securityRealm" /> <property reference="allowDefaultServiceException"/> + <property reference="compositionDefinesEagerLoading"/> <!-- Entity EJB Metafacades --> <metafacade class="org.andromda.cartridges.ejb3.metafacades.EJB3OperationFacadeLogicImpl"> <mapping> |
From: Vance K. <va...@us...> - 2006-02-01 08:38:52
|
User: vancek Date: 06/02/01 00:38:44 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: when defining attributes use allInstanceAttributes, fixed comments for constants, added mappedBy property for ManyToMany annotation, if method is modelled as classifier(static) do not declare it here. Revision Changes Path 1.13 +17 -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.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- EntityEmbeddable.vsl 31 Jan 2006 15:17:57 -0000 1.12 +++ EntityEmbeddable.vsl 1 Feb 2006 08:38:44 -0000 1.13 @@ -82,7 +82,7 @@ public static final $constant.type.fullyQualifiedName $constant.name = $constant.defaultValue; #**##end #end -#set ($attributes = $entity.attributes) +#set ($attributes = $entity.allInstanceAttributes) #if (!$attributes.empty) // ----------- Attribute Definitions ------------ @@ -214,7 +214,7 @@ /** * Get the <code>$constant.name</code> constant $constant.getDocumentation(" * ") - * + */ $constant.visibility $constant.type.fullyQualifiedName ${constant.getterName}() { return $constant.name; @@ -262,7 +262,7 @@ // -------- Attribute Accessors ---------- -#**##foreach ($attribute in $entity.attributes) +#**##foreach ($attribute in $attributes) ## Only include accessors for identifier attributes if entity does not have a composite primary key #* *##if ($entity.compositePrimaryKeyPresent && $attribute.identifier) #* *##set ($doAttributeAccessors = false) @@ -439,7 +439,7 @@ * @return $target.getterSetterTypeName */ #* *##set ($argExists = false) - @javax.persistence.ManyToMany(#if ($target.cascadeType)cascade = {${target.cascadeType}}#set ($argExists = true)#end#if ($target.eager)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.EAGER#end) + @javax.persistence.ManyToMany(#if ($target.cascadeType)cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.eager)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.EAGER#end) ## Use Aggregation and Composition to determine owning side #* *##if(($associationEnd.owning) && ${associationEnd.association.tableName}) @javax.persistence.JoinTable(table = @javax.persistence.Table(name = "${associationEnd.association.tableName}")) @@ -579,9 +579,13 @@ #set ($businessOperations = $entity.businessOperations) #if (!$businessOperations.empty) - // --------------- Business Methods ----------------- + // --------------- Entity Methods ----------------- +## +## Method with a static modifier will be defined in the inheriting subclass +## #**##foreach ($operation in $businessOperations) +#* *##if (!$operation.static) #* *##set ($signature = $operation.signature) #* *##set ($visibility = $operation.visibility.toString()) #* *##set ($returnType = $operation.returnType.fullyQualifiedName) @@ -594,6 +598,8 @@ #* *##else $visibility abstract $returnType $signature; #* *##end + +#* *##end #**##end #end } \ No newline at end of file |
From: Vance K. <va...@us...> - 2006-02-01 08:36:32
|
User: vancek Date: 06/02/01 00:36:25 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: fixed entity method declaration Revision Changes Path 1.13 +9 -16 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.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- Entity.vsl 31 Jan 2006 15:15:58 -0000 1.12 +++ Entity.vsl 1 Feb 2006 08:36:25 -0000 1.13 @@ -99,7 +99,7 @@ #set ($operations = $entity.businessOperations) #if (!$operations.empty) - // ------------------ Methods -------------------- + // -------------- Entity Methods ----------------- #**##foreach ($operation in $operations) #* *##set ($signature = $operation.signature) @@ -108,17 +108,10 @@ /** $operation.getDocumentation(" * ") */ + $visibility #if ($operation.static)static#end $returnType $signature #* *##if ($operation.exceptionsPresent) - $visibility $returnType $signature throws $operation.exceptionList - { - // TODO put your implementation here. -#* *##if ($operation.returnTypePresent) - return $operation.returnType.javaNullString; #* *##end - } -#* *##else - $visibility $returnType $signature { // TODO put your implementation here. #* *##if ($operation.returnTypePresent) @@ -127,7 +120,7 @@ throw new java.lang.UnsupportedOperationException("${entity.fullyQualifiedName}.${operation.signature} Not implemented!"); #* *##end } -#* *##end + #**##end #end } \ No newline at end of file |