@@ -459,9 +459,11 @@ public BoundStatement setLong(String name, long v) {
459459 *
460460 * @throws IndexOutOfBoundsException if {@code i < 0 || i >= this.preparedStatement().variables().size()}.
461461 * @throws InvalidTypeException if column {@code i} is not of type TIMESTAMP.
462+ * @deprecated deprecated in favor of {@link #setTimestamp(int, Date)}
462463 */
464+ @ Deprecated
463465 public BoundStatement setDate (int i , Date v ) {
464- return wrapper .setDate (i , v );
466+ return wrapper .setTimestamp (i , v );
465467 }
466468
467469 /**
@@ -477,9 +479,105 @@ public BoundStatement setDate(int i, Date v) {
477479 * variable, that is, if {@code !this.preparedStatement().variables().names().contains(name)}.
478480 * @throws InvalidTypeException if (any occurrence of) {@code name} is
479481 * not of type TIMESTAMP.
482+ * @deprecated deprecated in favor of {@link #setTimestamp(String, Date)}
480483 */
484+ @ Deprecated
481485 public BoundStatement setDate (String name , Date v ) {
482- return wrapper .setDate (name , v );
486+ return wrapper .setTimestamp (name , v );
487+ }
488+
489+ /**
490+ * Set the {@code i}th value to the provided date.
491+ *
492+ * @param i the index of the variable to set.
493+ * @param v the value to set.
494+ * @return this BoundStatement.
495+ *
496+ * @throws IndexOutOfBoundsException if {@code i < 0 || i >= this.preparedStatement().variables().size()}.
497+ * @throws InvalidTypeException if column {@code i} is not of type TIMESTAMP.
498+ */
499+ public BoundStatement setTimestamp (int i , Date v ) {
500+ return wrapper .setTimestamp (i , v );
501+ }
502+
503+ /**
504+ * Sets the value for (all occurrences of) variable {@code name} to the
505+ * provided date.
506+ *
507+ * @param name the name of the variable to set; if multiple variables
508+ * {@code name} are prepared, all of them are set.
509+ * @param v the value to set.
510+ * @return this BoundStatement.
511+ *
512+ * @throws IllegalArgumentException if {@code name} is not a prepared
513+ * variable, that is, if {@code !this.preparedStatement().variables().names().contains(name)}.
514+ * @throws InvalidTypeException if (any occurrence of) {@code name} is
515+ * not of type TIMESTAMP.
516+ */
517+ public BoundStatement setTimestamp (String name , Date v ) {
518+ return wrapper .setTimestamp (name , v );
519+ }
520+
521+ /**
522+ * Set the {@code i}th value to the provided date as an int in days since epoch.
523+ *
524+ * @param i the index of the value to set.
525+ * @param v the value to set.
526+ * @return this object.
527+ *
528+ * @throws IndexOutOfBoundsException if {@code i} is not a valid index for this object.
529+ * @throws InvalidTypeException if value {@code i} is not of type DATE.
530+ */
531+ public BoundStatement setDateWithoutTime (int i , DateWithoutTime v ) {
532+ return wrapper .setDateWithoutTime (i , v );
533+ }
534+
535+ /**
536+ * Sets the value for (all occurrences of) variable {@code name} to the
537+ * provided date as an int in days since epoch.
538+ *
539+ * @param name the name of the value to set; if {@code name} is present multiple
540+ * times, all its values are set.
541+ * @param v the value to set.
542+ * @return this object.
543+ *
544+ * @throws IllegalArgumentException if {@code name} is not a valid name for this object.
545+ * @throws InvalidTypeException if (any occurrence of) {@code name} is
546+ * not of type DATE.
547+ */
548+ public BoundStatement setDateWithoutTime (String name , DateWithoutTime v ) {
549+ return wrapper .setDateWithoutTime (name , v );
550+ }
551+
552+ /**
553+ * Set the {@code i}th value to the provided time as a long in nanoseconds since midnight.
554+ *
555+ * @param i the index of the value to set.
556+ * @param v the value to set.
557+ * @return this object.
558+ *
559+ * @throws IndexOutOfBoundsException if {@code i} is not a valid index for this object.
560+ * @throws InvalidTypeException if value {@code i} is not of type TIME.
561+ */
562+ public BoundStatement setTime (int i , long v ) {
563+ return wrapper .setTime (i , v );
564+ }
565+
566+ /**
567+ * Sets the value for (all occurrences of) variable {@code name} to the
568+ * provided time as a long in nanoseconds since midnight.
569+ *
570+ * @param name the name of the value to set; if {@code name} is present multiple
571+ * times, all its values are set.
572+ * @param v the value to set.
573+ * @return this object.
574+ *
575+ * @throws IllegalArgumentException if {@code name} is not a valid name for this object.
576+ * @throws InvalidTypeException if (any occurrence of) {@code name} is
577+ * not of type TIME.
578+ */
579+ public BoundStatement setTime (String name , long v ) {
580+ return wrapper .setTime (name , v );
483581 }
484582
485583 /**
@@ -1186,15 +1284,58 @@ public long getLong(String name) {
11861284 /**
11871285 * {@inheritDoc}
11881286 */
1287+ @ Deprecated
11891288 public Date getDate (int i ) {
1190- return wrapper .getDate (i );
1289+ return wrapper .getTimestamp (i );
11911290 }
11921291
11931292 /**
11941293 * {@inheritDoc}
11951294 */
11961295 public Date getDate (String name ) {
1197- return wrapper .getDate (name );
1296+ return wrapper .getTimestamp (name );
1297+ }
1298+
1299+ /**
1300+ * {@inheritDoc}
1301+ */
1302+ public Date getTimestamp (int i ) {
1303+ return wrapper .getTimestamp (i );
1304+ }
1305+
1306+ /**
1307+ * {@inheritDoc}
1308+ */
1309+ public Date getTimestamp (String name ) {
1310+ return wrapper .getTimestamp (name );
1311+ }
1312+
1313+ /**
1314+ * {@inheritDoc}
1315+ */
1316+ public DateWithoutTime getDateWithoutTime (int i ) {
1317+ return wrapper .getDateWithoutTime (i );
1318+ }
1319+
1320+ /**
1321+ * {@inheritDoc}
1322+ */
1323+ public DateWithoutTime getDateWithoutTime (String name ) {
1324+ return wrapper .getDateWithoutTime (name );
1325+ }
1326+
1327+ /**
1328+ * {@inheritDoc}
1329+ */
1330+ public long getTime (int i ) {
1331+ return wrapper .getTime (i );
1332+ }
1333+
1334+ /**
1335+ * {@inheritDoc}
1336+ */
1337+ public long getTime (String name ) {
1338+ return wrapper .getTime (name );
11981339 }
11991340
12001341 /**
0 commit comments