public class SQLBuilder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug |
protected ObjectRelationalMappingIF |
mapping |
Constructor and Description |
---|
SQLBuilder(ObjectRelationalMappingIF mapping) |
SQLBuilder(ObjectRelationalMappingIF mapping,
boolean debug) |
Modifier and Type | Method and Description |
---|---|
protected Class |
checkCompatibility(JDOValueIF value,
Class type,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected Class |
checkCompatibility(JDOValueIF value1,
JDOValueIF value2,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOCollection coll,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOField field,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOObject object,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOParameter param,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOValueIF jdovalue,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected FieldInfoIF |
getFieldInfo(JDOVariable var,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLQuery |
getFirstSQLQuery(SQLSetOperation sqlset) |
protected Class |
getIdentifiableValueType(JDOField field,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected Class |
getIdentifiableValueType(JDOValueIF jdovalue,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected String[] |
getInlineColumns(FieldInfoIF finfo) |
protected String[] |
getKeyColumns(FieldInfoIF finfo) |
protected int |
getSQLOrder(JDOOrderBy orderby) |
protected Class |
getValueType(JDOField field,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected Class |
getValueType(JDOValueIF value,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected boolean |
isAggregateParameter(String param,
JDOQuery jdoquery) |
protected boolean |
isAggregateType(Class type) |
protected boolean |
isAggregateVariable(String var,
JDOQuery jdoquery) |
protected boolean |
isIdentifiableParameter(String param,
JDOQuery jdoquery) |
protected boolean |
isIdentifiableType(Class type) |
protected boolean |
isIdentifiableValueType(JDOValueIF jdovalue,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected boolean |
isIdentifiableVariable(String var,
JDOQuery jdoquery) |
protected boolean |
isPrimitiveParameter(String param,
JDOQuery jdoquery) |
protected boolean |
isPrimitiveType(Class type) |
protected boolean |
isPrimitiveVariable(String var,
JDOQuery jdoquery) |
protected SQLExpressionIF |
makeAndExpression(List<SQLExpressionIF> expressions) |
protected SQLExpressionIF |
makeOrExpression(SQLExpressionIF[] expressions) |
SQLQuery |
makeQuery(JDOQuery jdoquery,
ObjectAccessIF oaccess) |
protected void |
produceAnd(JDOAnd and_expr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceBoolean(JDOBoolean boolean_expr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceCollection(JDOCollection coll,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceContains(JDOValueIF left,
JDOValueIF right,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceEndsWith(JDOValueIF left,
JDOValueIF right,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceEquals(JDOValueIF left,
JDOValueIF right,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceExpression(JDOExpressionIF jdoexpr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLExpressionIF[] |
produceExpressions(JDOExpressionIF[] jdoexprs,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceField(JDOField field,
SQLTable endtable,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected net.ontopia.persistence.query.sql.SQLBuilder.Values |
produceFieldValues(JDOField field,
SQLTable endtable,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceFunction(JDOFunction func,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceIsEmpty(JDOValueIF value,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceLike(JDOValueIF left,
JDOValueIF right,
boolean caseSensitive,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceLikeWithPattern(JDOValueIF left,
JDOValueIF right,
boolean caseSensitive,
List<SQLExpressionIF> expressions,
boolean starts_not_ends,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceNativeValue(JDONativeValue field,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceNot(JDONot not_expr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceNotEquals(JDOValueIF left,
JDOValueIF right,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceObject(JDOObject object,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected net.ontopia.persistence.query.sql.SQLBuilder.Values |
produceObjectFieldValues(JDOObject obj,
String[] path,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceOr(JDOOr or_expr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceParameter(JDOParameter par,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
producePrimitive(JDOPrimitive primitive,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLAggregateIF |
produceSelectSQLAggregateIF(JDOAggregateIF aggregate,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceSelectSQLValueIF(JDOValueIF value,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLSetOperation |
produceSetOperation(JDOSetOperation setop_expr,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLOrderBy |
produceSQLOrderBy(JDOOrderBy orderby,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceStartsWith(JDOValueIF left,
JDOValueIF right,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceValue(JDOValueIF value,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected void |
produceValueExpression(JDOValueExpression jdoexpr,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF[] |
produceValues(JDOValueIF[] values,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLValueIF |
produceVariable(JDOVariable var,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected net.ontopia.persistence.query.sql.SQLBuilder.Values |
produceVariableFieldValues(JDOValueIF root,
String[] path,
SQLTable endtable,
List<SQLExpressionIF> expressions,
net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info) |
protected SQLAggregateIF |
wrapAggregate(int aggtype,
SQLValueIF sqlvalue) |
protected boolean debug
protected ObjectRelationalMappingIF mapping
public SQLBuilder(ObjectRelationalMappingIF mapping)
public SQLBuilder(ObjectRelationalMappingIF mapping, boolean debug)
public SQLQuery makeQuery(JDOQuery jdoquery, ObjectAccessIF oaccess)
protected SQLQuery getFirstSQLQuery(SQLSetOperation sqlset)
protected SQLOrderBy produceSQLOrderBy(JDOOrderBy orderby, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected int getSQLOrder(JDOOrderBy orderby)
protected SQLValueIF produceSelectSQLValueIF(JDOValueIF value, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected String[] getKeyColumns(FieldInfoIF finfo)
protected String[] getInlineColumns(FieldInfoIF finfo)
protected SQLAggregateIF produceSelectSQLAggregateIF(JDOAggregateIF aggregate, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLAggregateIF wrapAggregate(int aggtype, SQLValueIF sqlvalue)
protected SQLExpressionIF makeAndExpression(List<SQLExpressionIF> expressions)
protected SQLExpressionIF makeOrExpression(SQLExpressionIF[] expressions)
protected void produceExpression(JDOExpressionIF jdoexpr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLSetOperation produceSetOperation(JDOSetOperation setop_expr, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceBoolean(JDOBoolean boolean_expr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceValueExpression(JDOValueExpression jdoexpr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceAnd(JDOAnd and_expr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceNot(JDONot not_expr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceOr(JDOOr or_expr, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLExpressionIF[] produceExpressions(JDOExpressionIF[] jdoexprs, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceEquals(JDOValueIF left, JDOValueIF right, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceNotEquals(JDOValueIF left, JDOValueIF right, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceContains(JDOValueIF left, JDOValueIF right, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceIsEmpty(JDOValueIF value, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceStartsWith(JDOValueIF left, JDOValueIF right, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceEndsWith(JDOValueIF left, JDOValueIF right, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceLike(JDOValueIF left, JDOValueIF right, boolean caseSensitive, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected void produceLikeWithPattern(JDOValueIF left, JDOValueIF right, boolean caseSensitive, List<SQLExpressionIF> expressions, boolean starts_not_ends, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF[] produceValues(JDOValueIF[] values, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceValue(JDOValueIF value, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceField(JDOField field, SQLTable endtable, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected net.ontopia.persistence.query.sql.SQLBuilder.Values produceFieldValues(JDOField field, SQLTable endtable, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected net.ontopia.persistence.query.sql.SQLBuilder.Values produceVariableFieldValues(JDOValueIF root, String[] path, SQLTable endtable, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected net.ontopia.persistence.query.sql.SQLBuilder.Values produceObjectFieldValues(JDOObject obj, String[] path, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceVariable(JDOVariable var, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceParameter(JDOParameter par, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF producePrimitive(JDOPrimitive primitive, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceNativeValue(JDONativeValue field, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceFunction(JDOFunction func, List<SQLExpressionIF> expressions, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceObject(JDOObject object, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected SQLValueIF produceCollection(JDOCollection coll, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOValueIF jdovalue, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOVariable var, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOParameter param, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOObject object, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOCollection coll, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected FieldInfoIF getFieldInfo(JDOField field, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class checkCompatibility(JDOValueIF value1, JDOValueIF value2, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class checkCompatibility(JDOValueIF value, Class type, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class getValueType(JDOValueIF value, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class getValueType(JDOField field, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected boolean isIdentifiableValueType(JDOValueIF jdovalue, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class getIdentifiableValueType(JDOValueIF jdovalue, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected Class getIdentifiableValueType(JDOField field, net.ontopia.persistence.query.sql.SQLBuilder.BuildInfo info)
protected boolean isIdentifiableType(Class type)
protected boolean isAggregateType(Class type)
protected boolean isPrimitiveType(Class type)