public interface CommandContext
Modifier and Type | Method and Description |
---|---|
void |
addListener(CommandListener listener)
Add a listener for command events
|
void |
addWarning(Exception ex)
Add an exception as a warning.
|
Map<String,DataPolicy> |
getAllowedDataPolicies()
Get the user's data policies, never null
|
Serializable |
getCommandPayload()
Get the current command payload
|
TeiidConnection |
getConnection()
Gets a connection to the current session.
|
String |
getConnectionId()
Get the connection id
|
String |
getConnectionID()
Deprecated.
|
GeneratedKeys |
getGeneratedKeys()
Returns the last set of generated keys or null if no keys have been generated.
|
double |
getNextRand()
Get the next random double value
|
double |
getNextRand(long seed)
Sets the seed value and returns the next random double value.
|
int |
getProcessorBatchSize()
Get the processor batch size set on the BufferManager
|
String |
getRequestId()
Get the current request id
|
long |
getReuseCount()
Get the number of times this command has been reused.
|
TimeZone |
getServerTimeZone()
Get the server
TimeZone |
Session |
getSession()
Get the current session
|
Object |
getSessionVariable(String key)
Get the session variable
|
Subject |
getSubject()
Get the current subject
|
String |
getUserName()
Get the current user name, which will just be the base user name
and not include the security domain.
|
VDB |
getVdb()
Get the current vdb
|
ClassLoader |
getVDBClassLoader()
Get class loader for VDB.
|
String |
getVdbName()
Get the current vdb name
|
String |
getVdbVersion()
Get the current vdb version
|
boolean |
isContinuous() |
boolean |
isReturnAutoGeneratedKeys()
Whether to return the keys generated by an insert.
|
void |
removeListener(CommandListener listener)
Add a listener for command events
|
GeneratedKeys |
returnGeneratedKeys(String[] columnNames,
Class<?>[] columnDataTypes)
Creates a holder for generated keys.
|
Object |
setSessionVariable(String key,
Object value)
Set the session variable and return the old value if any
|
String getUserName()
getSession()
- Session.getSecurityDomain()
String getVdbName()
String getVdbVersion()
String getConnectionId()
String getConnectionID()
getConnectionId()
double getNextRand()
double getNextRand(long seed)
getNextRand()
will be based upon the seed value.seed
- int getProcessorBatchSize()
Subject getSubject()
Session getSession()
Serializable getCommandPayload()
String getRequestId()
Map<String,DataPolicy> getAllowedDataPolicies()
VDB getVdb()
void addListener(CommandListener listener)
listener
- void removeListener(CommandListener listener)
listener
- long getReuseCount()
isContinuous()
ClassLoader getVDBClassLoader()
void addWarning(Exception ex)
TeiidSQLWarning
for the client.
The warnings can be consumed through the Statement.getWarnings()
method.ex
- boolean isContinuous()
boolean isReturnAutoGeneratedKeys()
GeneratedKeys returnGeneratedKeys(String[] columnNames, Class<?>[] columnDataTypes)
columnNames
- columnDataTypes
- GeneratedKeys getGeneratedKeys()
Object setSessionVariable(String key, Object value)
key
- value
- Object getSessionVariable(String key)
key
- TeiidConnection getConnection() throws TeiidSQLException
TeiidSQLException
Copyright © 2018 JBoss by Red Hat. All rights reserved.