Spring Data JPA

org.springframework.data.jpa.repository
Enum EntityGraph.EntityGraphType

java.lang.Object
  extended by java.lang.Enum<EntityGraph.EntityGraphType>
      extended by org.springframework.data.jpa.repository.EntityGraph.EntityGraphType
All Implemented Interfaces:
Serializable, Comparable<EntityGraph.EntityGraphType>
Enclosing class:
EntityGraph

public static enum EntityGraph.EntityGraphType
extends Enum<EntityGraph.EntityGraphType>

Enum for JPA 2.1 EntityGraph types.

Since:
1.6
Author:
Thomas Darimont

Enum Constant Summary
FETCH
          When the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZY
LOAD
          When the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType.
 
Method Summary
 String getKey()
           
static EntityGraph.EntityGraphType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EntityGraph.EntityGraphType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOAD

public static final EntityGraph.EntityGraphType LOAD
When the javax.persistence.loadgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated according to their specified or default FetchType.

See Also:
2.1 Specification: 3.7.4.2 Load Graph Semantics

FETCH

public static final EntityGraph.EntityGraphType FETCH
When the javax.persistence.fetchgraph property is used to specify an entity graph, attributes that are specified by attribute nodes of the entity graph are treated as FetchType.EAGER and attributes that are not specified are treated as FetchType.LAZY

See Also:
2.1 Specification: 3.7.4.1 Fetch Graph Semantics
Method Detail

values

public static EntityGraph.EntityGraphType[] 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 (EntityGraph.EntityGraphType c : EntityGraph.EntityGraphType.values())
    System.out.println(c);

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

valueOf

public static EntityGraph.EntityGraphType 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

getKey

public String getKey()

Spring Data JPA

Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.