User: vharcq
Date: 02/05/22 13:36:17
Modified: modules/ejb/src/xdoclet/modules/ejb/entity Tag:
MODULE_REFACTORING_BRANCH
PersistentTagsHandler.java
Log:
persistentField methods only takes fields from current class and do not look at
super classes. In cause : data/value objects toString and PK constructor
HashCOde should only takes fields of current object and also use hashcode of super
classes (I am not 100% sure but at least equals and hashcode should be equivalent)
Revision Changes Path
No revision
No revision
1.1.2.5 +77 -87
xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/PersistentTagsHandler.java
Index: PersistentTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/Attic/PersistentTagsHandler.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -w -r1.1.2.4 -r1.1.2.5
--- PersistentTagsHandler.java 12 May 2002 13:53:28 -0000 1.1.2.4
+++ PersistentTagsHandler.java 22 May 2002 20:36:17 -0000 1.1.2.5
@@ -27,14 +27,14 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 16, 2001
* @xdoclet:taghandler namespace="EjbPersistent"
- * @version $Revision: 1.1.2.4 $
+ * @version $Revision: 1.1.2.5 $
*/
public class PersistentTagsHandler extends CmpTagsHandler
{
/**
- * Returns true if method is a persistent field, false otherwise. Persistent
- * fields are getter methods marked with a ejb:persistent-field tag.
+ * Returns true if method is a persistent field, false otherwise. Persistent
fields are getter methods marked with a
+ * ejb:persistent-field tag.
*
* @param method Description of Parameter
* @return The PersistentField value
@@ -110,8 +110,8 @@
/**
- * Returns true if method is a primary key field, false otherwise. PK fields
- * are getter methods marked with a ejb:pk-field tag.
+ * Returns true if method is a primary key field, false otherwise. PK fields
are getter methods marked with a
+ * ejb:pk-field tag.
*
* @param method Description of Parameter
* @return The PkField value
@@ -135,8 +135,7 @@
}
/**
- * Gets the PersistentFieldMethod attribute of the PersistentTagsHandler
- * class
+ * Gets the PersistentFieldMethod attribute of the PersistentTagsHandler class
*
* @return The PersistentFieldMethod value
*/
@@ -147,20 +146,19 @@
/**
- * Returns comma-separated list of fields, excluding fields that have tags
- * of exclTag list, including fields that have tags of inclTag list. If
- * name_value_out is true, then the list is in fieldname="value" format.
- *
- * @param inclTag Fields that have at least of the tags of
- * this comma-separated list are used.
- * @param exclTag Fields that don't have all of the tags of
- * this comma-separated list are used.
- * @param type Type of return (0: comma separated list - 1:
- * field=value comma separated list - 2: getter comma sperated list)
+ * Returns comma-separated list of fields, excluding fields that have tags of
exclTag list, including fields that
+ * have tags of inclTag list. If name_value_out is true, then the list is in
fieldname="value" format.
+ *
+ * @param inclTag Fields that have at least of the tags of this
comma-separated list are used.
+ * @param exclTag Fields that don't have all of the tags of this
comma-separated list are used.
+ * @param type Type of return (0: comma separated list - 1:
field=value comma separated list - 2:
+ * getter comma sperated list)
* @param clazz Description of Parameter
* @param valueObject
* @return Description of the Returned Value
* @exception XDocletException
+ * @todo This method only takes the field of the current
class. I think it's ok. Any
+ * objection ?
*/
public static String fieldList(XClass clazz, String inclTag, String exclTag,
int type, String valueObject) throws XDocletException
{
@@ -169,7 +167,7 @@
String methodType = null;
String name = null;
- do {
+ //do {
XMethod[] methods = clazz.methods();
for (int j = 0; j < methods.length; j++) {
@@ -216,8 +214,8 @@
}
// Add super class info
- clazz = clazz.superclass();
- } while (clazz != null);
+ //clazz = clazz.superclass();
+ //} while (clazz != null);
return st.toString();
}
@@ -277,19 +275,17 @@
/**
- * Evaluates the body for each persistent field. If only-pk="true" then use
- * only primary keys, if not-pk="true" then use only persistent fields that
- * are not primary keys. By default use all regardless of being primary key
- * field or not.
+ * Evaluates the body for each persistent field. If only-pk="true" then use
only primary keys, if not-pk="true" then
+ * use only persistent fields that are not primary keys. By default use all
regardless of being primary key field or
+ * not.
*
* @param template The body of the block tag
* @param attributes Description of Parameter
* @exception XDocletException
* @see
#forAllPersistentMatchedFields(java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String)
* @doc:tag type="block"
- * @doc:param name="superclasses" optional="true"
- * values="true,false" description="Include persistent fields of
- * superclasses. True by default."
+ * @doc:param name="superclasses" optional="true"
values="true,false" description="Include
+ * persistent fields of superclasses. True by default."
*/
public void forAllPersistentFields(String template, Properties attributes)
throws XDocletException
{
@@ -311,12 +307,10 @@
/**
- * Returns a string containing comma-separated list of persistent fields
- * with their types.
+ * Returns a string containing comma-separated list of persistent fields with
their types.
*
* @param attributes
- * @return A string containing comma-separated list of
- * persistent fields without their types.
+ * @return A string containing comma-separated list of
persistent fields without their types.
* @exception XDocletException
* @see
#fieldList(xjavadoc.XClass,java.lang.String,java.lang.String,int,java.lang.String)
* @doc:tag type="content"
@@ -330,13 +324,12 @@
/**
- * Returns a string containing comma-separated list of persistent fields
- * without their types in fieldname="value" format.
+ * Returns a string containing comma-separated list of persistent fields
without their types in fieldname="value"
+ * format.
*
* @param attributes
- * @return A string containing comma-separated list of
- * persistent fields with their types like an ordinary method parameter
- * definition.
+ * @return A string containing comma-separated list of
persistent fields with their types like
+ * an ordinary method parameter definition.
* @exception XDocletException
* @see
#fieldList(xjavadoc.XClass,java.lang.String,java.lang.String,int,java.lang.String)
* @doc:tag type="content"
@@ -350,11 +343,9 @@
/**
- * Returns a string containing comma-separated list of persistent fields
- * with their types.
+ * Returns a string containing comma-separated list of persistent fields with
their types.
*
- * @return A string containing comma-separated list of
- * persistent fields without their types.
+ * @return A string containing comma-separated list of
persistent fields without their types.
* @exception XDocletException
* @see
#fieldList(xjavadoc.XClass,java.lang.String,java.lang.String,int,java.lang.String)
* @doc:tag type="content"
@@ -366,12 +357,11 @@
/**
- * Returns a string containing comma-separated list of persistent fields
- * without their types in fieldname="value" format.
+ * Returns a string containing comma-separated list of persistent fields
without their types in fieldname="value"
+ * format.
*
- * @return A string containing comma-separated list of
- * persistent fields with their types like an ordinary method parameter
- * definition.
+ * @return A string containing comma-separated list of
persistent fields with their types like
+ * an ordinary method parameter definition.
* @exception XDocletException
* @see
#fieldList(xjavadoc.XClass,java.lang.String,java.lang.String,int,java.lang.String)
* @doc:tag type="content"
@@ -402,8 +392,8 @@
/**
- * Generate only for all Persisted Fields matching a specific XTag or
- * Persisted fields that do not match a specific Tag
+ * Generate only for all Persisted Fields matching a specific XTag or Persisted
fields that do not match a specific
+ * Tag
*
* @param template The body of the block tag
* @param include_tags only fields having these tags
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel