|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.mguennewig.pobjects.EvalContext
public abstract class EvalContext
Internal class to convert the internal term expressions into SQL statements.
Query,
Term| Field Summary | |
|---|---|
static java.lang.String |
TABLE_PREFIX
|
| Constructor Summary | |
|---|---|
EvalContext(int numColumns,
int dbCapabilities,
java.lang.String schema)
Creates a new evaluation context. |
|
| Method Summary | |
|---|---|
abstract void |
addOrderBy(de.mguennewig.pobjects.Query.OrderByExpr orderBy)
|
abstract void |
addResult(TableRef tr,
Column col)
|
TableRef |
addTableExpr(TableExpr table)
|
void |
addTableExprColumns(TableRef tr,
TableExpr te)
|
abstract void |
addWhereConj(Term term)
|
TableRef |
deref(TableRef tr,
ClassDecl cd,
boolean isExtension)
|
abstract TableRef |
deref(TableRef tr,
ClassDecl te,
Column c,
boolean join)
|
TableRef |
deref(TableRef tr,
Column column)
|
CommandDecl |
getCommand()
|
boolean |
getForCount()
|
int |
getLimit()
Returns the current result set limit. |
int |
getNumColumns()
|
int |
getOffset()
Returns the current offset within the result set. |
abstract java.util.List<?> |
getOrderBy()
|
java.lang.String |
getSchema()
|
java.lang.String |
getSqlType(Type type)
Returns the SQL type name for the given type. |
int |
getSupportedJoins()
Returns the supported outer joins. |
TableRef |
getTableExpr(int index)
|
abstract java.util.List<?> |
getWhereList()
|
boolean |
isDistinct()
|
static boolean |
requiresOuterJoin(Column column)
Returns whether an outer join is required for the reference column. |
ColumnReference |
resolveSelector(int baseColumn,
Column... selector)
|
abstract java.lang.String |
restoreState(EvalState s,
Term conj)
|
void |
setCommand(CommandDecl cmd)
|
void |
setDistinct(boolean distinct)
|
void |
setForCount(boolean forCount)
|
void |
setLimit(int limit)
Sets an upper limit of rows returned by the result set. |
void |
setOffset(int offset)
Sets the number of results that should be skipped for the result set. |
EvalState |
storeState()
|
boolean |
supportsBoolean()
Tests whether the database supports booleans natively. |
boolean |
supportsInherits()
Tests whether the INHERITS concept is supported. |
boolean |
supportsLimitOffset()
Tests whether the keywords LIMIT and OFFSET are
supported by the database to limit the result set. |
boolean |
supportsOracleJoin()
Tests whether the Oracle join style is supported. |
boolean |
supportsSQL99Join()
Tests whether joins after SQL99 are supported. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TABLE_PREFIX
| Constructor Detail |
|---|
public EvalContext(int numColumns,
int dbCapabilities,
java.lang.String schema)
| Method Detail |
|---|
public final boolean supportsBoolean()
Container.SUPPORTS_BOOLEANpublic final boolean supportsInherits()
INHERITS concept is supported.
Container.SUPPORTS_INHERITSpublic final boolean supportsLimitOffset()
LIMIT and OFFSET are
supported by the database to limit the result set.
public final boolean supportsOracleJoin()
Container.SUPPORTS_ORACLE_JOINpublic final boolean supportsSQL99Join()
Container.SUPPORTS_SQL99_JOINpublic final int getSupportedJoins()
Container.SUPPORTS_JOINpublic final java.lang.String getSchema()
public final int getNumColumns()
public abstract java.util.List<?> getOrderBy()
public abstract java.util.List<?> getWhereList()
public final boolean isDistinct()
public void setDistinct(boolean distinct)
public final CommandDecl getCommand()
public void setCommand(CommandDecl cmd)
public final TableRef getTableExpr(int index)
public TableRef addTableExpr(TableExpr table)
public abstract void addResult(TableRef tr,
Column col)
public void addTableExprColumns(TableRef tr,
TableExpr te)
public abstract void addWhereConj(Term term)
public abstract void addOrderBy(de.mguennewig.pobjects.Query.OrderByExpr orderBy)
public final int getLimit()
A limit of a result set can be used together with an
offset to implement paging.
A limit of 1 can be used for existence tests.
public void setLimit(int limit)
java.lang.IllegalStateException - if an offset is to be set but no limit is
set or no predictable order is specified.addOrderBy(Query.OrderByExpr),
getOffset()public final int getOffset()
getLimit()public void setOffset(int offset)
A negative or zero offset value disables the skipping of results.
NOTE: If set to a value greater zero you must also
specify a limit.
java.lang.IllegalStateException - if an offset is to be set but no limit is
set.getLimit()public final boolean getForCount()
public void setForCount(boolean forCount)
public EvalState storeState()
public abstract java.lang.String restoreState(EvalState s,
Term conj)
public java.lang.String getSqlType(Type type)
java.lang.UnsupportedOperationException - if the type class is not supported.Cast
public ColumnReference resolveSelector(int baseColumn,
Column... selector)
public final TableRef deref(TableRef tr,
Column column)
public static boolean requiresOuterJoin(Column column)
public final TableRef deref(TableRef tr,
ClassDecl cd,
boolean isExtension)
public abstract TableRef deref(TableRef tr,
ClassDecl te,
Column c,
boolean join)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||