org.hibernate.metamodel.binding
Class FetchProfile

java.lang.Object
  extended by org.hibernate.metamodel.binding.FetchProfile

public class FetchProfile
extends Object

A fetch profile allows a user to dynamically modify the fetching strategy used for particular associations at runtime, whereas that information was historically only statically defined in the metadata.

This class represent the data as it is defined in their metadata.

See Also:
FetchProfile

Nested Class Summary
static class FetchProfile.Fetch
          Defines an individual association fetch within the given profile.
 
Constructor Summary
FetchProfile(String name, Set<FetchProfile.Fetch> fetches)
          Create a fetch profile representation.
 
Method Summary
 void addFetch(String entity, String association, String style)
          Adds a fetch to this profile.
 Set<FetchProfile.Fetch> getFetches()
          Retrieve the fetches associated with this profile
 String getName()
          Retrieve the name of the fetch profile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FetchProfile

public FetchProfile(String name,
                    Set<FetchProfile.Fetch> fetches)
Create a fetch profile representation.

Parameters:
name - The name of the fetch profile.
fetches -
Method Detail

getName

public String getName()
Retrieve the name of the fetch profile.

Returns:
The profile name

getFetches

public Set<FetchProfile.Fetch> getFetches()
Retrieve the fetches associated with this profile

Returns:
The fetches associated with this profile.

addFetch

public void addFetch(String entity,
                     String association,
                     String style)
Adds a fetch to this profile.

Parameters:
entity - The entity which contains the association to be fetched
association - The association to fetch
style - The style of fetch t apply


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.