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

pack-priv Class BinaryOrderableWrapper

extends Object
implements Storable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.io.Storable, org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.iapi.services.io.ArrayInputStream, .Storable, .TypedFormat, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.store.access.BinaryOrderable, java.io.ObjectOutput, .ObjectInput, .IOException

The BinaryOrderableWrapper is a wrapper class which intercepts the readExternal() callback made by raw store during a fetch, and does a comparison instead.

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv BinaryOrderable
pack-priv BinaryOrderable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The identifier to be used to open the conglomerate later.
getCmpResult
()

Short one line description of routine.

public int
getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get a universally unique identifier for the type of this object.

protected void
init(BinaryOrderable
The object that this object is wrapping (ie. being read from disk)
ref_object
,
BinaryOrderable
The object to compare ref_object to.
other_object
)

Short one line description of routine.

public boolean
isNull()

Implements org.apache.derby.iapi.services.io.Storable.isNull.

Return whether the value is null or not.

public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

Restore the in-memory representation from the stream.

public void
public void
restoreToNull()

Implements org.apache.derby.iapi.services.io.Storable.restoreToNull.

Restore the in-memory representation to the null value.

public void
writeExternal(ObjectOutput
Stream to write the object to.
out
)

Implements java.io.Externalizable.writeExternal.

Store the stored representation of the column value in the stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cmp_resultback to summary
pack-priv int cmp_result
other_objectback to summary
pack-priv BinaryOrderable other_object
ref_objectback to summary
pack-priv BinaryOrderable ref_object

Constructor Detail

BinaryOrderableWrapperback to summary
pack-priv BinaryOrderableWrapper()

Method Detail

getCmpResultback to summary
public int getCmpResult()

Short one line description of routine.

Longer descrption of routine.

Returns:int

The identifier to be used to open the conglomerate later.

getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get a universally unique identifier for the type of this object.

Returns:int

The identifier. (A UUID stuffed in an array of 16 bytes).

initback to summary
protected void init(BinaryOrderable ref_object, BinaryOrderable other_object)

Short one line description of routine.

Longer descrption of routine.

Parameters
ref_object:BinaryOrderable

The object that this object is wrapping (ie. being read from disk)

other_object:BinaryOrderable

The object to compare ref_object to.

isNullback to summary
public boolean isNull()

Implements org.apache.derby.iapi.services.io.Storable.isNull.

Return whether the value is null or not. The containerid being zero is what determines nullness; subclasses are not expected to override this method.

Returns:boolean

Doc from org.apache.derby.iapi.services.io.Storable.isNull.

true if the value is null and false otherwise.

See Also
org.apache.derby.iapi.services.io.Storable#isNull
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Restore the in-memory representation from the stream.

Parameters
in:ObjectInput

Doc from java.io.Externalizable.readExternal.

the stream to read data from in order to restore the object

Exceptions
IOException:
thrown by readObject()
ClassNotFoundException:
Thrown if the stored representation is serialized and a class named in the stream could not be found.
See Also
java.io.Externalizable#readExternal
readExternalFromArrayback to summary
public void readExternalFromArray(ArrayInputStream in) throws IOException, ClassNotFoundException
restoreToNullback to summary
public void restoreToNull()

Implements org.apache.derby.iapi.services.io.Storable.restoreToNull.

Restore the in-memory representation to the null value. The containerid being zero is what determines nullness; subclasses are not expected to override this method.

See Also
org.apache.derby.iapi.services.io.Storable#restoreToNull
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Store the stored representation of the column value in the stream.

A BinaryOrderableWrapper is never used to store data out, only to read data from disk and compare it to another byte stream.

Parameters
out:ObjectOutput

Stream to write the object to.

Exceptions
IOException:
thrown by writeObject()