public abstract class Expression extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
alias
The expression alias if applicable.
|
protected boolean |
enclosed
True if the expression is to be enclosed in parenthesis.
|
protected List<Join> |
joins
The list of joins, if applicable.
|
protected String |
ordering
The string that specified the ordering if applicable.
|
protected PdbProperties |
properties
The PDB properties.
|
protected boolean |
quotes
True if the expression is to be put around quotes.
|
protected AbstractTranslator |
translator
The abstract translator.
|
protected boolean |
withNoLock
The SQL Server's no lock keyword.
|
Constructor and Description |
---|
Expression() |
Modifier and Type | Method and Description |
---|---|
Expression |
alias(String alias)
Aliases this expression.
|
Expression |
asc()
Sets ordering to ascendant.
|
Expression |
desc()
Sets ordering to descendant.
|
Expression |
enclose()
Encloses this expression with parenthesis.
|
Expression |
fullOuterJoin(Expression table,
Expression expr)
Sets a full outer join with the current table.
|
String |
getAlias()
Gets the alias.
|
List<Join> |
getJoins()
Gets the join list.
|
String |
getOrdering()
Gets the ordering.
|
Expression |
innerJoin(Expression table,
Expression expr)
Sets an inner join with the current table.
|
boolean |
isAliased()
Checks if this expression is to be aliased.
|
boolean |
isEnclosed()
Checks if this expression is to be enclosed in parenthesis.
|
boolean |
isQuote()
Checks if this expression is to be quoted.
|
boolean |
isQuotes()
Checks if this expression is to be translated with quotes.
|
boolean |
isWithNoLock()
Checks if this expression (TABLES) is with no lock.
|
Expression |
leftOuterJoin(Expression table,
Expression expr)
Sets a left outer join with the current table.
|
Expression |
rightOuterJoin(Expression table,
Expression expr)
Sets a right outer join with the current table.
|
abstract String |
translate()
Translates the expression.
|
Expression |
unquote()
Removes the quotes for this expression.
|
Expression |
withNoLock()
Sets no lock keyword on SQL Server tables.
|
@Inject protected AbstractTranslator translator
@Inject protected PdbProperties properties
protected String alias
protected boolean enclosed
protected boolean quotes
protected String ordering
protected boolean withNoLock
public abstract String translate()
public Expression alias(String alias)
alias
- The alias.public Expression unquote()
public Expression enclose()
public Expression asc()
public Expression desc()
public boolean isEnclosed()
true
if this expression is enclosed, false
otherwise.public boolean isQuote()
true
if this expression is quoted, false
otherwise.public boolean isAliased()
true
if this expression is aliased, false
otherwise.public Expression innerJoin(Expression table, Expression expr)
table
- The table to join.expr
- The expressions to join.public Expression leftOuterJoin(Expression table, Expression expr)
table
- The table to join.expr
- The expressions to join.public Expression rightOuterJoin(Expression table, Expression expr)
table
- The table to join.expr
- The expressions to join.public Expression fullOuterJoin(Expression table, Expression expr)
table
- The table to join.expr
- The expressions to join.public Expression withNoLock()
public boolean isWithNoLock()
true
if this expression (TABLE) is with no lock, false
otherwise.public String getOrdering()
public boolean isQuotes()
true
if this expression is to be translated with quotes, false
otherwise.public String getAlias()
null
if not applicable.Copyright © 2014 Feedzai. All Rights Reserved.