Package adql.query.from
Class CrossJoin
- java.lang.Object
-
- adql.query.from.ADQLJoin
-
- adql.query.from.CrossJoin
-
- All Implemented Interfaces:
ADQLObject
,FromContent
public class CrossJoin extends ADQLJoin
Cross join.
In ADQL "T1, T2" is equivalent to "T1, T2" or to "T1 CROSS JOIN T2" in SQL.
- Version:
- 08/2011
- Author:
- Grégory Mantelet (CDS)
-
-
Field Summary
-
Fields inherited from class adql.query.from.ADQLJoin
condition, lstColumns, natural
-
-
Constructor Summary
Constructors Constructor Description CrossJoin(CrossJoin toCopy)
Builds a copy of the given CROSS join.CrossJoin(FromContent left, FromContent right)
Builds a CROSS join between the two given "tables".
-
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.void
setJoinCondition(ClauseConstraints cond)
Effect-less method: no join condition can be specified to make a CROSS join.void
setJoinedColumns(java.util.Collection<ADQLColumn> columns)
Effect-less method: no columns can be joined in a CROSS join.void
setNatural(boolean natural)
Effect-less method: a CROSS join can not be NATURAL.-
Methods inherited from class adql.query.from.ADQLJoin
addAllExcept, adqlIterator, findAtMostOneColumn, findExactlyOneColumn, getDBColumns, getJoinCondition, getJoinedColumns, getLeftTable, getName, getPosition, getRightTable, getTables, getTablesByAlias, hasJoinedColumns, isCommonColumn, isNatural, setLeftTable, setPosition, setRightTable, toADQL
-
-
-
-
Constructor Detail
-
CrossJoin
public CrossJoin(FromContent left, FromContent right)
Builds a CROSS join between the two given "tables".- Parameters:
left
- Left "table".right
- Right "table".- See Also:
ADQLJoin(FromContent, FromContent)
-
CrossJoin
public CrossJoin(CrossJoin toCopy) throws java.lang.Exception
Builds a copy of the given CROSS join.- Parameters:
toCopy
- The CROSS join to copy.- Throws:
java.lang.Exception
- If there is an error during the copy.- See Also:
ADQLJoin(ADQLJoin)
-
-
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, ...).
-
setNatural
public void setNatural(boolean natural)
Effect-less method: a CROSS join can not be NATURAL.- Overrides:
setNatural
in classADQLJoin
- Parameters:
natural
- true means this join must be natural, false else.- See Also:
ADQLJoin.setNatural(boolean)
-
setJoinCondition
public void setJoinCondition(ClauseConstraints cond)
Effect-less method: no join condition can be specified to make a CROSS join.- Overrides:
setJoinCondition
in classADQLJoin
- Parameters:
cond
- The join condition (condition following ON).- See Also:
ADQLJoin.setJoinCondition(adql.query.ClauseConstraints)
-
setJoinedColumns
public void setJoinedColumns(java.util.Collection<ADQLColumn> columns)
Effect-less method: no columns can be joined in a CROSS join.- Overrides:
setJoinedColumns
in classADQLJoin
- Parameters:
columns
- The joined columns.- See Also:
ADQLJoin.setJoinedColumns(java.util.Collection)
-
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.
-
-