public class DefaultDbSqlContext extends Object implements DbSqlContext
| Constructor and Description |
|---|
DefaultDbSqlContext(SqlTreeAlias alias,
String tableAliasPlaceHolder)
Construct for FROM clause (no column alias used).
|
DefaultDbSqlContext(SqlTreeAlias alias,
String tableAliasPlaceHolder,
String columnAliasPrefix,
boolean alwaysUseColumnAlias)
Construct for SELECT clause (with column alias settings).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEncryptedProp(BeanProperty p)
Add an encrypted property which will require additional binding.
|
void |
addJoin(String type,
String table,
TableJoinColumn[] cols,
String a1,
String a2,
String inheritance)
Add a join to the sql query.
|
DefaultDbSqlContext |
append(char s)
Append a char directly to the SQL buffer.
|
DefaultDbSqlContext |
append(String s)
Append a string directly to the SQL buffer.
|
void |
appendColumn(String column)
Append a column with the current table alias.
|
void |
appendColumn(String tableAlias,
String column)
Append a column with an explicit table alias.
|
void |
appendFormulaJoin(String sqlFormulaJoin,
boolean forceOuterJoin)
Append a Sql Formula join.
|
void |
appendFormulaSelect(String sqlFormulaSelect)
Append a Sql Formula select.
|
void |
appendRawColumn(String rawcolumnWithTableAlias)
Add a raw column to the sql.
|
String |
getContent()
Return the current context of the sql context.
|
BeanProperty[] |
getEncryptedProps()
Return a list of encrypted properties which require additional binding.
|
String |
getRelativePrefix(String propName) |
String |
getTableAlias(String prefix)
Return a table alias without many where clause joins.
|
String |
getTableAliasManyWhere(String prefix)
Return a table alias that takes into account many where joins.
|
int |
length()
Return the current content length.
|
String |
peekJoin()
Return the current join node.
|
String |
peekTableAlias()
Peek the current table alias.
|
void |
popJoin()
Pop a join node off the stack.
|
void |
popTableAlias()
Pop the current table alias from the stack.
|
void |
pushJoin(String node)
Push a join node onto the stack.
|
void |
pushSecondaryTableAlias(String alias) |
void |
pushTableAlias(String prefix)
Push the current table alias onto the stack.
|
String |
toString() |
public DefaultDbSqlContext(SqlTreeAlias alias, String tableAliasPlaceHolder)
public DefaultDbSqlContext(SqlTreeAlias alias, String tableAliasPlaceHolder, String columnAliasPrefix, boolean alwaysUseColumnAlias)
public void addEncryptedProp(BeanProperty p)
DbSqlContextaddEncryptedProp in interface DbSqlContextpublic BeanProperty[] getEncryptedProps()
DbSqlContextgetEncryptedProps in interface DbSqlContextpublic String peekJoin()
DbSqlContextpeekJoin in interface DbSqlContextpublic void popJoin()
DbSqlContextpopJoin in interface DbSqlContextpublic void pushJoin(String node)
DbSqlContextpushJoin in interface DbSqlContextpublic void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2, String inheritance)
DbSqlContextaddJoin in interface DbSqlContextpublic String getTableAlias(String prefix)
DbSqlContextgetTableAlias in interface DbSqlContextpublic String getTableAliasManyWhere(String prefix)
DbSqlContextgetTableAliasManyWhere in interface DbSqlContextpublic void pushSecondaryTableAlias(String alias)
pushSecondaryTableAlias in interface DbSqlContextpublic String getRelativePrefix(String propName)
getRelativePrefix in interface DbSqlContextpublic void pushTableAlias(String prefix)
DbSqlContextpushTableAlias in interface DbSqlContextpublic void popTableAlias()
DbSqlContextpopTableAlias in interface DbSqlContextpublic DefaultDbSqlContext append(String s)
DbSqlContextappend in interface DbSqlContextpublic DefaultDbSqlContext append(char s)
DbSqlContextappend in interface DbSqlContextpublic void appendFormulaJoin(String sqlFormulaJoin, boolean forceOuterJoin)
DbSqlContextappendFormulaJoin in interface DbSqlContextpublic void appendFormulaSelect(String sqlFormulaSelect)
DbSqlContextappendFormulaSelect in interface DbSqlContextpublic void appendColumn(String column)
DbSqlContextappendColumn in interface DbSqlContextpublic void appendColumn(String tableAlias, String column)
DbSqlContextappendColumn in interface DbSqlContextpublic String peekTableAlias()
DbSqlContextpeekTableAlias in interface DbSqlContextpublic void appendRawColumn(String rawcolumnWithTableAlias)
DbSqlContextappendRawColumn in interface DbSqlContextpublic int length()
DbSqlContextlength in interface DbSqlContextpublic String getContent()
DbSqlContextgetContent in interface DbSqlContextCopyright © 2014. All Rights Reserved.