Skip to content

Commit afc406a

Browse files
committed
Add comments to setDate, setTime, setTimestamp methods to reduce confusion to the Hibernate newbies in future.
1 parent 1e88107 commit afc406a

File tree

1 file changed

+20
-0
lines changed
  • hibernate-core/src/main/java/org/hibernate

1 file changed

+20
-0
lines changed

hibernate-core/src/main/java/org/hibernate/Query.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,28 @@ public interface Query {
405405
public Query setBigDecimal(String name, BigDecimal number);
406406
public Query setBigInteger(String name, BigInteger number);
407407

408+
/**
409+
* Bind the date (time is truncated) of a given Date object to a named query parameter.
410+
*
411+
* @param name The name of the parameter
412+
* @param date The date object
413+
*/
408414
public Query setDate(String name, Date date);
415+
416+
/**
417+
* Bind the time (date is truncated) of a given Date object to a named query parameter.
418+
*
419+
* @param name The name of the parameter
420+
* @param date The date object
421+
*/
409422
public Query setTime(String name, Date date);
423+
424+
/**
425+
* Bind the date and the time of a given Date object to a named query parameter.
426+
*
427+
* @param name The name of the parameter
428+
* @param date The date object
429+
*/
410430
public Query setTimestamp(String name, Date date);
411431

412432
public Query setCalendar(String name, Calendar calendar);

0 commit comments

Comments
 (0)