Top Constructors Methods
org.apache.derby.impl.store.access.conglomerate

public final Class TemplateRow

extends Object
Class Inheritance
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.util.ArrayUtil, org.apache.derby.iapi.services.io.Storable, .FormatableBitSet, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.RowUtil, org.apache.derby.iapi.store.raw.Transaction, org.apache.derby.iapi.types.DataValueDescriptor, .DataValueFactory, .SQLLongint

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static DataValueDescriptor[]
allocate_objects(Transaction rawtran, int
The number of columns to allocate for array.
num_cols_to_allocate
,
FormatableBitSet
description of partial set of columns to built as described in RowUtil. If null do all the columns.
column_list
,
int[]
An array of format ids representing every column in the table. column_list describes which of these columns to populate into the columns array.
format_ids
,
int[] collation_ids)

Allocate new objects to array based on format id's and column_list.

public static boolean

Returns:

boolean indicating if template matches format id's
checkColumnTypes
(DataValueFactory dvf, int[]
array of format ids which are the types of cols in row
format_ids
,
int[] collation_ids, DataValueDescriptor[]
the array of columns that make up the row.
row
)

Check that columns in the row conform to a set of format id's, both in number and type.

public static DataValueDescriptor[]

Returns:

The new row.
newBranchRow
(Transaction rawtran, int[]
an array of format id's, one per column in row.
format_ids
,
int[] collation_ids, DataValueDescriptor
The object to place in the last column of the template.
page_ptr
)

Generate an "empty" row to match the format id + coluumn specification.

public static DataValueDescriptor[]

Returns:

The new row.
newRow
(DataValueDescriptor[]
An array which represents a row as described in RowUtil.
template
)

Generate an "empty" row to match the format id specification.

public static DataValueDescriptor[]

Returns:

The new row.
newRow
(Transaction rawtran, FormatableBitSet column_list, int[]
an array of format id's, one per column in row.
format_ids
,
int[] collation_ids)

Generate an "empty" row to match the format id specification.

public static DataValueDescriptor[]
newU8Row(int nkeys)

Constuctor for creating a template row which stores n SQLLongint's

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TemplateRowback to summary
private TemplateRow()

Method Detail

allocate_objectsback to summary
private static DataValueDescriptor[] allocate_objects(Transaction rawtran, int num_cols_to_allocate, FormatableBitSet column_list, int[] format_ids, int[] collation_ids) throws StandardException

Allocate new objects to array based on format id's and column_list.

Parameters
num_cols_to_allocate:int

The number of columns to allocate for array.

column_list:FormatableBitSet

description of partial set of columns to built as described in RowUtil. If null do all the columns.

format_ids:int[]

An array of format ids representing every column in the table. column_list describes which of these columns to populate into the columns array.

Exceptions
StandardException:
Standard exception policy.
checkColumnTypesback to summary
public static boolean checkColumnTypes(DataValueFactory dvf, int[] format_ids, int[] collation_ids, DataValueDescriptor[] row) throws StandardException

Check that columns in the row conform to a set of format id's, both in number and type.

Parameters
format_ids:int[]

array of format ids which are the types of cols in row

row:DataValueDescriptor[]

the array of columns that make up the row.

Returns:boolean

boolean indicating if template matches format id's

Exceptions
StandardException:
Standard exception policy.
newBranchRowback to summary
public static DataValueDescriptor[] newBranchRow(Transaction rawtran, int[] format_ids, int[] collation_ids, DataValueDescriptor page_ptr) throws StandardException

Generate an "empty" row to match the format id + coluumn specification.

Generate an array of new'd objects matching the format id specification passed in, and the column passed in. The new row is first made up of columns matching the format ids, and then followed by one other column matching the column passed in. This routine is mostly used by the btree code to generate temporary branch rows needed during operations like split.

Parameters
format_ids:int[]

an array of format id's, one per column in row.

page_ptr:DataValueDescriptor

The object to place in the last column of the template.

Returns:DataValueDescriptor[]

The new row.

Exceptions
StandardException:
Standard exception policy.
newRowback to summary
public static DataValueDescriptor[] newRow(DataValueDescriptor[] template) throws StandardException

Generate an "empty" row to match the format id specification.

Generate an array of new'd objects matching the format id specification passed in. This routine is mostly used by the btree code to generate temporary rows needed during operations like split. It is more efficient to allocate new objects based on the old object vs. calling the Monitor.

Parameters
template:DataValueDescriptor[]

An array which represents a row as described in RowUtil.

Returns:DataValueDescriptor[]

The new row.

Exceptions
StandardException:
Standard exception policy.
See Also
RowUtil
newRowback to summary
public static DataValueDescriptor[] newRow(Transaction rawtran, FormatableBitSet column_list, int[] format_ids, int[] collation_ids) throws StandardException

Generate an "empty" row to match the format id specification.

Generate an array of new'd objects matching the format id specification passed in. This routine is mostly used by the btree code to generate temporary rows needed during operations like split.

Parameters
format_ids:int[]

an array of format id's, one per column in row.

Returns:DataValueDescriptor[]

The new row.

Exceptions
StandardException:
Standard exception policy.
newU8Rowback to summary
public static DataValueDescriptor[] newU8Row(int nkeys)

Constuctor for creating a template row which stores n SQLLongint's