|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tonbeller.wcf.param.SqlGenerator
Field Summary | |
static java.lang.String |
DEFAULT_COLUMN_ID
if no columnId is set in an SqlExpr use this string to look up the column name |
Constructor Summary | |
SqlGenerator()
|
|
SqlGenerator(java.util.Map columnMap)
|
|
SqlGenerator(java.lang.String defaultColumn)
|
Method Summary | |
protected boolean |
containsNull(java.lang.Object[] values)
|
protected SqlGenerator |
copyGenerator()
returns a new SqlGenerator that shares the same settings as this. |
void |
genAndOr(com.tonbeller.wcf.param.SqlExprWithOperands exp,
java.lang.String keyword)
|
java.lang.String |
generate(SqlExpr sqlExpr)
generates SQL string from expression |
protected java.lang.String |
generateList(java.lang.Object[] values)
|
protected java.lang.String |
generateOpd(SqlExpr opd)
generates SQL for opd in a new SqlGenerator |
java.util.Map |
getColumnMap()
maps columnIds to column names. |
protected java.lang.String |
getColumnName(SqlColumnConstraint scc)
|
protected java.lang.Object[] |
removeNulls(java.lang.Object[] values)
|
void |
setColumnMap(java.util.Map columnMap)
maps columnIds to column names. |
void |
visitSqlAndExpr(SqlAndExpr exp)
|
void |
visitSqlBetweenExpr(SqlBetweenExpr exp)
|
void |
visitSqlDummyExpr(SqlDummyExpr exp)
|
void |
visitSqlEqualExpr(SqlEqualExpr exp)
|
void |
visitSqlInExpr(SqlInExpr exp)
|
void |
visitSqlOrExpr(SqlOrExpr exp)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_COLUMN_ID
Constructor Detail |
public SqlGenerator()
public SqlGenerator(java.lang.String defaultColumn)
defaultColumn
- the name of the generated column if no column id is present in the SqlExprpublic SqlGenerator(java.util.Map columnMap)
Method Detail |
protected SqlGenerator copyGenerator()
protected java.lang.String generateOpd(SqlExpr opd)
protected java.lang.String getColumnName(SqlColumnConstraint scc)
public void genAndOr(com.tonbeller.wcf.param.SqlExprWithOperands exp, java.lang.String keyword)
public void visitSqlAndExpr(SqlAndExpr exp)
visitSqlAndExpr
in interface SqlExprVisitor
public void visitSqlOrExpr(SqlOrExpr exp)
visitSqlOrExpr
in interface SqlExprVisitor
public void visitSqlBetweenExpr(SqlBetweenExpr exp)
visitSqlBetweenExpr
in interface SqlExprVisitor
public void visitSqlEqualExpr(SqlEqualExpr exp)
visitSqlEqualExpr
in interface SqlExprVisitor
public void visitSqlDummyExpr(SqlDummyExpr exp)
visitSqlDummyExpr
in interface SqlExprVisitor
public void visitSqlInExpr(SqlInExpr exp)
visitSqlInExpr
in interface SqlExprVisitor
protected java.lang.String generateList(java.lang.Object[] values)
protected java.lang.Object[] removeNulls(java.lang.Object[] values)
protected boolean containsNull(java.lang.Object[] values)
public java.lang.String generate(SqlExpr sqlExpr)
public java.util.Map getColumnMap()
public void setColumnMap(java.util.Map columnMap)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |