HHH-6289 Adjusting log levels and fixing formatting and javadocs

This commit is contained in:
Hardy Ferentschik 2011-07-06 17:12:10 +02:00
parent d1eec59c08
commit bcdefd10a6
3 changed files with 55 additions and 25 deletions

View File

@ -29,7 +29,7 @@ package org.hibernate.annotations;
* the Level 2 Cache.
*
* @author Emmanuel Bernard
* @author Carlos Gonz<EFBFBD>lez-Cadenas
* @author Carlos Gonzalez-Cadenas
*/
public enum CacheModeType {

View File

@ -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<EFBFBD>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;
}

View File

@ -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);