|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSessionWrapper
public class SessionWrapper
A pure session wrapper to aid in creating session decorators by extending this class.
Field Summary | |
---|---|
protected ISession |
wrapped
|
Constructor Summary | |
---|---|
SessionWrapper(ISession wrapped)
|
Method Summary | ||
---|---|---|
void |
close(SeState state)
|
|
void |
close(SeStreamOp stream)
|
|
void |
commitTransaction()
Commits the current transaction. |
|
SeQuery |
createAndExecuteQuery(String[] propertyNames,
SeSqlConstruct sql)
|
|
SeState |
createChildState(long parentStateId)
|
|
SeDelete |
createSeDelete()
|
|
SeInsert |
createSeInsert()
|
|
SeRegistration |
createSeRegistration(String typeName)
|
|
SeTable |
createSeTable(String qualifiedName)
Creates an SeTable named qualifiedName |
|
SeUpdate |
createSeUpdate()
|
|
SeState |
createState(SeObjectId stateId)
|
|
SeColumnDefinition[] |
describe(SeTable table)
|
|
SeColumnDefinition[] |
describe(String tableName)
|
|
void |
dispose()
Return to the pool (may not close the internal connection, depends on pool settings). |
|
SdeRow |
fetch(SeQuery query)
Issues a command that fetches a row from an already executed SeQuery and returns the SdeRow object with its contents. |
|
SdeRow |
fetch(SeQuery query,
SdeRow currentRow)
|
|
String |
getDatabaseName()
|
|
SeDBMSInfo |
getDBMSInfo()
|
|
SeLayer |
getLayer(String layerName)
|
|
List<SeLayer> |
getLayers()
Returns the live list of layers, not the cached ones, so it may pick up the differences in the database. |
|
SeRasterColumn |
getRasterColumn(String rasterName)
|
|
List<String> |
getRasterColumns()
|
|
SeRelease |
getRelease()
|
|
SeTable |
getTable(String tableName)
|
|
String |
getUser()
|
|
boolean |
isClosed()
|
|
boolean |
isDisposed()
Returns whether this connection is on the connection pool domain or not. |
|
|
issue(Command<T> command)
Executes the given command and returns its result. |
|
boolean |
isTransactionActive()
Returns whether a transaction is in progress over this connection As for any other public method, this one can't be called if ISession.isDisposed() is true. |
|
void |
rollbackTransaction()
Rolls back the current transaction When this method returns it is guaranteed that ISession.isTransactionActive() will return
false, regardless of the success of the rollback operation. |
|
void |
startTransaction()
Starts a transaction over the connection held by this Session If this method succeeds, ISession.isTransactionActive() will return true afterwards
|
|
void |
testServer()
Performs a session sanity check to avoid stale connections to be returned from the pool. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ISession |
---|
equals, hashCode |
Field Detail |
---|
protected final ISession wrapped
Constructor Detail |
---|
public SessionWrapper(ISession wrapped)
Method Detail |
---|
public void testServer() throws IOException
ISession
testServer
in interface ISession
IOException
ISession.testServer()
public void close(SeState state) throws IOException
close
in interface ISession
IOException
ISession.close(com.esri.sde.sdk.client.SeState)
public void close(SeStreamOp stream) throws IOException
close
in interface ISession
IOException
ISession.close(com.esri.sde.sdk.client.SeStreamOp)
public void commitTransaction() throws IOException
ISession
This method shall only be called from inside a command
commitTransaction
in interface ISession
IOException
ISession.commitTransaction()
public SeQuery createAndExecuteQuery(String[] propertyNames, SeSqlConstruct sql) throws IOException
createAndExecuteQuery
in interface ISession
IOException
ISession.createAndExecuteQuery(java.lang.String[],
com.esri.sde.sdk.client.SeSqlConstruct)
public SeDelete createSeDelete() throws IOException
createSeDelete
in interface ISession
IOException
ISession.createSeDelete()
public SeInsert createSeInsert() throws IOException
createSeInsert
in interface ISession
IOException
ISession.createSeInsert()
public SeRegistration createSeRegistration(String typeName) throws IOException
createSeRegistration
in interface ISession
IOException
ISession.createSeRegistration(java.lang.String)
public SeTable createSeTable(String qualifiedName) throws IOException
ISession
qualifiedName; the layer does not need to exist on the server.
- Specified by:
createSeTable
in interface ISession
- Returns:
-
- Throws:
IOException
- See Also:
ISession.createSeTable(java.lang.String)
public SeUpdate createSeUpdate() throws IOException
createSeUpdate
in interface ISession
IOException
ISession.createSeUpdate()
public SeState createState(SeObjectId stateId) throws IOException
createState
in interface ISession
IOException
ISession.createState(com.esri.sde.sdk.client.SeObjectId)
public SeColumnDefinition[] describe(String tableName) throws IOException
describe
in interface ISession
IOException
ISession.describe(java.lang.String)
public SeColumnDefinition[] describe(SeTable table) throws IOException
describe
in interface ISession
IOException
ISession.describe(com.esri.sde.sdk.client.SeTable)
public void dispose() throws IllegalStateException
ISession
dispose
in interface ISession
IllegalStateException
- if dispose() is called while a transaction is in progressISession.dispose()
public SdeRow fetch(SeQuery query) throws IOException
ISession
SdeRow
object with its contents.
The point in returning an SdeRow
instead of a plain SeRow
is that the former
prefetches the row values and this can be freely used outside a Command
. Otherwise
the SeRow should only be used inside a command as accessing its values implies using the
connection.
fetch
in interface ISession
IOException
ISession.fetch(com.esri.sde.sdk.client.SeQuery)
public SdeRow fetch(SeQuery query, SdeRow currentRow) throws IOException
fetch
in interface ISession
IOException
ISession.fetch(SeQuery, SdeRow)
public String getDatabaseName() throws IOException
getDatabaseName
in interface ISession
IOException
ISession.getDatabaseName()
public SeDBMSInfo getDBMSInfo() throws IOException
getDBMSInfo
in interface ISession
IOException
ISession.getDBMSInfo()
public SeLayer getLayer(String layerName) throws IOException
getLayer
in interface ISession
IOException
ISession.getLayer(java.lang.String)
public List<SeLayer> getLayers() throws IOException
ISession
getLayers
in interface ISession
IOException
ISession.getLayers()
public SeRasterColumn getRasterColumn(String rasterName) throws IOException
getRasterColumn
in interface ISession
IOException
ISession.getRasterColumn(java.lang.String)
public List<String> getRasterColumns() throws IOException
getRasterColumns
in interface ISession
IOException
ISession.getRasterColumns()
public SeRelease getRelease() throws IOException
getRelease
in interface ISession
IOException
ISession.getRelease()
public SeTable getTable(String tableName) throws IOException
getTable
in interface ISession
IOException
ISession.getTable(java.lang.String)
public String getUser() throws IOException
getUser
in interface ISession
IOException
ISession.getUser()
public boolean isClosed()
isClosed
in interface ISession
ISession.isClosed()
public boolean isDisposed()
ISession
isDisposed
in interface ISession
true
if this connection has beed returned to the pool and thus cannot be
used, false
if its safe to keep using it.ISession.isDisposed()
public boolean isTransactionActive()
ISession
As for any other public method, this one can't be called if ISession.isDisposed()
is true.
isTransactionActive
in interface ISession
ISession.isTransactionActive()
public <T> T issue(Command<T> command) throws IOException
ISession
issue
in interface ISession
command
- the command to execute
IOException
- if an exception occurs handling any ArcSDE resource while executing the commandISession.issue(org.geotools.arcsde.session.Command)
public void rollbackTransaction() throws IOException
ISession
When this method returns it is guaranteed that ISession.isTransactionActive()
will return
false, regardless of the success of the rollback operation.
rollbackTransaction
in interface ISession
IOException
ISession.rollbackTransaction()
public void startTransaction() throws IOException
ISession
If this method succeeds, ISession.isTransactionActive()
will return true afterwards
startTransaction
in interface ISession
IOException
ISession.startTransaction()
public SeState createChildState(long parentStateId) throws IOException
createChildState
in interface ISession
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |