Package org.hibernate.engine.profile
Class FetchProfile
java.lang.Object
org.hibernate.engine.profile.FetchProfile
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 defines the runtime representation of this data.
-
Constructor Summary
ConstructorsConstructorDescriptionFetchProfile(String name) A 'fetch profile' is uniquely named within aSessionFactory, thus it is also uniquely and easily identifiable within thatSessionFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFetch(Association association, String fetchStyleName) Add a fetch to the profile.voidaddFetch(Association association, Fetch.Style style) Add a fetch to the profile.voidAdd a fetch to the profile.getFetchByRole(String role) Getter for property 'fetches'.getName()Getter for property 'name'.booleanGetter for property 'containsJoinFetchedBag', which flags whether this fetch profile contained any bag join fetchesbooleanGetter for property 'containsJoinFetchedCollection', which flags whether this fetch profile contained any collection join fetches.
-
Constructor Details
-
FetchProfile
A 'fetch profile' is uniquely named within aSessionFactory, thus it is also uniquely and easily identifiable within thatSessionFactory.- Parameters:
name- The name under which we are bound in the sessionFactory
-
-
Method Details
-
addFetch
Add a fetch to the profile.- Parameters:
association- The association to be fetchedfetchStyleName- The name of the fetch style to apply
-
addFetch
Add a fetch to the profile.- Parameters:
association- The association to be fetchedstyle- The style to apply
-
addFetch
Add a fetch to the profile.- Parameters:
fetch- The fetch to add.
-
getName
Getter for property 'name'.- Returns:
- Value for property 'name'.
-
getFetches
Getter for property 'fetches'. Map ofFetchinstances, keyed by association role- Returns:
- Value for property 'fetches'.
-
getFetchByRole
-
isContainsJoinFetchedCollection
public boolean isContainsJoinFetchedCollection()Getter for property 'containsJoinFetchedCollection', which flags whether this fetch profile contained any collection join fetches.- Returns:
- Value for property 'containsJoinFetchedCollection'.
-
isContainsJoinFetchedBag
public boolean isContainsJoinFetchedBag()Getter for property 'containsJoinFetchedBag', which flags whether this fetch profile contained any bag join fetches- Returns:
- Value for property 'containsJoinFetchedBag'.
-