Package net.sf.basedb.core
Class AnyToAny.FastLinkLoader<S extends BasicItem,T extends BasicItem>
java.lang.Object
net.sf.basedb.core.AnyToAny.FastLinkLoader<S,T>
- Enclosing class:
- AnyToAny
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe source item type.Get the any-to-any link.The link name.Get the target item that is linked from the source item by the named link.The target item type.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.Pre-load all links between source and target item type with the given link name.int
size()
Number of items that matches.
-
Field Details
-
dc
-
fromType
-
toType
-
linkName
-
links
-
targets
-
-
Constructor Details
-
FastLinkLoader
-
-
Method Details
-
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
The source item type. -
getToType
The target item type. -
getLinkName
The link name. -
size
public int size()Number of items that matches. -
getLink
Get the any-to-any link. -
getTo
Get the target item that is linked from the source item by the named link.
-