diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/CacheModeType.java b/hibernate-core/src/main/java/org/hibernate/annotations/CacheModeType.java index 4d346c8a61..bd35ba9dec 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/CacheModeType.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/CacheModeType.java @@ -29,7 +29,7 @@ package org.hibernate.annotations; * the Level 2 Cache. * * @author Emmanuel Bernard - * @author Carlos Gonz�lez-Cadenas + * @author Carlos Gonzalez-Cadenas */ public enum CacheModeType { diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/NamedQuery.java b/hibernate-core/src/main/java/org/hibernate/annotations/NamedQuery.java index 3e1199cc12..cf8abdc83f 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/NamedQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/NamedQuery.java @@ -22,40 +22,70 @@ * Boston, MA 02110-1301 USA */ package org.hibernate.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + import static java.lang.annotation.ElementType.PACKAGE; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Retention; -import java.lang.annotation.Target; /** * Extends {@link javax.persistence.NamedQuery} with Hibernate features * - * @author Carlos Gonz�lez-Cadenas + * @author Carlos Gonzalez-Cadenas */ -@Target({TYPE, PACKAGE}) +@Target( { TYPE, PACKAGE }) @Retention(RUNTIME) public @interface NamedQuery { - /** the name of the NamedQuery */ + /** + * @return returns the name of this {@code NamedQuery} + */ String name(); - /** the Query String for the NamedQuery */ - String query(); - /** the flush mode for the query */ - FlushModeType flushMode() default FlushModeType.PERSISTENCE_CONTEXT; - /** mark the query as cacheable or not */ - boolean cacheable() default false; - /** the cache region to use */ - String cacheRegion() default ""; - /** the number of rows fetched by the JDBC Driver per roundtrip */ - int fetchSize() default -1; - /**the query timeout in seconds*/ - int timeout() default -1; - /**comment added to the SQL query, useful for the DBA */ - String comment() default ""; - /**the cache mode used for this query*/ - CacheModeType cacheMode() default CacheModeType.NORMAL; - /**marks whether the results are fetched in read-only mode or not*/ - boolean readOnly() default false; + /** + * @return returns the query string for this {@code NamedQuery} + */ + String query(); + + /** + * @return returns the flush mode for this query + */ + FlushModeType flushMode() default FlushModeType.PERSISTENCE_CONTEXT; + + /** + * @return returns whether this query is cacheable or not + */ + boolean cacheable() default false; + + /** + * @return returns the the cache region to use + */ + String cacheRegion() default ""; + + /** + * @return returns the number of rows fetched by the JDBC Driver per database round-trip + */ + int fetchSize() default -1; + + /** + * @return return the query timeout in seconds + */ + int timeout() default -1; + + /** + * @return returns the comment added to the SQL query (useful for the DBA) + */ + String comment() default ""; + + /** + * @return returns the cache mode used for this query + */ + CacheModeType cacheMode() default CacheModeType.NORMAL; + + /** + * @return returns whether the results are fetched in read-only mode or not. Default is {@code false} + */ + boolean readOnly() default false; } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java index 8dc2530aa4..24f61afd84 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java @@ -90,7 +90,7 @@ public interface CoreMessageLogger extends BasicLogger { @Message(value = "On release of batch it still contained JDBC statements", id = 10) void batchContainedStatementsOnRelease(); - @LogMessage(level = INFO) + @LogMessage(level = DEBUG) @Message(value = "Binding entity from annotated class: %s", id = 15) void bindingEntityFromAnnotatedClass(String className);