Show
Ignore:
Timestamp:
07/10/08 10:24:52 (4 years ago)
Author:
amandel
Message:

Enhanced generated java doc for the generated java
type classes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/xml/xsl/libcommon.xsl

    r1056 r1076  
    584584 
    585585   /** 
    586     * Returns <code>true</code> if this <code><xsl:value-of select="$classname"/></code> 
    587     * is equal to <tt>object</tt>. 
     586    * Returns &lt;code>true&lt;/code> if this &lt;code><xsl:value-of select="$classname"/>&lt;/code> 
     587    * is equal to &lt;tt>object&lt;/tt>. 
    588588    * @param object the object to compare to. 
    589     * @return <code>true</code> if this <code><xsl:value-of select="$classname"/></code> 
    590     *       is equal to <tt>object</tt>. 
     589    * @return &lt;code>true&lt;/code> if this &lt;code><xsl:value-of select="$classname"/>&lt;/code> 
     590    *       is equal to &lt;tt>object&lt;/tt>. 
    591591    */ 
    592592   public boolean equals (Object object) 
     
    895895{ 
    896896   /** 
    897     * The name of this type. 
     897    * <xsl:value-of select="$classname"/> - the name of this type as string constant. 
    898898    */ 
    899899   public static final String TYPE_NAME = "<xsl:value-of select="$classname"/>"; 
    900900 
    901    /** The minimal length of <xsl:value-of select="$classname"/>. */ 
     901   /** The minimal length of <xsl:value-of select="$classname"/> (<xsl:value-of select="$min-length"/>). */ 
    902902   public static final int MIN_LENGTH = <xsl:value-of select="$min-length"/>; 
    903903 
    904    /** The maximal length of <xsl:value-of select="$classname"/>. */ 
     904   /** The maximal length of <xsl:value-of select="$classname"/> (<xsl:value-of select="$max-length"/>). */ 
    905905   public static final int MAX_LENGTH = <xsl:value-of select="$max-length"/>; 
    906906<xsl:if test="$regex"> 
     
    932932    * Creates a new instance of a <xsl:value-of select="$classname"/>. 
    933933    * 
    934     * @param str the <xsl:value-of select="$classname"/> as string representation 
    935     * @throws ArgumentMalformedException If the given string <code>str</code> 
     934    * @param str the <xsl:value-of select="$classname"/> as string representation. 
     935    * @throws ArgumentMalformedException If the given string &lt;code>str&lt;/code> 
    936936    *         violates the restriction of this type. 
    937     *         <xsl:value-of select="$classname"/>. 
    938937    */ 
    939938   private <xsl:value-of select="$classname"/> (final String str) 
     
    976975    * @param str The str representation of the <xsl:value-of select="$classname"/> to be returned. 
    977976    * @return The <xsl:value-of select="$classname"/> object represented by this str. 
    978     * @throws ArgumentMalformedException If the given string <code>str</code> 
     977    * @throws ArgumentMalformedException If the given string &lt;code>str&lt;/code> 
    979978    *         violates the restriction of this type. 
    980     *         <xsl:value-of select="$classname"/>. 
    981979    */ 
    982980   public static <xsl:value-of select="$classname"/> fromString (String str) 
     
    10401038      extends org.jcoderz.commons.util.StringUserTypeBase 
    10411039{ 
    1042    /** 
    1043     * Null or Empty constant 
    1044     */ 
     1040   /** <xsl:choose> 
     1041        <xsl:when 
     1042          test="$min-length = 0">Holds the empty string representation of the type.</xsl:when> 
     1043          <xsl:otherwise>Holds null as empty representation of this type.</xsl:otherwise> 
     1044      </xsl:choose> */ 
    10451045   private static final <xsl:value-of select="$type-classname"/> EMPTY_OR_NULL 
    10461046        = <xsl:choose><xsl:when test="$min-length = 0"> 
     
    10501050 
    10511051  /** 
    1052    * {@inheritDoc} 
     1052   * Creates a <xsl:value-of select="$type-classname"/> from its String 
     1053   * database representation. 
     1054   * @param value a string holding the database representation of the 
     1055   *    <xsl:value-of select="$type-classname"/>. 
     1056   * @return a <xsl:value-of select="$type-classname"/> representing the 
     1057   *    given string. 
     1058   * @see <xsl:value-of select="$type-classname"/>#fromString(String) 
    10531059   */ 
    10541060  public Object fromString(String value) 
     
    10571063  } 
    10581064 
    1059   /** 
    1060    * {@inheritDoc} 
    1061    */ 
     1065  /** <xsl:choose> 
     1066        <xsl:when 
     1067          test="$min-length = 0">@return the empty string as null representation of the type.</xsl:when> 
     1068          <xsl:otherwise>@return &lt;code>null&lt;/code> as null representation of the type.</xsl:otherwise> 
     1069      </xsl:choose> */ 
    10621070  public Object getEmptyOrNull() 
    10631071  { 
     
    10661074 
    10671075  /** 
    1068    * {@inheritDoc} 
     1076   * @return <xsl:value-of select="$type-classname"/>.class as the supported 
     1077   * class of this user type. 
    10691078   */ 
    10701079  public Class returnedClass() 
     
    11191128{ 
    11201129   /** 
    1121     * The name of this type. 
     1130    * <xsl:value-of select="$classname"/> - the name of this type as string constant. 
    11221131    */ 
    11231132   public static final String TYPE_NAME = "<xsl:value-of select="$classname"/>"; 
    11241133 
    11251134   /** 
    1126     * The minimum value of a <xsl:value-of select="$classname"/>. 
     1135    * The minimum value of a <xsl:value-of select="$classname"/> (<xsl:value-of select="$min-value"/>). 
    11271136    */ 
    11281137   public static final long MIN_VALUE = <xsl:value-of select="$min-value"/>; 
    11291138 
    11301139   /** 
    1131     * The maximum value of a <xsl:value-of select="$classname"/>. 
     1140    * The maximum value of a <xsl:value-of select="$classname"/> (<xsl:value-of select="$max-value"/>). 
    11321141    */ 
    11331142   public static final long MAX_VALUE = <xsl:value-of select="$max-value"/>; 
     
    11561165    * 
    11571166    * @param id the <xsl:value-of select="$classname"/> as long representation 
    1158     * @throws ArgumentMalformedException If the given long <code>id</code> 
     1167    * @throws ArgumentMalformedException If the given long &lt;code>id&lt;/code> 
    11591168    *         violates the restriction of the type 
    11601169    *         <xsl:value-of select="$classname"/>. 
    11611170    * @throws ArgumentMinValueViolationException If the value of the given 
    1162     *         long <code>id</code> is below <code>MIN_VALUE</code>. 
     1171    *         long &lt;code>id&lt;/code> is below {@link #MIN_VALUE}. 
    11631172    * @throws ArgumentMaxValueViolationException If the value of the given 
    1164     *         long <code>id</code> is above <code>MAX_VALUE</code>. 
     1173    *         long &lt;code>id&lt;/code> is above {@link #MAX_VALUE}. 
    11651174    */ 
    11661175   private <xsl:value-of select="$classname"/> (long id) 
     
    11851194    * @param id the long representation of the <xsl:value-of select="$classname"/> 
    11861195    * @return the <xsl:value-of select="$classname"/> object represented by the given long 
    1187     * @throws ArgumentMalformedException If the given long <code>id</code> 
     1196    * @throws ArgumentMalformedException If the given long &lt;code>id&lt;/code> 
    11881197    *         violates the restriction of the type 
    11891198    *         <xsl:value-of select="$classname"/>. 
    11901199    * @throws ArgumentMinValueViolationException If the value of the given 
    1191     *         long <code>id</code> is below <code>MIN_VALUE</code>. 
     1200    *         long &lt;code>id&lt;/code> is below {@link #MIN_VALUE}. 
    11921201    * @throws ArgumentMaxValueViolationException If the value of the given 
    1193     *         long <code>id</code> is above <code>MAX_VALUE</code>. 
     1202    *         long &lt;code>id&lt;/code> is above {@link #MAX_VALUE}. 
    11941203    */ 
    11951204   public static <xsl:value-of select="$classname"/> fromLong (long id) 
     
    12031212    * @param s the string representation of the <xsl:value-of select="$classname"/> 
    12041213    * @return the <xsl:value-of select="$classname"/> object represented by the given string 
    1205     * @throws ArgumentMalformedException If the given string <code>s</code> 
     1214    * @throws ArgumentMalformedException If the given string &lt;code>s&lt;/code> 
    12061215    *         violates the restriction of the type 
    12071216    *         <xsl:value-of select="$classname"/>. 
    1208     * @throws ArgumentMinValueViolationException If the long value of the given 
    1209     *         string <code>s</code> is below <code>MIN_VALUE</code>. 
    1210     * @throws ArgumentMaxValueViolationException If the long value of the given 
    1211     *         string <code>s</code> is above <code>MAX_VALUE</code>. 
     1217    * @throws ArgumentMinValueViolationException If the value of the given 
     1218    *         long &lt;code>id&lt;/code> is below {@link #MIN_VALUE}. 
     1219    * @throws ArgumentMaxValueViolationException If the value of the given 
     1220    *         long &lt;code>id&lt;/code> is above {@link #MAX_VALUE}. 
    12121221    */ 
    12131222   public static <xsl:value-of select="$classname"/> fromString (String s) 
     
    12311240    * @param id the Long representation of the <xsl:value-of select="$classname"/> 
    12321241    * @return the <xsl:value-of select="$classname"/> object represented by the given Long 
    1233     * @throws ArgumentMalformedException If the given Long <code>id</code> 
     1242    * @throws ArgumentMalformedException If the given Long &lt;code>id&lt;/code> 
    12341243    *         is null or violates the restriction of the type 
    12351244    *         <xsl:value-of select="$classname"/>. 
    12361245    * @throws ArgumentMinValueViolationException If the value of the given 
    1237     *         long <code>id</code> is below <code>MIN_VALUE</code>. 
     1246    *         long &lt;code>id&lt;/code> is below {@link #MIN_VALUE}. 
    12381247    * @throws ArgumentMaxValueViolationException If the value of the given 
    1239     *         long <code>id</code> is above <code>MAX_VALUE</code>. 
     1248    *         long &lt;code>id&lt;/code> is above {@link #MAX_VALUE}. 
    12401249    */ 
    12411250   public static <xsl:value-of select="$classname"/> fromLong (Long id) 
     
    13221331{ 
    13231332  /** 
    1324    * {@inheritDoc} 
     1333   * Creates a <xsl:value-of select="$type-classname"/> from its numeric 
     1334   * int database representation. 
     1335   * @param value a int holding the database representation of the 
     1336   *    <xsl:value-of select="$type-classname"/>. 
     1337   * @return a <xsl:value-of select="$type-classname"/> representing the 
     1338   *    given int. 
     1339   * @see <xsl:value-of select="$type-classname"/>#fromInt(int) 
    13251340   */ 
    13261341  public Object fromInt(int value) 
     
    13301345 
    13311346  /** 
    1332    * {@inheritDoc} 
     1347   * Converts the <xsl:value-of select="$type-classname"/> to its numeric 
     1348   * int database representation. 
     1349   * @param value the <xsl:value-of select="$type-classname"/> to be 
     1350   *    converted. 
     1351   * @return a int representing the 
     1352   *    given <xsl:value-of select="$type-classname"/>. 
     1353   * @see <xsl:value-of select="$type-classname"/>#toInt() 
    13331354   */ 
    13341355  public int toInt(Object value) 
     
    13381359 
    13391360  /** 
    1340    * {@inheritDoc} 
     1361   * @return <xsl:value-of select="$type-classname"/>.class as the supported 
     1362   * class of this user type. 
    13411363   */ 
    13421364  public Class returnedClass() 
     
    13661388{ 
    13671389  /** 
    1368    * {@inheritDoc} 
     1390   * Creates a <xsl:value-of select="$type-classname"/> from its numeric 
     1391   * long database representation. 
     1392   * @param value a long holding the database representation of the 
     1393   *    <xsl:value-of select="$type-classname"/>. 
     1394   * @return a <xsl:value-of select="$type-classname"/> representing the 
     1395   *    given long. 
     1396   * @see <xsl:value-of select="$type-classname"/>#fromLong(long) 
    13691397   */ 
    13701398  public Object fromLong(long value) 
     
    13741402 
    13751403  /** 
    1376    * {@inheritDoc} 
     1404   * Converts the <xsl:value-of select="$type-classname"/> to its numeric 
     1405   * long database representation. 
     1406   * @param value the <xsl:value-of select="$type-classname"/> to be 
     1407   *    converted. 
     1408   * @return a long representing the 
     1409   *    given <xsl:value-of select="$type-classname"/>. 
     1410   * @see <xsl:value-of select="$type-classname"/>#toLong() 
    13771411   */ 
    13781412  public long toLong(Object value) 
     
    13821416 
    13831417  /** 
    1384    * {@inheritDoc} 
     1418   * @return <xsl:value-of select="$type-classname"/>.class as the supported 
     1419   * class of this user type. 
    13851420   */ 
    13861421  public Class returnedClass() 
     
    14601495    * 
    14611496    * @param str the <xsl:value-of select="$classname"/> as string representation 
    1462     * @throws ArgumentMalformedException If the given string <code>str</code> 
     1497    * @throws ArgumentMalformedException If the given string &lt;code>str&lt;/code> 
    14631498    *         does not conform to the Simpay Scheme representation of the 
    14641499    *         <xsl:value-of select="$classname"/>. 
     
    14841519    * @param str The str representation of the <xsl:value-of select="$classname"/> to be returned. 
    14851520    * @return The <xsl:value-of select="$classname"/> object represented by this str. 
    1486     * @throws ArgumentMalformedException If the given string <code>s</code> 
     1521    * @throws ArgumentMalformedException If the given string &lt;code>s&lt;/code> 
    14871522    *         does not conform to the Simpay Interface representation of 
    14881523    *         <xsl:value-of select="$classname"/>. 
     
    16251660 * Fix point numeric to represent <xsl:value-of select="$classname"/>. 
    16261661 * 
    1627  * Permitted values range from <xsl:value-of select="$MIN_VALUE"/> to 
     1662 * &lt;p>Permitted values range from <xsl:value-of select="$MIN_VALUE"/> to 
    16281663 * <xsl:value-of select="$MAX_VALUE"/>. It the number of decimal 
    16291664 * digits supported is <xsl:value-of select="$fraction-digits"/> and 
    1630  * the total number of digits is <xsl:value-of select="$total-digits"/> 
     1665 * the total number of digits is <xsl:value-of select="$total-digits"/>&lt;/p> 
    16311666 * 
    16321667 * Instances of this class are immutable. 
     
    16391674{ 
    16401675    /** 
    1641      * The name of this type. 
     1676     * <xsl:value-of select="$classname"/> - the name of this type as String constant. 
    16421677     */ 
    16431678    public static final String TYPE_NAME = "<xsl:value-of select="$classname"/>"; 
    16441679 
    1645     /** 
    1646      * The name of this type. 
    1647      */ 
     1680    /** The preffered database representation of this type. */ 
    16481681    public static final String PREFERED_DATABASE_TYPE 
    16491682        = "NUMBER(<xsl:value-of select="$total-digits"/>,<xsl:value-of select="$fraction-digits"/>)"; 
    16501683 
    1651     /** The minimal unscaled value of <xsl:value-of select="$classname"/>. */ 
     1684    /** The minimal unscaled value of <xsl:value-of select="$classname"/> ({@value}). */ 
    16521685    public static final <xsl:value-of select="$backing-type"/> MIN_VALUE_UNSCALED 
    16531686        = <xsl:call-template name="power10precise"> 
     
    16561689        </xsl:call-template><xsl:value-of select="$backing-char"/>; 
    16571690 
    1658     /** The maximal value of <xsl:value-of select="$classname"/>. */ 
     1691    /** The maximal value of <xsl:value-of select="$classname"/> ({@value}). */ 
    16591692    public static final <xsl:value-of select="$backing-type"/> MAX_VALUE_UNSCALED 
    16601693        = <xsl:call-template name="power10precise"> 
     
    16631696        </xsl:call-template><xsl:value-of select="$backing-char"/>; 
    16641697 
    1665     /** The number of fraction digits. */ 
     1698    /** The number of fraction digits (<xsl:value-of select="$fraction-digits"/>). */ 
    16661699    public static final int FRACTION_DIGITS 
    16671700        = <xsl:value-of select="$fraction-digits"/>; 
    16681701 
    1669     /** The number of fraction digits. */ 
     1702    /** The number of fraction digits (<xsl:value-of select="$fraction-digits"/>). */ 
    16701703    public static final int SCALE 
    16711704        = FRACTION_DIGITS; 
    16721705 
    1673     /** The number of fraction digits. */ 
     1706    /** The scale (<xsl:value-of select="$DECIMAL_SCALE"/>). */ 
    16741707    public static final <xsl:value-of select="$backing-type"/> DECIMAL_SCALE 
    16751708        = <xsl:value-of select="$DECIMAL_SCALE"/>; 
    16761709 
    1677     /** The minimal scaled value of <xsl:value-of select="$classname"/>. */ 
     1710    /** The minimal scaled value of <xsl:value-of select="$classname"/> ({@value}). */ 
    16781711    public static final <xsl:value-of select="$backing-type"/> MIN_VALUE_SCALED 
    16791712        = MIN_VALUE_UNSCALED / DECIMAL_SCALE; 
    16801713 
    1681     /** The maximal value of <xsl:value-of select="$classname"/>. */ 
     1714    /** The maximal scaled value of <xsl:value-of select="$classname"/> ({@value}). */ 
    16821715    public static final <xsl:value-of select="$backing-type"/> MAX_VALUE_SCALED 
    16831716        = MAX_VALUE_UNSCALED / DECIMAL_SCALE; 
    16841717 
    1685     /** The number of fraction digits as integer.  */ 
     1718    /** The number of fraction digits as integer (<xsl:value-of select="$fraction-digits"/>).  */ 
    16861719    public static final Integer FRACTION_DIGITS_AS_INTEGER 
    16871720        = new Integer(FRACTION_DIGITS); 
    16881721 
    1689     /** The maximum number of total digits. */ 
     1722    /** The maximum number of digits (<xsl:value-of select="$total-digits"/>). */ 
    16901723    public static final int TOTAL_DIGITS 
    16911724        = <xsl:value-of select="$total-digits"/>; 
    16921725 
    1693     /** The number of fraction digits as integer.  */ 
     1726    /** The maximum number of digits as Integer (<xsl:value-of select="$total-digits"/>).  */ 
    16941727    public static final Integer TOTAL_DIGITS_AS_INTEGER 
    16951728        = new Integer(TOTAL_DIGITS); 
    16961729 
    1697     /** The minimal value of <xsl:value-of select="$classname"/>. */ 
     1730    /** The minimal value of <xsl:value-of select="$classname"/> (<xsl:value-of select="$MIN_VALUE"/>). */ 
    16981731    public static final <xsl:value-of select="$classname"/> MIN_VALUE 
    16991732        = new <xsl:value-of select="$classname"/>(MIN_VALUE_UNSCALED); 
    17001733 
    1701     /** The maximal value of <xsl:value-of select="$classname"/>. */ 
     1734    /** The maximal value of <xsl:value-of select="$classname"/> (<xsl:value-of select="$MAX_VALUE"/>). */ 
    17021735    public static final <xsl:value-of select="$classname"/> MAX_VALUE 
    17031736        = new <xsl:value-of select="$classname"/>(MAX_VALUE_UNSCALED); 
     
    19531986import java.math.BigDecimal; 
    19541987 
    1955  
    19561988/** 
    19571989 * Hibernate user type for the  <xsl:value-of select="$type-classname"/>. 
     
    19631995{ 
    19641996  /** 
    1965    * {@inheritDoc} 
     1997   * Creates a <xsl:value-of select="$type-classname"/> from its numeric 
     1998   * BigDecimal database representation. 
     1999   * @param value a BigDecimal holding the database representation of the 
     2000   *    <xsl:value-of select="$type-classname"/>. 
     2001   * @return a <xsl:value-of select="$type-classname"/> representing the 
     2002   *    given BigDecimal. 
     2003   * @see <xsl:value-of select="$type-classname"/>#valueOf(BigDecimal) 
    19662004   */ 
    19672005  public Object fromBigDecimal(BigDecimal value) 
     
    19712009 
    19722010  /** 
    1973    * {@inheritDoc} 
     2011   * Converts the <xsl:value-of select="$type-classname"/> to its numeric 
     2012   * BigDecimal database representation. 
     2013   * @param value the <xsl:value-of select="$type-classname"/> to be 
     2014   *    converted. 
     2015   * @return a BigDecimal representing the 
     2016   *    given <xsl:value-of select="$type-classname"/>. 
     2017   * @see <xsl:value-of select="$type-classname"/>#toBigDecimal() 
    19742018   */ 
    19752019  public BigDecimal toBigDecimal(Object value) 
     
    19792023 
    19802024  /** 
    1981    * {@inheritDoc} 
     2025   * @return <xsl:value-of select="$type-classname"/>.class as the supported class of this user type. 
    19822026   */ 
    19832027  public Class returnedClass()