|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.arcsde.session.SessionWrapper
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(java.lang.String[] propertyNames,
SeSqlConstruct sql)
|
|
SeState |
createChildState(long parentStateId)
|
|
SeDelete |
createSeDelete()
|
|
SeInsert |
createSeInsert()
|
|
SeRegistration |
createSeRegistration(java.lang.String typeName)
|
|
SeTable |
createSeTable(java.lang.String qualifiedName)
Creates an SeTable named qualifiedName |
|
SeUpdate |
createSeUpdate()
|
|
SeState |
createState(SeObjectId stateId)
|
|
SeColumnDefinition[] |
describe(SeTable table)
|
|
SeColumnDefinition[] |
describe(java.lang.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)
|
|
java.lang.String |
getDatabaseName()
|
|
SeDBMSInfo |
getDBMSInfo()
|
|
SeLayer |
getLayer(java.lang.String layerName)
|
|
java.util.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(java.lang.String rasterName)
|
|
java.util.List<java.lang.String> |
getRasterColumns()
|
|
SeRelease |
getRelease()
|
|
SeTable |
getTable(java.lang.String tableName)
|
|
java.lang.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 |
|
void |
rollbackTransaction()
Rolls back the current transaction |
|
void |
startTransaction()
Starts a transaction over the connection held by this Session |
|
void |
testServer()
Performs a session sanity check to avoid stale connections to be returned from the pool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.arcsde.session.ISession |
---|
equals, hashCode |
Field Detail |
---|
protected final ISession wrapped
Constructor Detail |
---|
public SessionWrapper(ISession wrapped)
Method Detail |
---|
public void testServer() throws java.io.IOException
ISession
testServer
in interface ISession
java.io.IOException
ISession.testServer()
public void close(SeState state) throws java.io.IOException
close
in interface ISession
java.io.IOException
ISession.close(com.esri.sde.sdk.client.SeState)
public void close(SeStreamOp stream) throws java.io.IOException
close
in interface ISession
java.io.IOException
ISession.close(com.esri.sde.sdk.client.SeStreamOp)
public void commitTransaction() throws java.io.IOException
ISession
This method shall only be called from inside a command
commitTransaction
in interface ISession
java.io.IOException
ISession.commitTransaction()
public SeQuery createAndExecuteQuery(java.lang.String[] propertyNames, SeSqlConstruct sql) throws java.io.IOException
createAndExecuteQuery
in interface ISession
java.io.IOException
ISession.createAndExecuteQuery(java.lang.String[],
com.esri.sde.sdk.client.SeSqlConstruct)
public SeDelete createSeDelete() throws java.io.IOException
createSeDelete
in interface ISession
java.io.IOException
ISession.createSeDelete()
public SeInsert createSeInsert() throws java.io.IOException
createSeInsert
in interface ISession
java.io.IOException
ISession.createSeInsert()
public SeRegistration createSeRegistration(java.lang.String typeName) throws java.io.IOException
createSeRegistration
in interface ISession
java.io.IOException
ISession.createSeRegistration(java.lang.String)
public SeTable createSeTable(java.lang.String qualifiedName) throws java.io.IOException
ISession
qualifiedName; the layer does not need to exist on the server.
- Specified by:
createSeTable
in interface ISession
- Returns:
-
- Throws:
java.io.IOException
- See Also:
ISession.createSeTable(java.lang.String)
public SeUpdate createSeUpdate() throws java.io.IOException
createSeUpdate
in interface ISession
java.io.IOException
ISession.createSeUpdate()
public SeState createState(SeObjectId stateId) throws java.io.IOException
createState
in interface ISession
java.io.IOException
ISession.createState(com.esri.sde.sdk.client.SeObjectId)
public SeColumnDefinition[] describe(java.lang.String tableName) throws java.io.IOException
describe
in interface ISession
java.io.IOException
ISession.describe(java.lang.String)
public SeColumnDefinition[] describe(SeTable table) throws java.io.IOException
describe
in interface ISession
java.io.IOException
ISession.describe(com.esri.sde.sdk.client.SeTable)
public void dispose() throws java.lang.IllegalStateException
ISession
dispose
in interface ISession
java.lang.IllegalStateException
- if dispose() is called while a transaction is in progressISession.dispose()
public SdeRow fetch(SeQuery query) throws java.io.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
java.io.IOException
ISession.fetch(com.esri.sde.sdk.client.SeQuery)
public SdeRow fetch(SeQuery query, SdeRow currentRow) throws java.io.IOException
fetch
in interface ISession
java.io.IOException
ISession.fetch(SeQuery, SdeRow)
public java.lang.String getDatabaseName() throws java.io.IOException
getDatabaseName
in interface ISession
java.io.IOException
ISession.getDatabaseName()
public SeDBMSInfo getDBMSInfo() throws java.io.IOException
getDBMSInfo
in interface ISession
java.io.IOException
ISession.getDBMSInfo()
public SeLayer getLayer(java.lang.String layerName) throws java.io.IOException
getLayer
in interface ISession
java.io.IOException
ISession.getLayer(java.lang.String)
public java.util.List<SeLayer> getLayers() throws java.io.IOException
ISession
getLayers
in interface ISession
java.io.IOException
ISession.getLayers()
public SeRasterColumn getRasterColumn(java.lang.String rasterName) throws java.io.IOException
getRasterColumn
in interface ISession
java.io.IOException
ISession.getRasterColumn(java.lang.String)
public java.util.List<java.lang.String> getRasterColumns() throws java.io.IOException
getRasterColumns
in interface ISession
java.io.IOException
ISession.getRasterColumns()
public SeRelease getRelease() throws java.io.IOException
getRelease
in interface ISession
java.io.IOException
ISession.getRelease()
public SeTable getTable(java.lang.String tableName) throws java.io.IOException
getTable
in interface ISession
java.io.IOException
ISession.getTable(java.lang.String)
public java.lang.String getUser() throws java.io.IOException
getUser
in interface ISession
java.io.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 java.io.IOException
ISession
issue
in interface ISession
command
- the command to execute
java.io.IOException
- if an exception occurs handling any ArcSDE resource while executing the commandISession.issue(org.geotools.arcsde.session.Command)
public void rollbackTransaction() throws java.io.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
java.io.IOException
ISession.rollbackTransaction()
public void startTransaction() throws java.io.IOException
ISession
If this method succeeds, ISession.isTransactionActive()
will return true afterwards
startTransaction
in interface ISession
java.io.IOException
ISession.startTransaction()
public SeState createChildState(long parentStateId) throws java.io.IOException
createChildState
in interface ISession
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |