Class FetchProfile


  • public class FetchProfile
    extends java.lang.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

      Nested Classes 
      Modifier and Type Class Description
      static class  FetchProfile.Fetch
      Defines an individual association fetch within the given profile.
    • Constructor Summary

      Constructors 
      Constructor Description
      FetchProfile​(java.lang.String name, MetadataSource source)
      Create a fetch profile representation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFetch​(java.lang.String entity, java.lang.String association, java.lang.String style)
      Adds a fetch to this profile.
      boolean equals​(java.lang.Object o)  
      java.util.LinkedHashSet<FetchProfile.Fetch> getFetches()
      Retrieve the fetches associated with this profile
      java.lang.String getName()
      Retrieve the name of the fetch profile.
      MetadataSource getSource()
      Retrieve the fetch profile source.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FetchProfile

        public FetchProfile​(java.lang.String name,
                            MetadataSource source)
        Create a fetch profile representation.
        Parameters:
        name - The name of the fetch profile.
        source - The source of the fetch profile (where was it defined).
    • Method Detail

      • getName

        public java.lang.String getName()
        Retrieve the name of the fetch profile.
        Returns:
        The profile name
      • getSource

        public MetadataSource getSource()
        Retrieve the fetch profile source.
        Returns:
        The profile source.
      • getFetches

        public java.util.LinkedHashSet<FetchProfile.Fetch> getFetches()
        Retrieve the fetches associated with this profile
        Returns:
        The fetches associated with this profile.
      • addFetch

        public void addFetch​(java.lang.String entity,
                             java.lang.String association,
                             java.lang.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 to apply
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object