User: vharcq
Date: 02/07/14 14:30:41
Modified: modules/ejb/src/xdoclet/modules/ejb/entity
ValueObjectTagsHandler.java
Log:
[ 580678 ] value objects of type Set
Revision Changes Path
1.9 +34 -4
xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/ValueObjectTagsHandler.java
Index: ValueObjectTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/ValueObjectTagsHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- ValueObjectTagsHandler.java 25 Jun 2002 14:16:15 -0000 1.8
+++ ValueObjectTagsHandler.java 14 Jul 2002 21:30:40 -0000 1.9
@@ -31,7 +31,7 @@
* @author Vincent Harcq ([EMAIL PROTECTED])
* @created 13. juni 2002
* @xdoclet.taghandler namespace="EjbValueObj"
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class ValueObjectTagsHandler
extends EjbTagsHandler
@@ -389,6 +389,32 @@
}
/**
+ * Type of the constructor for aggregates or compositions.
+ *
+ * @return Type of the constructor for aggregates or
compositions.
+ * @exception XDocletException
+ */
+ public String concreteCollectionType() throws XDocletException
+ {
+ String currentReturnType =
getCurrentMethod().getReturnType().getQualifiedName();
+ String res = null;
+
+ if (currentReturnType.equals("java.util.Collection")) {
+ res = "java.util.ArrayList";
+ }
+ else if (currentReturnType.equals("java.util.Set")) {
+ res = "java.util.HashSet";
+ }
+ else {
+ throw new XDocletException("Invalid return type (" +
+ currentReturnType +
+ " on aggregate or composition.");
+ }
+ return res;
+ }
+
+
+ /**
* Returns the data-object class name highest in the hierarchy of derived
beans. Because of possible inheritance
* between entity bean, the type of the generated getData method must be the
one of the most super class of the
* current entity bean. The current Data class must extend the corresponding
super Data class.
@@ -647,15 +673,19 @@
}
if (aggreg != null) {
+ String currentReturnType =
getCurrentMethod().getReturnType().getQualifiedName();
+
if (log.isDebugEnabled()) {
- log.debug("********* METHOD=" +
getCurrentMethod().getName() + " " +
getCurrentMethod().getReturnType().getQualifiedName());
+ log.debug("********* METHOD=" +
getCurrentMethod().getName() + " " + currentReturnType);
}
// Store that we found this field so we don't add
it twice
foundFields.put(getCurrentMethod().getName(),
getCurrentMethod().getName());
- if
(getCurrentMethod().getReturnType().getQualifiedName().equals("java.util.Collection"))
{
+ if
(currentReturnType.equals("java.util.Collection") ||
+ currentReturnType.equals("java.util.Set")) {
+
if (log.isDebugEnabled()) {
- log.debug("********* Type Collection");
+ log.debug("********* Type Collection or
Set");
}
currentAggregateType = aggreg;
currentAggregateName = aggregName;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel