com.avaje.ebean.config
Enum AutofetchMode

java.lang.Object
  extended by java.lang.Enum<AutofetchMode>
      extended by com.avaje.ebean.config.AutofetchMode
All Implemented Interfaces:
Serializable, Comparable<AutofetchMode>

public enum AutofetchMode
extends Enum<AutofetchMode>

The mode for determining if Autofetch will be used for a given query when Query.setAutofetch(boolean) has not been explicitly set on a query.

The explicit control of Query.setAutofetch(boolean) will always take precedence. This mode is used when this has not been explicitly set on a query.


Enum Constant Summary
DEFAULT_OFF
          Don't implicitly use Autofetch.
DEFAULT_ON
          Use Autofetch implicitly.
DEFAULT_ONIFEMPTY
          Implicitly use Autofetch if the query has not got either select() or join() defined.
 
Method Summary
static AutofetchMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AutofetchMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT_OFF

public static final AutofetchMode DEFAULT_OFF
Don't implicitly use Autofetch. Must explicitly turn it on.


DEFAULT_ON

public static final AutofetchMode DEFAULT_ON
Use Autofetch implicitly. Must explicitly turn it off.


DEFAULT_ONIFEMPTY

public static final AutofetchMode DEFAULT_ONIFEMPTY
Implicitly use Autofetch if the query has not got either select() or join() defined.

Method Detail

values

public static AutofetchMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AutofetchMode c : AutofetchMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AutofetchMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2010. All Rights Reserved.