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

pack-priv Class PiggyBackedSessionData

extends Object
Class Inheritance
Imports
java.sql.SQLException, org.apache.derby.iapi.jdbc.EngineConnection

Tracks the most recently piggy-backed session attributes, and provides methods to determine if they have been modified and need to be re-sent to the client.

Field Summary

Modifier and TypeField and Description
private final EngineConnection
private int
private boolean
private String
private boolean

Constructor Summary

AccessConstructor and Description
private
PiggyBackedSessionData(EngineConnection
the connection to obtain data from
conn
)

Constructs a new instance with an associated EngineConnection.

Method Summary

Modifier and TypeMethod and Description
public static PiggyBackedSessionData

Returns:

a reference to the PBSD object or null
getInstance
(PiggyBackedSessionData
the PBSD object from the previous piggybacking or null if none has yet taken place
existing
,
EngineConnection
the current EngineConnection
conn
,
boolean
if true; create the instance when needed
createOnDemand
)

Get a reference (handle) to the PiggyBackedSessionData object.

public int

Returns:

the saved jdbc isolation level
getIso
()

public String

Returns:

the saved schema name
getSchema
()

public boolean

Returns:

true if the isolation level was modified by the last call to fetchLatest
isIsoModified
()

public boolean

Returns:

true if any piggy-backed session attribute was modified by the last call to fetchLatest
isModified
()

public boolean

Returns:

true if the current schema name was modified by the last call to fetchLatest
isSchemaModified
()

public void
refresh()

Refresh with the latest session attribute values from the connection.

public void
setUnmodified()

Clear the modified status.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

conn_back to summary
private final EngineConnection conn_
iso_back to summary
private int iso_
isoMod_back to summary
private boolean isoMod_
schema_back to summary
private String schema_
schemaMod_back to summary
private boolean schemaMod_

Constructor Detail

PiggyBackedSessionDataback to summary
private PiggyBackedSessionData(EngineConnection conn)

Constructs a new instance with an associated EngineConnection. A newly constructed instance is invalid. refresh() must be called before the xModified() methods can be used.

Parameters
conn:EngineConnection

the connection to obtain data from

Method Detail

getInstanceback to summary
public static PiggyBackedSessionData getInstance(PiggyBackedSessionData existing, EngineConnection conn, boolean createOnDemand) throws SQLException

Get a reference (handle) to the PiggyBackedSessionData object. Null will be returned either if the conn argument is not valid, or if the createOnDemand argument is false and the existing argument is null.

Parameters
existing:PiggyBackedSessionData

the PBSD object from the previous piggybacking or null if none has yet taken place

conn:EngineConnection

the current EngineConnection

createOnDemand:boolean

if true; create the instance when needed

Returns:PiggyBackedSessionData

a reference to the PBSD object or null

getIsoback to summary
public int getIso()
Returns:int

the saved jdbc isolation level

getSchemaback to summary
public String getSchema()
Returns:String

the saved schema name

isIsoModifiedback to summary
public boolean isIsoModified()
Returns:boolean

true if the isolation level was modified by the last call to fetchLatest

isModifiedback to summary
public boolean isModified()
Returns:boolean

true if any piggy-backed session attribute was modified by the last call to fetchLatest

isSchemaModifiedback to summary
public boolean isSchemaModified()
Returns:boolean

true if the current schema name was modified by the last call to fetchLatest

refreshback to summary
public void refresh() throws SQLException

Refresh with the latest session attribute values from the connection. Any changes will be reflected in the corresponding xModified() methods, until setUnmodified() is called.

setUnmodifiedback to summary
public void setUnmodified()

Clear the modified status. Called after session attributes have been sent to the client so that the xModified methods will return false.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.