Package cz.encircled.joiner.query.join
Interface JoinGraphRegistry
- All Known Implementing Classes:
DefaultJoinGraphRegistry
public interface JoinGraphRegistry
JoinGraph allows to predefine a set of joins for a specific class that can be added to a query using
JoinerQuery.joinGraphs(String...)- Author:
- Vlad on 15-Aug-16.
-
Method Summary
Modifier and TypeMethodDescriptiongetAllJoinGraphs(Class<?> clazz) 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 Details
-
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
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
- Parameters:
clazz- target classname- join graph name- Returns:
- collection of registered join graphs
-
getAllJoinGraphs
- Parameters:
clazz- target class- Returns:
- map of all registered join graphs
-