Package adql.query.from
Class OuterJoin
- java.lang.Object
-
- adql.query.from.ADQLJoin
-
- adql.query.from.OuterJoin
-
- All Implemented Interfaces:
ADQLObject
,FromContent
- Direct Known Subclasses:
SQLServer_OuterJoin
public class OuterJoin extends ADQLJoin
Inner join.
Possible syntaxes:
- T1 (LEFT|RIGHT|FULL) OUTER JOIN T2 ON <condition>
- T1 (LEFT|RIGHT|FULL) OUTER JOIN T2 USING(<columns list>)
- T1 NATURAL (LEFT|RIGHT|FULL) OUTER JOIN T2
- Version:
- 08/2011
- Author:
- Grégory Mantelet (CDS)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OuterJoin.OuterType
All OUTER JOIN type: left, right and full.
-
Field Summary
-
Fields inherited from class adql.query.from.ADQLJoin
condition, lstColumns, natural
-
-
Constructor Summary
Constructors Constructor Description OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type)
Builds a NATURAL OUTER join between the two given "tables".OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, ClauseConstraints condition)
Builds an OUTER join between the two given "tables" with the given condition.OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, java.util.Collection<ADQLColumn> lstColumns)
Builds an OUTER join between the two given "tables" with a list of columns to join.OuterJoin(OuterJoin toCopy)
Builds a copy of the given OUTER join.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ADQLObject
getCopy()
Gets a (deep) copy of this ADQL object.java.lang.String
getJoinType()
Gets the type of this join.OuterJoin.OuterType
getType()
Gets the OUTER join type (left, right or full).void
setType(OuterJoin.OuterType type)
Sets the OUTER join type (left, right or full).-
Methods inherited from class adql.query.from.ADQLJoin
addAllExcept, adqlIterator, findAtMostOneColumn, findExactlyOneColumn, getDBColumns, getJoinCondition, getJoinedColumns, getLeftTable, getName, getPosition, getRightTable, getTables, getTablesByAlias, hasJoinedColumns, isCommonColumn, isNatural, setJoinCondition, setJoinedColumns, setLeftTable, setNatural, setPosition, setRightTable, toADQL
-
-
-
-
Constructor Detail
-
OuterJoin
public OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type)
Builds a NATURAL OUTER join between the two given "tables".- Parameters:
left
- Left "table".right
- Right "table".type
- OUTER join type (left, right or full).- See Also:
ADQLJoin(FromContent, FromContent)
,ADQLJoin.setNatural(boolean)
,setType(OuterType)
-
OuterJoin
public OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, ClauseConstraints condition)
Builds an OUTER join between the two given "tables" with the given condition.- Parameters:
left
- Left "table".right
- Right "table".type
- Outer join type (left, right or full).condition
- Join condition.- See Also:
ADQLJoin(FromContent, FromContent)
,ADQLJoin.setJoinCondition(ClauseConstraints)
,setType(OuterType)
-
OuterJoin
public OuterJoin(FromContent left, FromContent right, OuterJoin.OuterType type, java.util.Collection<ADQLColumn> lstColumns)
Builds an OUTER join between the two given "tables" with a list of columns to join.- Parameters:
left
- Left "table".right
- Right "table".type
- Outer join type.lstColumns
- List of columns to join.- See Also:
ADQLJoin(FromContent, FromContent)
,ADQLJoin.setJoinedColumns(Collection)
,setType(OuterType)
-
OuterJoin
public OuterJoin(OuterJoin toCopy) throws java.lang.Exception
Builds a copy of the given OUTER join.- Parameters:
toCopy
- The OUTER join to copy.- Throws:
java.lang.Exception
- If there is an error during the copy.- See Also:
ADQLJoin(ADQLJoin)
,setType(OuterType)
-
-
Method Detail
-
getJoinType
public java.lang.String getJoinType()
Description copied from class:ADQLJoin
Gets the type of this join.- Specified by:
getJoinType
in classADQLJoin
- Returns:
- Its join type (i.e. CROSS JOIN, LEFT JOIN, LEFT OUTER JOIN, ...).
-
getType
public final OuterJoin.OuterType getType()
Gets the OUTER join type (left, right or full).- Returns:
- Its OUTER join type.
-
setType
public void setType(OuterJoin.OuterType type)
Sets the OUTER join type (left, right or full).- Parameters:
type
- Its new OUTER join type.
-
getCopy
public ADQLObject getCopy() throws java.lang.Exception
Description copied from interface:ADQLObject
Gets a (deep) copy of this ADQL object.- Specified by:
getCopy
in interfaceADQLObject
- Specified by:
getCopy
in classADQLJoin
- Returns:
- The copy of this ADQL object.
- Throws:
java.lang.Exception
- If there is any error during the copy.
-
-