Join delegates to make it "easier" to work with joins. The "easier" part is obviously
subjective ;)
Additionally JoinSequence is a directed graph of other JoinSequence instances, as represented by the
next (setNext(JoinSequence)) pointer.
JoinFragment
| Modifier and Type | Class and Description |
|---|---|
| public static class | JoinSequence.Join
Represents a join |
| public static interface | JoinSequence.Selector
A subclass join selector |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final StringBuilder | |
| private final SessionFactoryImplementor | factory
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private boolean | |
| private final List | |
| private JoinSequence | |
| private Set | |
| private String | |
| private Joinable | |
| private JoinSequence. | |
| private Set | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | JoinSequence(SessionFactoryImplementor
The SessionFactory factory)
Deprecated
as a consequence of
Constructs a JoinSequence
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public JoinSequence | Returns: this, for method chainingThe condition condition)Add a condition to this sequence. |
| public JoinSequence | Returns: this, for method chainingThe alias to apply to the columns alias, String[] The columns to add checks for columns, String The conditions to check against the columns condition)Add a condition to this sequence. |
| public JoinSequence | Returns: The Join mementoThe type of the association representing the join associationType, String The RHS alias for the join alias, JoinType The type of join (INNER, etc) joinType, String[] The LHS columns for the join condition referencingKey)Add a join to this sequence |
| public JoinSequence | Returns: The Join mementoThe type of the association representing the join associationType, String The RHS alias for the join alias, JoinType The type of join (INNER, etc) joinType, String[][] The LHS columns for the join condition referencingKeys)Add a join to this sequence |
| public JoinSequence | Returns: The Join mementoThe implied from element to embed fromElement)
Deprecated
as a consequence of
Embeds an implied from element into this sequence
ImpliedFromElement being deprecated.
|
| private void | addSubclassJoins(JoinFragment joinFragment, String alias, Joinable joinable, boolean innerJoin, boolean includeSubclassJoins, Set<String> treatAsDeclarations)
|
| public void | |
| public JoinSequence | |
| public JoinSequence | |
| public JoinSequence. | |
| public JoinSequence | Returns: The JoinSequence that represents just the FROM clause partsRetrieve a JoinSequence that represents just the FROM clause parts |
| protected Set | |
| private boolean | |
| protected boolean | |
| private boolean | |
| private boolean | |
| public boolean | |
| private boolean | |
| public JoinSequence | Returns: this, for method chainingThe next JoinSequence in the directed graph next)Sets the next join sequence |
| public void | |
| public JoinSequence | |
| public JoinSequence | Returns: this, for method chainingThe selector to apply selectorSet the Selector to use to determine how subclass joins should be applied. |
| public JoinSequence | Returns: this, for method chainingtrue indicates that theta-style joins should be used.Should this JoinSequence use theta-style joining (both a FROM and WHERE component) in the rendered SQL? |
| public JoinFragment | |
| public JoinFragment | Returns: The JoinFragmentThe filters associated with the originating session to properly define join conditions enabledFilters, boolean Should all subclass joins be added to the rendered JoinFragment? includeAllSubclassJoins)Generate a JoinFragment |
| public JoinFragment | Returns: The JoinFragmentThe filters associated with the originating session to properly define join conditions enabledFilters, boolean Should all subclass joins be added to the rendered JoinFragment? includeAllSubclassJoins, String The with clause (which represents additional join restrictions) fragment withClauseFragment)Generate a JoinFragment |
| public JoinFragment | toJoinFragment(Map<K, V> enabledFilters, boolean includeAllSubclassJoins, boolean renderSubclassJoins, String withClauseFragment)
|
| public String |
| collectionJoinSubquery | back to summary |
|---|---|
| private final boolean collectionJoinSubquery | |
| conditions | back to summary |
|---|---|
| private final StringBuilder conditions | |
| factory | back to summary |
|---|---|
| private final SessionFactoryImplementor factory
Deprecated as a consequence of | |
| isFromPart | back to summary |
|---|---|
| private boolean isFromPart | |
| joins | back to summary |
|---|---|
| private final List<JoinSequence. | |
| next | back to summary |
|---|---|
| private JoinSequence next | |
| queryReferencedTables | back to summary |
|---|---|
| private Set<String> queryReferencedTables | |
| rootAlias | back to summary |
|---|---|
| private String rootAlias | |
| rootJoinable | back to summary |
|---|---|
| private Joinable rootJoinable | |
| selector | back to summary |
|---|---|
| private JoinSequence. | |
| treatAsDeclarations | back to summary |
|---|---|
| private Set<String> treatAsDeclarations | |
| useThetaStyle | back to summary |
|---|---|
| private boolean useThetaStyle | |
| JoinSequence | back to summary |
|---|---|
| public JoinSequence(SessionFactoryImplementor factory)
Deprecated as a consequence of Constructs a JoinSequence
| |
| addCondition | back to summary |
|---|---|
| public JoinSequence addCondition(String condition) Add a condition to this sequence.
| |
| addCondition | back to summary |
|---|---|
| public JoinSequence addCondition(String alias, String[] columns, String condition) Add a condition to this sequence. Typical usage here might be:
addCondition( "a", {"c1", "c2"}, "?" )
to represent:
"... a.c1 = ? and a.c2 = ? ..."
| |
| addJoin | back to summary |
|---|---|
| public JoinSequence addJoin(AssociationType associationType, String alias, JoinType joinType, String[] referencingKey) throws MappingException Add a join to this sequence
| |
| addJoin | back to summary |
|---|---|
| public JoinSequence addJoin(AssociationType associationType, String alias, JoinType joinType, String[][] referencingKeys) throws MappingException Add a join to this sequence
| |
| addJoin | back to summary |
|---|---|
| public JoinSequence addJoin(ImpliedFromElement fromElement)
Deprecated as a consequence of Embeds an implied from element into this sequence
| |
| addSubclassJoins | back to summary |
|---|---|
| private void addSubclassJoins(JoinFragment joinFragment, String alias, Joinable joinable, boolean innerJoin, boolean includeSubclassJoins, Set<String> treatAsDeclarations) | |
| applyTreatAsDeclarations | back to summary |
|---|---|
| public void applyTreatAsDeclarations(Set<String> treatAsDeclarations) | |
| copy | back to summary |
|---|---|
| public JoinSequence copy() Create a full, although shallow, copy.
| |
| copyForCollectionProperty | back to summary |
|---|---|
| public JoinSequence copyForCollectionProperty() | |
| getFirstJoin | back to summary |
|---|---|
| public JoinSequence. | |
| getFromPart | back to summary |
|---|---|
| public JoinSequence getFromPart() Retrieve a JoinSequence that represents just the FROM clause parts
| |
| getTreatAsDeclarations | back to summary |
|---|---|
| protected Set | |
| isAliasDereferenced | back to summary |
|---|---|
| private boolean isAliasDereferenced(String withClauseFragment, String alias) | |
| isIncluded | back to summary |
|---|---|
| protected boolean isIncluded(String alias) | |
| isManyToManyRoot | back to summary |
|---|---|
private boolean isManyToManyRoot(Joinable joinable)
| |
| isSubclassAliasDereferenced | back to summary |
|---|---|
| private boolean isSubclassAliasDereferenced(JoinSequence. | |
| isThetaStyle | back to summary |
|---|---|
| public boolean isThetaStyle() | |
| needsTableGroupJoin | back to summary |
|---|---|
| private boolean needsTableGroupJoin(List<JoinSequence. | |
| setNext | back to summary |
|---|---|
| public JoinSequence setNext(JoinSequence next) Sets the next join sequence
| |
| setQueryReferencedTables | back to summary |
|---|---|
| public void setQueryReferencedTables(Set<String> queryReferencedTables) Set all tables the query refers to. It allows to optimize the query. | |
| setRoot | back to summary |
|---|---|
| public JoinSequence setRoot(Joinable joinable, String alias) Set the root of this JoinSequence. In SQL terms, this would be the driving table.
| |
| setSelector | back to summary |
|---|---|
| public JoinSequence setSelector(JoinSequence. Set the Selector to use to determine how subclass joins should be applied.
| |
| setUseThetaStyle | back to summary |
|---|---|
| public JoinSequence setUseThetaStyle(boolean useThetaStyle) Should this JoinSequence use theta-style joining (both a FROM and WHERE component) in the rendered SQL?
| |
| toJoinFragment | back to summary |
|---|---|
| public JoinFragment toJoinFragment() throws MappingException Generate a JoinFragment
| |
| toJoinFragment | back to summary |
|---|---|
| public JoinFragment toJoinFragment(Map<K, V> enabledFilters, boolean includeAllSubclassJoins) throws MappingException Generate a JoinFragment
| |
| toJoinFragment | back to summary |
|---|---|
| public JoinFragment toJoinFragment(Map<K, V> enabledFilters, boolean includeAllSubclassJoins, String withClauseFragment) throws MappingException Generate a JoinFragment
| |
| toJoinFragment | back to summary |
|---|---|
| public JoinFragment toJoinFragment(Map<K, V> enabledFilters, boolean includeAllSubclassJoins, boolean renderSubclassJoins, String withClauseFragment) throws MappingException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final AssociationType | |
| private final Joinable | |
| private final JoinType | |
| private final String[][] |
| Access | Constructor and Description |
|---|---|
| pack-priv | Join(SessionFactoryImplementor factory, AssociationType associationType, String alias, JoinType joinType, String[][] lhsColumns)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public AssociationType | |
| public Joinable | |
| public JoinType | |
| public String[][] | |
| public String |
| alias | back to summary |
|---|---|
| private final String alias | |
| associationType | back to summary |
|---|---|
| private final AssociationType associationType | |
| joinable | back to summary |
|---|---|
| private final Joinable joinable | |
| joinType | back to summary |
|---|---|
| private final JoinType joinType | |
| lhsColumns | back to summary |
|---|---|
| private final String[][] lhsColumns | |
| Join | back to summary |
|---|---|
| pack-priv Join(SessionFactoryImplementor factory, AssociationType associationType, String alias, JoinType joinType, String[][] lhsColumns) throws MappingException
Deprecated as a consequence of | |
| getAlias | back to summary |
|---|---|
| public String getAlias() | |
| getAssociationType | back to summary |
|---|---|
| public AssociationType getAssociationType() | |
| getJoinable | back to summary |
|---|---|
| public Joinable getJoinable() | |
| getJoinType | back to summary |
|---|---|
| public JoinType getJoinType() | |
| getLHSColumns | back to summary |
|---|---|
| public String[][] getLHSColumns() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the subclass joins should be includedThe alias alias)Should subclasses be included in the rendered join sequence? |
| includeSubclasses | back to summary |
|---|---|
| public boolean includeSubclasses(String alias) Should subclasses be included in the rendered join sequence?
| |