org.apache.derby.impl.store.access.conglomerate
Class OpenConglomerateScratchSpace

java.lang.Object
  extended byorg.apache.derby.impl.store.access.conglomerate.OpenConglomerateScratchSpace
All Implemented Interfaces:
DynamicCompiledOpenConglomInfo

public class OpenConglomerateScratchSpace
extends java.lang.Object
implements DynamicCompiledOpenConglomInfo

A utility class to store and use temporary scratch space associated with a conglomerate.


Field Summary
private  int[] format_ids
          A complete array of format id's for this conglomerate.
private  InstanceGetter[] row_for_export_class_template
           
private  FormatableBitSet row_for_export_column_list
          A template of info about the classes in the returned row.
private  DataValueDescriptor[] scratch_row
          A Scratch row used for qualifying rows in the conglomerate.
private  DataValueDescriptor[] scratch_template
          A Scratch template used for searching and qualifying rows in the conglomerate.
 
Constructor Summary
OpenConglomerateScratchSpace(int[] format_ids)
          Constructors for This class:
 
Method Summary
 DataValueDescriptor[] get_row_for_export()
          Return an empty template (possibly partial) row to be given back to a client.
 DataValueDescriptor[] get_scratch_row()
          Return an empty template (possibly partial) row to be used and reused internally for processing.
 DataValueDescriptor[] get_template()
          Return a complete empty row.
 void init(FormatableBitSet export_column_list)
          Initialize scratch space for reuse by possibly different template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

row_for_export_column_list

private FormatableBitSet row_for_export_column_list
A template of info about the classes in the returned row.

This template is allocated on demand, and is used to efficiently create new rows for export from this class. This variable is for use by get_row_for_export().


row_for_export_class_template

private InstanceGetter[] row_for_export_class_template

scratch_template

private DataValueDescriptor[] scratch_template
A Scratch template used for searching and qualifying rows in the conglomerate. This is a full template, independent of the FormatableBitSet used for access.


scratch_row

private DataValueDescriptor[] scratch_row
A Scratch row used for qualifying rows in the conglomerate. This is a row which matches the FormatableBitSet of rows being returned.


format_ids

private int[] format_ids
A complete array of format id's for this conglomerate.

Constructor Detail

OpenConglomerateScratchSpace

public OpenConglomerateScratchSpace(int[] format_ids)
Constructors for This class:

Method Detail

get_row_for_export

public DataValueDescriptor[] get_row_for_export()
                                         throws StandardException
Return an empty template (possibly partial) row to be given back to a client.

The main use of this is for fetchSet() and fetchNextGroup() which allocate rows and then give them back entirely to the caller.

Returns:
The row to use.
Throws:
StandardException - Standard exception policy.

get_scratch_row

public DataValueDescriptor[] get_scratch_row()
                                      throws StandardException
Return an empty template (possibly partial) row to be used and reused internally for processing.

The main use of this is for qualifying rows where a row has not been provided by the client. This routine cache's a single row for reuse by the caller, if the caller needs 2 concurrent scratch rows, some other mechanism must be used.

Returns:
The row to use.
Throws:
StandardException - Standard exception policy.

get_template

public DataValueDescriptor[] get_template()
                                   throws StandardException
Return a complete empty row.

The main use of this is for searching a tree where a complete copy of the row is needed for searching.

Returns:
The template to use.
Throws:
StandardException - Standard exception policy.

init

public void init(FormatableBitSet export_column_list)
Initialize scratch space for reuse by possibly different template.

Some data is only valid per statement.


Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.