Skip to content

Commit

Permalink
add missing @SInCE annotations
Browse files Browse the repository at this point in the history
missed quite a few of these!
  • Loading branch information
gavinking authored and lukasj committed Apr 10, 2024
1 parent 16e386c commit ac57cee
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/java/jakarta/persistence/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
* should not be stored in a {@code time} column, or that the
* maximum number of digits supported by the database and JDBC
* driver should be stored in a {@code timestamp} column.
*
* @since 3.2
*/
int secondPrecision() default -1;

Expand Down
1 change: 1 addition & 0 deletions api/src/main/java/jakarta/persistence/EntityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ <T> T find(EntityGraph<T> entityGraph, Object primaryKey,
* an entity, or if it is neither persistent nor detached
* @throws EntityNotFoundException if the entity state cannot be
* accessed
* @since 3.2
*/
<T> T getReference(T entity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ public interface EntityManagerFactory extends AutoCloseable {
* meaning all queries
* @return a map keyed by query name
* @param <R> the specified upper bound on the query result types
*
* @since 3.2
*/
<R> Map<String, TypedQueryReference<R>> getNamedQueries(Class<R> resultType);

Expand All @@ -364,6 +366,8 @@ public interface EntityManagerFactory extends AutoCloseable {
* meaning all entity graphs
* @return a map keyed by graph name
* @param <E> the specified upper bound on the entity graph types
*
* @since 3.2
*/
<E> Map<String, EntityGraph<? extends E>> getNamedEntityGraphs(Class<E> entityType);

Expand All @@ -389,6 +393,8 @@ public interface EntityManagerFactory extends AutoCloseable {
* control to the client.
*
* @param work a function to be executed in the scope of the transaction
*
* @since 3.2
*/
void runInTransaction(Consumer<EntityManager> work);
/**
Expand All @@ -415,6 +421,8 @@ public interface EntityManagerFactory extends AutoCloseable {
*
* @param work a function to be called in the scope of the transaction
* @return the value returned by the given function
*
* @since 3.2
*/
<R> R callInTransaction(Function<EntityManager, R> work);
}
2 changes: 2 additions & 0 deletions api/src/main/java/jakarta/persistence/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ default Stream getResultStream() {
* @throws PersistenceException if the query execution exceeds
* the query timeout value set and the transaction
* is rolled back
*
* @since 3.2
*/
Object getSingleResultOrNull();

Expand Down
2 changes: 2 additions & 0 deletions api/src/main/java/jakarta/persistence/TypedQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ default Stream<X> getResultStream() {
* @throws PersistenceException if the query execution exceeds
* the query timeout value set and the transaction
* is rolled back
*
* @since 3.2
*/
X getSingleResultOrNull();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* @param <R> an upper bound on the result type of the query
*
* @see EntityManager#createQuery(TypedQueryReference)
*
* @since 3.2
*/
public interface TypedQueryReference<R> {
/**
Expand Down

0 comments on commit ac57cee

Please sign in to comment.