Top Description Fields Constructors Methods
org.apache.derby.impl.sql

public Class GenericStorablePreparedStatement

extends GenericPreparedStatement
implements Formatable, StorablePreparedStatement
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.StorablePreparedStatement, org.apache.derby.iapi.sql.execute.ExecPreparedStatement, org.apache.derby.iapi.sql.PreparedStatement, org.apache.derby.iapi.sql.depend.Dependent, org.apache.derby.catalog.Dependable, 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.monitor.ModuleFactory, .Monitor, .Monitor, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.catalog.UUID, org.apache.derby.iapi.services.uuid.UUIDFactory, org.apache.derby.iapi.util.ByteArray, org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.iapi.sql.Activation, .ResultColumnDescriptor, .ResultDescription, .ResultSet, .PreparedStatement, .Statement, .StorablePreparedStatement, org.apache.derby.iapi.sql.execute.ConstantAction, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.loader.GeneratedClass, .ClassFactory, .ClassFactory, .GeneratedClass, .GeneratedMethod, org.apache.derby.iapi.services.context.Context, .ContextService, org.apache.derby.iapi.services.io.StoredFormatIds, .FormatIdUtil, .Formatable, org.apache.derby.shared.common.util.ArrayUtil, java.sql.Timestamp, java.io.ObjectOutput, .ObjectInput, .IOException

Prepared statement that can be made persistent.

Field Summary

Modifier and TypeField and Description
private ByteArray
private String
Inherited from org.apache.derby.impl.sql.GenericPreparedStatement:
activationClassbeginCompileTimestampbindTimecompileTimeendCompileTimestampexecutionConstantsgenerateTimeinvalidatedWhileCompilingisAtomicisValidoptimizeTimeparamTypeDescriptorsparseTimerequiredPermissionsListresultDescsavedObjectssourceTxtspsActionstatementtargetTableupdateColumnsupdateModeUUIDStringUUIDValue

Constructor Summary

AccessConstructor and Description
public
GenericStorablePreparedStatement()

Niladic constructor, for formatable only.

pack-priv

Method Summary

Modifier and TypeMethod and Description
public GeneratedClass

Returns:

the generated class, or null if the class cannot be loaded
getActivationClass
()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.getActivationClass.

Implements org.apache.derby.iapi.sql.execute.ExecPreparedStatement.getActivationClass.

Get and load the activation class.

pack-priv ByteArray

Returns:

the byte code saver
getByteCodeSaver
()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.getByteCodeSaver.

Get our byte code array.

private static Context
getContext(final String contextID)

Must be private so that user code can't call this entry point.

public int

Returns:

the formatID of this class
getTypeFormatId
()

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

Get the formatID which corresponds to this class.

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

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

pack-priv void
public String
toString()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.toString.

Returns a string representation of the object.

public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.apache.derby.impl.sql.GenericPreparedStatement:
beginCompilingcompleteCompileendCompilingexecuteexecuteSubStatementexecuteSubStatementfinishgetActivationgetBeginCompileTimestampgetBindTimeInMillisgetClassTypegetClonegetCompileTimeInMillisgetCompileTimeWarningsgetConstantActiongetCursorInfogetDependableFindergetEndCompileTimestampgetGenerateTimeInMillisgetInitialRowCountgetObjectIDgetObjectNamegetOptimizeTimeInMillisgetParameterTypegetParameterTypesgetParseTimeInMillisgetRequiredPermissionsListgetResultDescriptiongetSavedObjectgetSavedObjectsgetSourcegetSPSNamegetStalePlanCheckIntervalgetTargetTablegetUpdateModegetVersionCounterhasUpdateColumnsincrementExecutionCountincrementVersionCounterisAtomicisCompilingisPersistentisUpdateColumnisValidmakeInvalidneedsSavepointprepareToInvalidatereferencesSessionSchemareferencesSessionSchemarePreparerePreparesetCacheHoldersetCompileTimeMillissetCompileTimeWarningssetConstantActionsetCursorInfosetExecuteStatementNameAndSchemasetIsAtomicsetNeedsSavepointsetRequiredPermissionsListsetSavedObjectssetSourcesetSPSActionsetSPSNamesetStalePlanCheckIntervalsetValidupToDateupToDate

Field Detail

byteCodeback to summary
private ByteArray byteCode
classNameback to summary
private String className

Constructor Detail

GenericStorablePreparedStatementback to summary
public GenericStorablePreparedStatement()

Niladic constructor, for formatable only.

GenericStorablePreparedStatementback to summary
pack-priv GenericStorablePreparedStatement(Statement stmt)

Method Detail

getActivationClassback to summary
public GeneratedClass getActivationClass() throws StandardException

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.getActivationClass.

Implements org.apache.derby.iapi.sql.execute.ExecPreparedStatement.getActivationClass.

Get and load the activation class. Will always return a loaded/valid class or null if the class cannot be loaded.

Returns:GeneratedClass

the generated class, or null if the class cannot be loaded

Exceptions
StandardException:
on error
getByteCodeSaverback to summary
pack-priv ByteArray getByteCodeSaver()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.getByteCodeSaver.

Get our byte code array. Used by others to save off our byte code for us.

Returns:ByteArray

the byte code saver

getContextback to summary
private static Context getContext(final String contextID)

Must be private so that user code can't call this entry point.

getTypeFormatIdback to summary
public int getTypeFormatId()

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

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

isStorableback to summary
public boolean isStorable()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.isStorable.

loadGeneratedClassback to summary
public void loadGeneratedClass() throws StandardException

Implements org.apache.derby.iapi.sql.StorablePreparedStatement.loadGeneratedClass.

Load up the class from the saved bytes.

Exceptions
StandardException:
on error
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Parameters
in:ObjectInput

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

Exceptions
IOException:
on error
ClassNotFoundException:
on error
See Also
java.io.Externalizable#readExternal
setActivationClassback to summary
pack-priv void setActivationClass(GeneratedClass ac)

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.setActivationClass.

toStringback to summary
public String toString()

Overrides org.apache.derby.impl.sql.GenericPreparedStatement.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Parameters
out:ObjectOutput

the stream to write the object to

Exceptions
IOException:
on error