Class Union
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.dml.Expression
-
- com.feedzai.commons.sql.abstraction.dml.Union
-
- All Implemented Interfaces:
Serializable
public class Union extends Expression
The union clause.- Since:
- 2.4.0
- Author:
- Francisco Santos (francisco.santos@feedzai.com)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, enclosed, joins, ordering, properties, quotes, translator, withNoLock
-
-
Constructor Summary
Constructors Constructor Description Union(Expression... expressions)Creates a new UNION expression.Union(Collection<Expression> expressions)Creates a new UNION expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Unionall()Sets this UNION to UNION ALL.List<Expression>getExpressions()Gets the expressions to union.booleanisAll()Returns true if this is an UNION ALL expression, false otherwise.Stringtranslate()Translates the expression.-
Methods inherited from class com.feedzai.commons.sql.abstraction.dml.Expression
alias, asc, desc, enclose, fullOuterJoin, getAlias, getJoins, getOrdering, innerJoin, isAliased, isEnclosed, isQuote, isQuotes, isWithNoLock, leftOuterJoin, rightOuterJoin, unquote, withNoLock
-
-
-
-
Constructor Detail
-
Union
public Union(Collection<Expression> expressions)
Creates a new UNION expression.- Parameters:
expressions- expressions to union.
-
Union
public Union(Expression... expressions)
Creates a new UNION expression.- Parameters:
expressions- expressions to union.
-
-
Method Detail
-
all
public Union all()
Sets this UNION to UNION ALL.- Returns:
- this UNION ALL.
-
getExpressions
public List<Expression> getExpressions()
Gets the expressions to union.- Returns:
- the expressions to union.
-
isAll
public boolean isAll()
Returns true if this is an UNION ALL expression, false otherwise.- Returns:
- true if this is an UNION ALL expression, false otherwise.
-
translate
public String translate()
Description copied from class:ExpressionTranslates the expression.- Specified by:
translatein classExpression- Returns:
- A translation of the implementing expression.
-
-