Elffuss BraidHub

kikocis/java-driver public

Merge pull request #530 from datastax/javadocs

Minor improvements to release process and javadocs.
Changeset2a523e2ece4d9afc2b2b86f768809cb4814623ed95bcc9ce44e30878d51070c7
AuthorAlexandre Dutra <adutra@users.noreply.github.com> · 2015-11-25 17:44 +01:00
CommitterAlexandre Dutra <adutra@users.noreply.github.com> · 2015-11-25 17:44 +01:00
Parents73f53d4df4ec, ef959426af64

Browse the files at this changeset

22 files changed

modified driver-dist/pom.xml +18 −1
@@ -76,7 +76,24 @@
7676 </goals>
7777 <configuration>
7878 <includeDependencySources>true</includeDependencySources>
79- <additionalparam>${javadoc.opts}</additionalparam>
79+ <!-- optional dependencies from other modules (must be explicitly declared here in order to be correctly resolved) -->
80+ <additionalDependencies>
81+ <additionalDependency>
82+ <groupId>com.fasterxml.jackson.core</groupId>
83+ <artifactId>jackson-databind</artifactId>
84+ <version>${jackson.version}</version>
85+ </additionalDependency>
86+ <additionalDependency>
87+ <groupId>joda-time</groupId>
88+ <artifactId>joda-time</artifactId>
89+ <version>${joda.version}</version>
90+ </additionalDependency>
91+ <additionalDependency>
92+ <groupId>javax.json</groupId>
93+ <artifactId>javax.json-api</artifactId>
94+ <version>${jsr353-api.version}</version>
95+ </additionalDependency>
96+ </additionalDependencies>
8097 </configuration>
8198 </execution>
8299 </executions>
modified driver-extras/pom.xml +4 −4
@@ -52,21 +52,21 @@
5252 <dependency>
5353 <groupId>com.fasterxml.jackson.core</groupId>
5454 <artifactId>jackson-databind</artifactId>
55- <version>2.5.3</version>
55+ <version>${jackson.version}</version>
5656 <optional>true</optional>
5757 </dependency>
5858
5959 <dependency>
6060 <groupId>joda-time</groupId>
6161 <artifactId>joda-time</artifactId>
62- <version>2.8.1</version>
62+ <version>${joda.version}</version>
6363 <optional>true</optional>
6464 </dependency>
6565
6666 <dependency>
6767 <groupId>javax.json</groupId>
6868 <artifactId>javax.json-api</artifactId>
69- <version>1.0</version>
69+ <version>${jsr353-api.version}</version>
7070 <optional>true</optional>
7171 </dependency>
7272
@@ -116,7 +116,7 @@
116116 <dependency>
117117 <groupId>org.glassfish</groupId>
118118 <artifactId>javax.json</artifactId>
119- <version>1.0.4</version>
119+ <version>${jsr353-ri.version}</version>
120120 <scope>test</scope>
121121 </dependency>
122122
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/MappingCodec.java +3 −3
@@ -24,19 +24,19 @@
2424 import com.datastax.driver.core.exceptions.InvalidTypeException;
2525
2626 /**
27- * An abstract TypeCodec that maps a Java Pojo to another Java object
27+ * An abstract {@link TypeCodec} that maps a Java Pojo to another Java object
2828 * that can in turn be serialized into a CQL type.
2929 * This can serve as a base for libraries dealing with Pojo mappings.
3030 * <p>
3131 * This codec can be seen as a convenience base class for libraries
3232 * dealing with Pojo-to-Pojo mappings, but it comes
3333 * with a performance penalty: each Java object is serialized
34- * in two steps: first to an intermediary object, and then to a ByteBuffer,
34+ * in two steps: first to an intermediate object, and then to a {@link ByteBuffer},
3535 * which means that each serialization actually incurs in two potentially
3636 * expensive operations being carried.
3737 * <p>
3838 * If such operations are really expensive, and your mapping library is capable
39- * of serializing objects directly to ByteBuffers,
39+ * of serializing objects directly to {@link ByteBuffer}s,
4040 * consider writing your own codec instead of using this one.
4141 *
4242 * @param <O> The "outer" (user-facing) Java type
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/ParsingCodec.java +3 −3
@@ -24,18 +24,18 @@
2424 import com.datastax.driver.core.exceptions.InvalidTypeException;
2525
2626 /**
27- * An abstract TypeCodec that stores JAVA objects as serialized strings.
27+ * An abstract {@link TypeCodec} that stores JAVA objects as serialized strings.
2828 * This can serve as a base for codecs dealing with XML or JSON formats.
2929 * <p>
3030 * This codec can be seen as a convenience base class to help
3131 * implementing Java-to-XML or Java-to-JSON mappings, but it comes
3232 * with a performance penalty: each Java object is serialized
33- * in two steps: first to a String, and then to a ByteBuffer,
33+ * in two steps: first to a String, and then to a {@link ByteBuffer},
3434 * which means that each serialization actually incurs in two potentially
3535 * expensive operations being carried.
3636 * <p>
3737 * If you are using an XML or JSON library that supports writing Java objects
38- * directly to ByteBuffers, consider writing your own codec instead of
38+ * directly to {@link ByteBuffer}s, consider writing your own codec instead of
3939 * using this one.
4040 *
4141 * @param <T> The Java type this codec serializes from and deserializes to.
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/package-info.java +0 −35
@@ -18,40 +18,5 @@
1818 * This package contains a collection of convenience
1919 * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
2020 * serializing between CQL lists and Java arrays.
21- * <p>
22- * The codecs in this package provide the following mappings:
23- *
24- * <table summary="Supported Mappings">
25- * <tr>
26- * <th>Codec</th>
27- * <th>CQL type</th>
28- * <th>Java type</th>
29- * </tr>
30- * <tr>
31- * <td>{@link com.datastax.driver.extras.codecs.arrays.ObjectArrayCodec}</td>
32- * <td>{@code list<?>}</td>
33- * <td>{@code T[]}</td>
34- * </tr>
35- * <tr>
36- * <td>{@link com.datastax.driver.extras.codecs.arrays.IntArrayCodec}</td>
37- * <td>{@code list<int>}</td>
38- * <td>{@code int[]}</td>
39- * </tr>
40- * <tr>
41- * <td>{@link com.datastax.driver.extras.codecs.arrays.LongArrayCodec}</td>
42- * <td>{@code list<long>}</td>
43- * <td>{@code long[]}</td>
44- * </tr>
45- * <tr>
46- * <td>{@link com.datastax.driver.extras.codecs.arrays.FloatArrayCodec}</td>
47- * <td>{@code list<float>}</td>
48- * <td>{@code float[]}</td>
49- * </tr>
50- * <tr>
51- * <td>{@link com.datastax.driver.extras.codecs.arrays.DoubleArrayCodec}</td>
52- * <td>{@code list<double>}</td>
53- * <td>{@code double[]}</td>
54- * </tr>
55- * </table>
5621 */
5722 package com.datastax.driver.extras.codecs.arrays;
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/package-info.java +1 −21
@@ -16,27 +16,7 @@
1616
1717 /**
1818 * This package contains a collection of convenience
19- * {@link com.datastax.driver.core.TypeCodec} instances useful for
19+ * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
2020 * serializing between CQL temporal types and Java primitive types.
21- * <p>
22- * The codecs in this class provide the following mappings:
23- *
24- * <table summary="Supported Mappings">
25- * <tr>
26- * <th>Codec</th>
27- * <th>CQL type</th>
28- * <th>Java type</th>
29- * </tr>
30- * <tr>
31- * <td>{@link com.datastax.driver.extras.codecs.date.SimpleTimestampCodec}</td>
32- * <td>{@link com.datastax.driver.core.DataType#timestamp() timestamp}</td>
33- * <td>{@code long} (representing milliseconds since the Epoch)</td>
34- * </tr>
35- * <tr>
36- * <td>{@link com.datastax.driver.extras.codecs.date.SimpleDateCodec}</td>
37- * <td>{@link com.datastax.driver.core.DataType#date() date}</td>
38- * <td>{@code int} (representing days since the Epoch)</td>
39- * </tr>
40- * </table>
4121 */
4222 package com.datastax.driver.extras.codecs.date;
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/package-info.java +0 −3
@@ -18,8 +18,5 @@
1818 * This package contains a collection of convenience
1919 * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
2020 * serializing between CQL types and Guava-specific Java types.
21- *
22- * Currently only {@link com.datastax.driver.extras.codecs.guava.OptionalCodec OptionalCodec}
23- * is provided.
2421 */
2522 package com.datastax.driver.extras.codecs.guava;
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java +4 −3
@@ -42,8 +42,8 @@
4242
4343 /**
4444 * <p>
45- * {@link TypeCodec} that maps {@link Instant} <-> {@link Date}
46- * allowing the setting and retrieval of <code>timestamp</code>
45+ * {@link TypeCodec} that maps {@link Instant} to CQL {@code timestamp}
46+ * allowing the setting and retrieval of {@code timestamp}
4747 * columns as {@link Instant} instances.
4848 * </p>
4949 *
@@ -53,7 +53,8 @@
5353 * </p>
5454 *
5555 * @see ZonedDateTimeCodec
56- * @see "https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps"
56+ * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">Working with timestamps</a>
57+ * section of CQL specification.
5758 */
5859 public class InstantCodec extends TypeCodec<Instant> {
5960
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java +1 −1
@@ -35,7 +35,7 @@
3535
3636 /**
3737 * {@link TypeCodec} that maps
38- * {@link java.time.LocalDate} to CQL <code>date</code> columns.
38+ * {@link java.time.LocalDate} to CQL {@code date}.
3939 */
4040 public class LocalDateCodec extends TypeCodec<LocalDate> {
4141
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java +1 −3
@@ -28,9 +28,7 @@
2828 import static com.datastax.driver.core.ParseUtils.quote;
2929
3030 /**
31- * {@link TypeCodec} that maps {@link LocalTime} <-> CQL time (long representing nanoseconds since midnight)
32- * allowing the setting and retrieval of <code>time</code> columns as {@link LocalTime}
33- * instances.
31+ * {@link TypeCodec} that maps {@link LocalTime} to CQL {@code time} (long representing nanoseconds since midnight).
3432 */
3533 public class LocalTimeCodec extends TypeCodec<LocalTime> {
3634
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java +4 −1
@@ -41,7 +41,7 @@
4141 /**
4242 * <p>
4343 * {@link TypeCodec} that maps
44- * {@link ZonedDateTime} <-> <code>tuple&lt;timestamp,varchar&gt;</code>
44+ * {@link ZonedDateTime} to CQL {@code tuple<timestamp,varchar>},
4545 * providing a pattern for maintaining timezone information in
4646 * Cassandra.
4747 *
@@ -53,6 +53,9 @@
5353 * persisted in the <code>varchar</code> field such that when the
5454 * value is deserialized the timezone is
5555 * preserved.
56+ *
57+ * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">Working with timestamps</a>
58+ * section of CQL specification.
5659 */
5760 public class ZonedDateTimeCodec extends TypeCodec.AbstractTupleCodec<ZonedDateTime> {
5861
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java +6 −38
@@ -17,45 +17,13 @@
1717 /**
1818 * This package contains a collection of convenience
1919 * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
20- * serializing between CQL types and JDK 8 types, such as the ones from the
21- * {@code java.time} API and {@link java.util.Optional}.
22- * <p>
23- * The codecs in this class provide the following mappings:
20+ * serializing between CQL types and Java 8 types, such as the ones from the
21+ * {@link java.time} API and {@link java.util.Optional}.
2422 *
25- * <table summary="Supported Mappings">
26- * <tr>
27- * <th>Codec</th>
28- * <th>CQL type</th>
29- * <th>JDK 8 type</th>
30- * </tr>
31- * <tr>
32- * <td>{@link com.datastax.driver.extras.codecs.jdk8.OptionalCodec}</td>
33- * <td>Any</td>
34- * <td>{@link java.util.Optional Optional}</td>
35- * </tr>
36- * <tr>
37- * <td>{@link com.datastax.driver.extras.codecs.jdk8.LocalTimeCodec}</td>
38- * <td>{@link com.datastax.driver.core.DataType#time() time}</td>
39- * <td>{@link java.time.LocalTime LocalTime}</td>
40- * </tr>
41- * <tr>
42- * <td>{@link com.datastax.driver.extras.codecs.jdk8.LocalDateCodec}</td>
43- * <td>{@link com.datastax.driver.core.DataType#date() date}</td>
44- * <td>{@link java.time.LocalDate LocalDate}</td>
45- * </tr>
46- * <tr>
47- * <td>{@link com.datastax.driver.extras.codecs.jdk8.InstantCodec}</td>
48- * <td>{@link com.datastax.driver.core.DataType#timestamp() timestamp}</td>
49- * <td>{@link java.time.Instant Instant}</td>
50- * </tr>
51- * <tr>
52- * <td>{@link com.datastax.driver.extras.codecs.jdk8.ZonedDateTimeCodec}</td>
53- * <td>{@link com.datastax.driver.core.TupleType tuple} of
54- * ({@link com.datastax.driver.core.DataType#timestamp() timestamp},
55- * {@link com.datastax.driver.core.DataType#varchar() varchar})</td>
56- * <td>{@link java.time.ZonedDateTime ZonedDateTime}</td>
57- * </tr>
58- * </table>
23+ * <p>
24+ * Note that, while the driver remains globally compatible with older JDKs,
25+ * classes in this package require the presence of a Java 8 or higher
26+ * at runtime.
5927 *
6028 */
6129 package com.datastax.driver.extras.codecs.jdk8;
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/DateTimeCodec.java +4 −1
@@ -37,7 +37,7 @@
3737 /**
3838 * <p>
3939 * {@link TypeCodec} that maps
40- * {@link DateTime} <-> <code>tuple&lt;timestamp,varchar&gt;</code>
40+ * {@link DateTime} to CQL {@code tuple<timestamp,varchar>},
4141 * providing a pattern for maintaining timezone information in
4242 * Cassandra.
4343 *
@@ -49,6 +49,9 @@
4949 * persisted in the <code>varchar</code> field such that when the
5050 * value is deserialized the timezone is
5151 * preserved.
52+ *
53+ * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">Working with timestamps</a>
54+ * section of CQL specification.
5255 */
5356 public class DateTimeCodec extends TypeCodec.AbstractTupleCodec<DateTime> {
5457
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/InstantCodec.java +3 −2
@@ -36,10 +36,11 @@
3636 import static com.datastax.driver.core.ParseUtils.unquote;
3737
3838 /**
39- * {@link TypeCodec} that maps {@link Instant} to CQL <code>timestamp</code>.
39+ * {@link TypeCodec} that maps {@link Instant} to CQL {@code timestamp}.
4040 *
4141 * @see DateTimeCodec
42- * @see "https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps"
42+ * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">Working with timestamps</a>
43+ * section of CQL specification.
4344 */
4445 public class InstantCodec extends TypeCodec<Instant> {
4546
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalDateCodec.java +1 −1
@@ -39,7 +39,7 @@
3939
4040 /**
4141 * {@link TypeCodec} that maps
42- * {@link org.joda.time.LocalDate} to CQL <code>date</code> columns.
42+ * {@link org.joda.time.LocalDate} to CQL {@code date}.
4343 */
4444 public class LocalDateCodec extends TypeCodec<LocalDate> {
4545
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.java +2 −4
@@ -33,12 +33,10 @@
3333 import static com.datastax.driver.core.ParseUtils.quote;
3434
3535 /**
36- * {@link TypeCodec} that maps {@link LocalTime} <-> CQL time (long representing nanoseconds since midnight)
37- * allowing the setting and retrieval of <code>time</code> columns as {@link LocalTime}
38- * instances.
36+ * {@link TypeCodec} that maps {@link LocalTime} to CQL {@code time} (long representing nanoseconds since midnight).
3937 *
4038 * <p>
41- * IMPORTANT: {@link LocalTime} as millisecond precision; nanoseconds below one millisecond will be lost
39+ * IMPORTANT: {@link LocalTime} has millisecond precision; nanoseconds below one millisecond will be lost
4240 * during deserialization.
4341 */
4442 public class LocalTimeCodec extends TypeCodec<LocalTime> {
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/package-info.java +14 −32
@@ -16,39 +16,21 @@
1616
1717 /**
1818 * This package contains a collection of convenience
19- * {@link com.datastax.driver.core.TypeCodec} instances useful for
20- * serializing between CQL types and Joda Time types like {@link org.joda.time.DateTime}.
19+ * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
20+ * serializing between CQL types and Joda Time types such as {@link org.joda.time.DateTime}.
21+ *
2122 * <p>
22- * The codecs in this class provide the following mappings:
23+ * Note that classes in this package require the presence of
24+ * <a href="http://www.joda.org/joda-time/">Joda Time library</a> at runtime.
25+ * If you use Maven, this can be done by declaring the following dependency in your project:
26+ *
27+ * <pre>{@code
28+ * <dependency>
29+ * <groupId>joda-time</groupId>
30+ * <artifactId>joda-time</artifactId>
31+ * <version>2.9.1</version>
32+ * </dependency>
33+ * }</pre>
2334 *
24- * <table summary="Supported Mappings">
25- * <tr>
26- * <th>Codec</th>
27- * <th>CQL type</th>
28- * <th>Joda Time</th>
29- * </tr>
30- * <tr>
31- * <td>{@link com.datastax.driver.extras.codecs.joda.LocalTimeCodec}</td>
32- * <td>{@link com.datastax.driver.core.DataType#time() time}</td>
33- * <td>{@link org.joda.time.LocalTime LocalTime}</td>
34- * </tr>
35- * <tr>
36- * <td>{@link com.datastax.driver.extras.codecs.joda.LocalDateCodec}</td>
37- * <td>{@link com.datastax.driver.core.DataType#date() date}</td>
38- * <td>{@link org.joda.time.LocalDate LocalDate}</td>
39- * </tr>
40- * <tr>
41- * <td>{@link com.datastax.driver.extras.codecs.joda.InstantCodec}</td>
42- * <td>{@link com.datastax.driver.core.DataType#timestamp() timestamp}</td>
43- * <td>{@link org.joda.time.Instant Instant}</td>
44- * </tr>
45- * <tr>
46- * <td>{@link com.datastax.driver.extras.codecs.joda.DateTimeCodec}</td>
47- * <td>{@link com.datastax.driver.core.TupleType tuple} of
48- * ({@link com.datastax.driver.core.DataType#timestamp() timestamp},
49- * {@link com.datastax.driver.core.DataType#varchar() varchar})</td>
50- * <td>{@link org.joda.time.DateTime DateTime}</td>
51- * </tr>
52- * </table>
5335 */
5436 package com.datastax.driver.extras.codecs.joda;
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.java +15 −1
@@ -33,10 +33,24 @@
3333 /**
3434 * A JSON codec that uses the <a href="http://wiki.fasterxml.com/JacksonHome">Jackson</a>
3535 * library to perform serialization and deserialization of JSON objects.
36+ *
3637 * <p>
37- * Note that this codec maps a single object to a single JSON structure at a time;
38+ * This codec maps a single Java object to a single JSON structure at a time;
3839 * mapping of arrays or collections to root-level JSON arrays is not supported,
3940 * but such a codec can be easily crafted after this one.
41+ *
42+ * <p>
43+ * Note that this codec requires the presence of Jackson library at runtime.
44+ * If you use Maven, this can be done by declaring the following dependency in your project:
45+ *
46+ * <pre>{@code
47+ * <dependency>
48+ * <groupId>com.fasterxml.jackson.core</groupId>
49+ * <artifactId>jackson-databind</artifactId>
50+ * <version>2.6.3</version>
51+ * </dependency>
52+ * }</pre>
53+ *
4054 */
4155 public class JacksonJsonCodec<T> extends TypeCodec<T> {
4256
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.java +23 −3
@@ -36,7 +36,7 @@
3636 * More specifically, this codec maps an arbitrary {@link JsonStructure} to
3737 * a CQL {@code varchar} column.
3838 * <p>
39- * Note that this codec handles the Java type {@link JsonStructure}.
39+ * This codec handles the Java type {@link JsonStructure}.
4040 * It is therefore required that values are set and retrieved using that exact Java type;
4141 * users should manually downcast to either {@link JsonObject} or {@link JsonArray},
4242 * as in the example below:
@@ -45,12 +45,12 @@
4545 * // setting values
4646 * JsonObject myObject = ...
4747 * PreparedStatement ps = ...
48- * // set values using JsonStructure
48+ * // set values using JsonStructure as target Java type
4949 * BoundStatement bs = ps.bind().set(1, myObject, JsonStructure.class);
5050 *
5151 * // retrieving values
5252 * Row row = session.execute(bs).one();
53- * // use JsonStructure to retrieve values
53+ * // use JsonStructure as target Java type to retrieve values
5454 * JsonStructure json = row.get(0, JsonStructure.class);
5555 * if (json instanceof JsonObject) {
5656 * myObject = (JsonObject) json;
@@ -58,6 +58,26 @@
5858 * }
5959 * }</pre>
6060 *
61+ * <p>
62+ * Note that at runtime, this codec requires the presence of both JSR-353 API
63+ * and a JSR-353-compatible runtime library, such as
64+ * <a href="https://jsonp.java.net/download.html">JSR-353's reference implementation</a>.
65+ * If you use Maven, this can be done by declaring the following dependencies in your project:
66+ *
67+ * <pre>{@code
68+ * <dependency>
69+ * <groupId>javax.json</groupId>
70+ * <artifactId>javax.json-api</artifactId>
71+ * <version>1.0</version>
72+ * </dependency>
73+ *
74+ * <dependency>
75+ * <groupId>org.glassfish</groupId>
76+ * <artifactId>javax.json</artifactId>
77+ * <version>1.0.4</version>
78+ * </dependency>
79+ * }</pre>
80+ *
6181 */
6282 public class Jsr353JsonCodec extends TypeCodec<JsonStructure> {
6383
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/package-info.java +0 −24
@@ -18,29 +18,5 @@
1818 * This package contains a collection of convenience
1919 * {@link com.datastax.driver.core.TypeCodec} instances useful for
2020 * serializing JSON structures.
21- * <p>
22- * The codecs in this class provide support for the following mappings
23- * and frameworks:
24- *
25- * <table summary="Supported Mappings">
26- * <tr>
27- * <th>Codec</th>
28- * <th>CQL type</th>
29- * <th>Java type</th>
30- * <th>JSON Framework</th>
31- * </tr>
32- * <tr>
33- * <td>{@link com.datastax.driver.extras.codecs.json.JacksonJsonCodec}</td>
34- * <td>{@link com.datastax.driver.core.DataType#varchar() varchar}</td>
35- * <td>Any</td>
36- * <td><a href="http://wiki.fasterxml.com/JacksonHome">Jackson</a></td>
37- * </tr>
38- * <tr>
39- * <td>{@link com.datastax.driver.extras.codecs.json.Jsr353JsonCodec}</td>
40- * <td>{@link com.datastax.driver.core.DataType#varchar() varchar}</td>
41- * <td>{@link javax.json.JsonStructure JsonStructure}</td>
42- * <td><a href="https://jcp.org/en/jsr/detail?id=353">Java API for JSON processing</a> (JSR 353)</td>
43- * </tr>
44- * </table>
4521 */
4622 package com.datastax.driver.extras.codecs.json;
added driver-extras/src/main/java/com/datastax/driver/extras/codecs/package-info.java +55 −0
@@ -0,0 +1,55 @@
1+/*
2+ * Copyright (C) 2012-2015 DataStax Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+/**
18+ * This package and its subpackages contain several convenience {@link com.datastax.driver.core.TypeCodec TypeCodec}s.
19+ *
20+ * <table summary="Supported Mappings">
21+ * <tr>
22+ * <th>Package</th>
23+ * <th>Description</th>
24+ * </tr>
25+ * <tr>
26+ * <td>{@link com.datastax.driver.extras.codecs.arrays}</td>
27+ * <td>codecs mapping CQL lists to Java arrays.</td>
28+ * </tr>
29+ * <tr>
30+ * <td>{@link com.datastax.driver.extras.codecs.date}</td>
31+ * <td>codecs mapping CQL temporal types to Java primitive types.</td>
32+ * </tr>
33+ * <tr>
34+ * <td>{@link com.datastax.driver.extras.codecs.enums}</td>
35+ * <td>codecs mapping CQL types to Java enums.</td>
36+ * </tr>
37+ * <tr>
38+ * <td>{@link com.datastax.driver.extras.codecs.guava}</td>
39+ * <td>codecs mapping CQL types to Guava-specific Java types.</td>
40+ * </tr>
41+ * <tr>
42+ * <td>{@link com.datastax.driver.extras.codecs.jdk8}</td>
43+ * <td>codecs mapping CQL types to Java 8 types, including {@code java.time} API and {@code java.util.Optional}.</td>
44+ * </tr>
45+ * <tr>
46+ * <td>{@link com.datastax.driver.extras.codecs.joda}</td>
47+ * <td>codecs mapping CQL types to Joda Time types.</td>
48+ * </tr>
49+ * <tr>
50+ * <td>{@link com.datastax.driver.extras.codecs.json}</td>
51+ * <td>codecs mapping CQL varchars to JSON structures.</td>
52+ * </tr>
53+ * </table>
54+ */
55+package com.datastax.driver.extras.codecs;
modified pom.xml +31 −2
@@ -54,6 +54,11 @@
5454 <snappy.version>1.0.5</snappy.version>
5555 <lz4.version>1.2.0</lz4.version>
5656 <hdr.version>2.1.4</hdr.version>
57+ <!-- driver-extras module -->
58+ <jackson.version>2.6.3</jackson.version>
59+ <joda.version>2.9.1</joda.version>
60+ <jsr353-api.version>1.0</jsr353-api.version>
61+ <jsr353-ri.version>1.0.4</jsr353-ri.version>
5762 <!-- test dependency versions -->
5863 <testng.version>6.8.8</testng.version>
5964 <assertj.version>1.7.0</assertj.version>
@@ -103,7 +108,7 @@
103108 <version>1.4.1</version>
104109 <executions>
105110 <execution>
106- <id>enforce-java</id>
111+ <id>enforce-java8</id>
107112 <goals>
108113 <goal>enforce</goal>
109114 </goals>
@@ -160,10 +165,33 @@
160165 <groupId>org.apache.maven.plugins</groupId>
161166 <artifactId>maven-javadoc-plugin</artifactId>
162167 <version>2.9.1</version>
168+ <inherited>true</inherited>
163169 <configuration>
164170 <verbose>false</verbose>
171+ <additionalparam>${javadoc.opts}</additionalparam>
165172 <!-- I can haz math in my javadoc (see http://zverovich.net/2012/01/14/beautiful-math-in-javadoc.html) -->
166- <additionalparam>${javadoc.opts} -header '&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalparam>
173+ <header>
174+ &lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;
175+ </header>
176+ <!-- open external links in a separate window -->
177+ <bottom>
178+ &lt;script type="text/javascript"&gt;
179+ for(var i in document.links) {
180+ var link = document.links[i];
181+ if (link.href.indexOf('http') === 0) link.target = '_blank';
182+ }
183+ &lt;/script&gt;
184+ </bottom>
185+ <links>
186+ <link>https://docs.oracle.com/javase/8/docs/api/</link>
187+ <link>http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/</link>
188+ <link>http://netty.io/4.0/api/</link>
189+ <!-- dependencies from driver-extras -->
190+ <link>http://www.joda.org/joda-time/apidocs/</link>
191+ <link>http://fasterxml.github.io/jackson-core/javadoc/2.6/</link>
192+ <link>http://fasterxml.github.io/jackson-databind/javadoc/2.6/</link>
193+ <link>https://javaee-spec.java.net/nonav/javadocs/</link>
194+ </links>
167195 </configuration>
168196 <executions>
169197 <execution>
@@ -180,6 +208,7 @@
180208 <version>2.5</version>
181209 <configuration>
182210 <tagNameFormat>@{project.version}</tagNameFormat>
211+ <preparationGoals>clean verify -Penforce-java8</preparationGoals>
183212 <!-- do NOT specify arguments tag here as it would override the arguments tag in this plugin's definition in the parent POM -->
184213 </configuration>
185214 </plugin>