Class AnyToAny.FastLinkLoader<S extends BasicItem,T extends BasicItem>

java.lang.Object
net.sf.basedb.core.AnyToAny.FastLinkLoader<S,T>
Enclosing class:
AnyToAny

public static class AnyToAny.FastLinkLoader<S extends BasicItem,T extends BasicItem> extends Object
Helper class for faster loading of any-to-any links between items. A single instance have a fixed source item type, link name and target item type. Before the loader can be used at least one of the preload() methods should be used.
Since:
3.19.8
  • Field Details

  • Constructor Details

  • Method Details

    • preloadAll

      public AnyToAny.FastLinkLoader<S,T> preloadAll()
      Pre-load all links between source and target item type with the given link name.
      Returns:
      This instance
    • preload

      public AnyToAny.FastLinkLoader<S,T> preload(Restriction linkRestriction, Restriction targetRestriction)
      Pre-load links between source and target item type with the given link name and optionally extra restrictions for the any-to-any link and/or the target item type.
      Returns:
      This instance
    • getFromType

      public Item getFromType()
      The source item type.
    • getToType

      public Item getToType()
      The target item type.
    • getLinkName

      public String getLinkName()
      The link name.
    • size

      public int size()
      Number of items that matches.
    • getLink

      public AnyToAny getLink(S item)
      Get the any-to-any link.
    • getTo

      public T getTo(S item)
      Get the target item that is linked from the source item by the named link.