From c60d8e2dde272d0c3d6485ecc90e27090fea095a Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 25 Jun 2014 21:49:09 +0000 Subject: [PATCH] A bunch of Javadoc fixes. --- .../com/samskivert/depot/Transformers.java | 11 +++++------ .../samskivert/depot/annotation/Index.java | 19 +++++++++++-------- .../depot/annotation/Transform.java | 13 +++++++------ .../com/samskivert/depot/clause/Distinct.java | 5 ++--- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/samskivert/depot/Transformers.java b/src/main/java/com/samskivert/depot/Transformers.java index 4e4ada4..9509644 100644 --- a/src/main/java/com/samskivert/depot/Transformers.java +++ b/src/main/java/com/samskivert/depot/Transformers.java @@ -104,10 +104,10 @@ public class Transformers } /** - * Combines the contents of a List/Set/Collection/Iterable column into a single String, - * terminating each String element with a newline. Null-tolerant. - * A backslash ('\') in Strings will be prefixed by another backslash, newlines will be - * encoded as "\n", and null elements will be encoded as "\0" (but not terminated by a newline). + * Combines the contents of a {@code List/Set/Collection/Iterable} column into a single + * String, terminating each String element with a newline. Null-tolerant. A backslash ('\') in + * Strings will be prefixed by another backslash, newlines will be encoded as "\n", and null + * elements will be encoded as "\0" (but not terminated by a newline). */ public static class StringIterable extends StringBase> { @@ -123,8 +123,7 @@ public class Transformers } /** - * A Transformer for anything that is an Iterable. - * Often used for Enum sets. + * A Transformer for anything that is an {@code Iterable}. Often used for Enum sets. */ public static class EnumIterable> extends StringBase> { diff --git a/src/main/java/com/samskivert/depot/annotation/Index.java b/src/main/java/com/samskivert/depot/annotation/Index.java index 8acc35f..bd8a91d 100644 --- a/src/main/java/com/samskivert/depot/annotation/Index.java +++ b/src/main/java/com/samskivert/depot/annotation/Index.java @@ -22,15 +22,18 @@ public @interface Index *

If this annotation is on a field, an index is created for all fields annotated with this * name in the order of the fields in the class.

* - *

If this annotation is on a {@code PersistentRecord} class, a static method must be - * defined in that class that provides the index configuration. The method must match one of - * the following two signatures: - *

+     * 

If this annotation is on a {@code PersistentRecord} class, a static method must be defined + * in that class that provides the index configuration. The method must match one of the + * following two signatures:

+ * + *
{@code
      * public static ColumnExp[] indexName ()
-     * public static List<Tuple<SQLExpression, OrderBy.Order>> indexName ()
-     * 
- * The first form will result in a simple multicolum index being created with the supplied - * columns. The second will create a function index using the supplied {@code SQLExpression}s.

+ * public static List> indexName () + * }
+ * + *

The first form will result in a simple multicolum index being created with the supplied + * columns. The second will create a function index using the supplied {@code + * SQLExpression}s.

*/ String name () default ""; diff --git a/src/main/java/com/samskivert/depot/annotation/Transform.java b/src/main/java/com/samskivert/depot/annotation/Transform.java index bcb2410..7a4465b 100644 --- a/src/main/java/com/samskivert/depot/annotation/Transform.java +++ b/src/main/java/com/samskivert/depot/annotation/Transform.java @@ -19,7 +19,7 @@ import com.samskivert.depot.Transformer; * saving to the database and after loading from the database. * *

For example, one may choose to transform a particular persistent record field into a type - * supported directly by Depot: + * supported directly by Depot:

* *
  * public class MyRecord extends PersistentRecord {
@@ -28,17 +28,18 @@ import com.samskivert.depot.Transformer;
  * }
  * 
* - * or one may opt to specify a transformation for all fields that contain a value of a particular - * type: + *

or one may opt to specify a transformation for all fields that contain a value of a particular + * type:

* *
  * @Transform(ByteEnumTransformer.class)
  * public interface ByteEnum { ... }
  * 
* - * Note that because Depot honors @Transform annotations on any interface implemented by a type, or - * on a type's superclass, it is possible that conflicting transformations may be specified. In - * this case, Depot will fail with a runtime error during initialization, to indicate the problem. + *

Note that because Depot honors @Transform annotations on any interface implemented by a type, + * or on a type's superclass, it is possible that conflicting transformations may be specified. In + * this case, Depot will fail with a runtime error during initialization, to indicate the + * problem.

* * @see Transformer */ diff --git a/src/main/java/com/samskivert/depot/clause/Distinct.java b/src/main/java/com/samskivert/depot/clause/Distinct.java index 7041104..5b1308c 100644 --- a/src/main/java/com/samskivert/depot/clause/Distinct.java +++ b/src/main/java/com/samskivert/depot/clause/Distinct.java @@ -11,9 +11,8 @@ import com.samskivert.depot.expression.SQLExpression; import com.samskivert.depot.impl.FragmentVisitor; /** - * Represents a DISTINCT [ON ] clause. - * - * Note: You almost certainly only ever want to use this in a SELECT statement. + * Represents a {@code DISTINCT [ON ]} clause. Note: You almost certainly only ever want to use + * this in a SELECT statement. */ public class Distinct implements QueryClause {