| java.lang.Object com.versant.core.jdbc.fetch.FetchSpec
FetchSpec | public class FetchSpec (Code) | | This specifies how each row from a SQL query is processed and helps to
generate the query. A FetchSpec contains a list of FetchOp's, each of
which fetch something from the ResultSet. FetchOp's may provide data
to other subsequent FetchOp's so complex operations can be broken down
into simple operations. A FetchOp may have a nested FetchSpec of its own
to be executed once for each row or in parallel with the 'parent'
FetchSpec.
|
Method Summary | |
public void | addFetchOp(FetchOp op, boolean includeInResult) Add a new FetchOp to this plan. | public FetchResult | createFetchResult(JdbcStorageManager sm, Connection con, Object[] params, boolean forUpdate, boolean forCount, long fromIncl, long toExcl, int fetchSize, boolean scrollable) Create a FetchResult to execute our query. | public Object | createRow(FetchResultImp fetchResult) Process the current row in fetchResult's ResultSet and return our
projection. | public void | fetchResultClosed(FetchResult fetchResult) This is invoked by one of our results when it is closed. | public synchronized void | generateSQL() Finish creating this spec and generate the SQL buffer for our query. | public int | getFetchOpCount() Get the number of FetchOp's in this spec. | public FetchOptions | getOptions() Get the default FetchOptions for this spec. | public int[] | getProjectionTypes() Get the types of the objects in our projection. | public SelectExp | getRoot() Get the topmost SELECT for this spec. | public SqlDriver | getSqlDriver() | public boolean | isSingleObjectRow() | public void | printPlan(PrintStream p, String indent) Print a user understandable description of this operation. | public void | setParamList(SqlBuffer.Param paramList) Set the compiled parameter info. | public void | setSingleObjectRow(boolean singleObjectRow) If singleObjectRow is true and the projection only has one Object
then this is returned as is and not in an Object[1]. |
addFetchOp | public void addFetchOp(FetchOp op, boolean includeInResult)(Code) | | Add a new FetchOp to this plan. If includeInResult is true the the
result of the op is included in the projection returned by the
FetchSpec.
|
createFetchResult | public FetchResult createFetchResult(JdbcStorageManager sm, Connection con, Object[] params, boolean forUpdate, boolean forCount, long fromIncl, long toExcl, int fetchSize, boolean scrollable)(Code) | | Create a FetchResult to execute our query. This will execute the
query as soon as the data is needed.
Parameters: forUpdate - Generate SELECT FOR UPDATE type query Parameters: forCount - Generate a COUNT(*) query to just count the rows Parameters: fromIncl - Index of first row to return Parameters: toExcl - Index of row after last row to return (-1 for all) Parameters: scrollable - Use a scrollable ResultSet See Also: FetchResultImp.execute |
createRow | public Object createRow(FetchResultImp fetchResult)(Code) | | Process the current row in fetchResult's ResultSet and return our
projection.
|
fetchResultClosed | public void fetchResultClosed(FetchResult fetchResult)(Code) | | This is invoked by one of our results when it is closed. We call
fetchResultClosed on all of our ops so they have a chance to close
any nested results.
|
generateSQL | public synchronized void generateSQL()(Code) | | Finish creating this spec and generate the SQL buffer for our query.
This is a NOP if already done.
|
getFetchOpCount | public int getFetchOpCount()(Code) | | Get the number of FetchOp's in this spec.
|
getOptions | public FetchOptions getOptions()(Code) | | Get the default FetchOptions for this spec.
|
getProjectionTypes | public int[] getProjectionTypes()(Code) | | Get the types of the objects in our projection.
|
getRoot | public SelectExp getRoot()(Code) | | Get the topmost SELECT for this spec.
|
isSingleObjectRow | public boolean isSingleObjectRow()(Code) | | |
printPlan | public void printPlan(PrintStream p, String indent)(Code) | | Print a user understandable description of this operation.
|
setSingleObjectRow | public void setSingleObjectRow(boolean singleObjectRow)(Code) | | If singleObjectRow is true and the projection only has one Object
then this is returned as is and not in an Object[1].
|
|
|