public class CommandRemote extends Object implements CommandInterface
ALTER_INDEX_RENAME, ALTER_SCHEMA_RENAME, ALTER_SEQUENCE, ALTER_TABLE_ADD_COLUMN, ALTER_TABLE_ADD_CONSTRAINT_CHECK, ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY, ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL, ALTER_TABLE_ADD_CONSTRAINT_UNIQUE, ALTER_TABLE_ALTER_COLUMN_CHANGE_TYPE, ALTER_TABLE_ALTER_COLUMN_DEFAULT, ALTER_TABLE_ALTER_COLUMN_NOT_NULL, ALTER_TABLE_ALTER_COLUMN_NULL, ALTER_TABLE_ALTER_COLUMN_ON_UPDATE, ALTER_TABLE_ALTER_COLUMN_RENAME, ALTER_TABLE_ALTER_COLUMN_SELECTIVITY, ALTER_TABLE_ALTER_COLUMN_VISIBILITY, ALTER_TABLE_DROP_COLUMN, ALTER_TABLE_DROP_CONSTRAINT, ALTER_TABLE_RENAME, ALTER_TABLE_RENAME_CONSTRAINT, ALTER_TABLE_SET_REFERENTIAL_INTEGRITY, ALTER_USER_ADMIN, ALTER_USER_RENAME, ALTER_USER_SET_PASSWORD, ALTER_VIEW, ANALYZE, BACKUP, BEGIN, CALL, CHECKPOINT, CHECKPOINT_SYNC, COMMENT, COMMIT, COMMIT_TRANSACTION, CREATE_AGGREGATE, CREATE_ALIAS, CREATE_CONSTANT, CREATE_DOMAIN, CREATE_INDEX, CREATE_LINKED_TABLE, CREATE_ROLE, CREATE_SCHEMA, CREATE_SEQUENCE, CREATE_SYNONYM, CREATE_TABLE, CREATE_TRIGGER, CREATE_USER, CREATE_VIEW, DEALLOCATE, DELETE, DROP_AGGREGATE, DROP_ALIAS, DROP_ALL_OBJECTS, DROP_CONSTANT, DROP_DOMAIN, DROP_INDEX, DROP_ROLE, DROP_SCHEMA, DROP_SEQUENCE, DROP_SYNONYM, DROP_TABLE, DROP_TRIGGER, DROP_USER, DROP_VIEW, EXECUTE, EXPLAIN, EXPLAIN_ANALYZE, GRANT, INSERT, MERGE, NO_OPERATION, PREPARE, PREPARE_COMMIT, REPLACE, REVOKE, ROLLBACK, ROLLBACK_TO_SAVEPOINT, ROLLBACK_TRANSACTION, RUNSCRIPT, SAVEPOINT, SCRIPT, SELECT, SET, SET_AUTOCOMMIT_FALSE, SET_AUTOCOMMIT_TRUE, SHUTDOWN, SHUTDOWN_COMPACT, SHUTDOWN_DEFRAG, SHUTDOWN_IMMEDIATELY, TRUNCATE_TABLE, UNKNOWN, UPDATE
Constructor and Description |
---|
CommandRemote(SessionRemote session,
ArrayList<Transfer> transferList,
String sql,
int fetchSize) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel this current statement.
|
void |
close()
Close the statement.
|
ResultInterface |
executeQuery(int maxRows,
boolean scrollable)
Execute the query.
|
ResultWithGeneratedKeys |
executeUpdate(Object generatedKeysRequest)
Execute the statement
|
int |
getCommandType()
Get command type.
|
ResultInterface |
getMetaData()
Get an empty result set containing the meta data of the result.
|
ArrayList<ParameterInterface> |
getParameters()
Get the parameters (if any).
|
boolean |
isQuery()
Check if this is a query.
|
void |
stop()
Stop the command execution, release all locks and resources
|
String |
toString() |
public CommandRemote(SessionRemote session, ArrayList<Transfer> transferList, String sql, int fetchSize)
public void stop()
CommandInterface
stop
in interface CommandInterface
public boolean isQuery()
CommandInterface
isQuery
in interface CommandInterface
public ArrayList<ParameterInterface> getParameters()
CommandInterface
getParameters
in interface CommandInterface
public ResultInterface getMetaData()
CommandInterface
getMetaData
in interface CommandInterface
public ResultInterface executeQuery(int maxRows, boolean scrollable)
CommandInterface
executeQuery
in interface CommandInterface
maxRows
- the maximum number of rows returnedscrollable
- if the result set must be scrollablepublic ResultWithGeneratedKeys executeUpdate(Object generatedKeysRequest)
CommandInterface
executeUpdate
in interface CommandInterface
generatedKeysRequest
- false
if generated keys are not needed, true
if
generated keys should be configured automatically, int[]
to specify column indices to return generated keys from, or
String[]
to specify column names to return generated keys
frompublic void close()
CommandInterface
close
in interface CommandInterface
public void cancel()
cancel
in interface CommandInterface
public int getCommandType()
CommandInterface
getCommandType
in interface CommandInterface
Copyright © 2020 JBoss by Red Hat. All rights reserved.