Package cz.encircled.joiner.query.join
Interface JoinGraphRegistry
-
- All Known Implementing Classes:
DefaultJoinGraphRegistry
public interface JoinGraphRegistryJoinGraph allows to predefine a set of joins for a specific class that can be added to a query usingJoinerQuery.joinGraphs(String...)- Author:
- Vlad on 15-Aug-16.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<Object,List<JoinDescription>>getAllJoinGraphs(Class<?> clazz)List<JoinDescription>getJoinGraph(Class<?> clazz, Object name)voidregisterJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)Adds new join graph to the registry.voidregisterOrReplaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)Adds new join graph to the registry or replace an existing one.voidreplaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)Replace an existing join graph with a new one
-
-
-
Method Detail
-
registerJoinGraph
void registerJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)
Adds new join graph to the registry.- Parameters:
graphName- graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.joins- associated joinsrootClasses- target class for a new join graph
-
replaceJoinGraph
void replaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)
Replace an existing join graph with a new one- Parameters:
graphName- graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.joins- associated joinsrootClasses- target class for a new join graph
-
registerOrReplaceJoinGraph
void registerOrReplaceJoinGraph(Object graphName, Collection<JoinDescription> joins, Class<?>... rootClasses)
Adds new join graph to the registry or replace an existing one.- Parameters:
graphName- graph unique name. Generally, any object may be used as a name, it should have correct hashCode method. String or enum is recommended.joins- associated joinsrootClasses- target class for a new join graph
-
getJoinGraph
List<JoinDescription> getJoinGraph(Class<?> clazz, Object name)
- Parameters:
clazz- target classname- join graph name- Returns:
- collection of registered join graphs
-
getAllJoinGraphs
Map<Object,List<JoinDescription>> getAllJoinGraphs(Class<?> clazz)
- Parameters:
clazz- target class- Returns:
- map of all registered join graphs
-
-