Package com.j_spaces.jdbc
Class CommitQuery
java.lang.Object
com.j_spaces.jdbc.CommitQuery
- All Implemented Interfaces:
Query
This class handles the COMMIT or ROLLBACK logic. basically it just calls commit or rollback on
the given transaction if it exists.
- Author:
- Michael Mitrani, 2Train4, 2004
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()booleanGets whether this query contains sub queries.executeOnSpace(ISpaceProxy space, Transaction txn) Will execute this query on the space and return a ResponsePacketbooleanisCommit()booleanGets whether this query is forced to be executed under transaction.booleanbooleanvoidsetSecurityInterceptor(SecurityInterceptor securityInterceptor) voidsetSession(QuerySession session) voidvalidateQuery(ISpaceProxy space) Each query should have its own specific validations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.j_spaces.jdbc.Query
validateQuery
-
Constructor Details
-
CommitQuery
public CommitQuery(boolean isCommit) - Parameters:
isCommit- - true for COMMIT, false for ROLLBACK
-
-
Method Details
-
isCommit
public boolean isCommit() -
isRollback
public boolean isRollback() -
getSession
-
setSession
- Specified by:
setSessionin interfaceQuery
-
executeOnSpace
Description copied from interface:QueryWill execute this query on the space and return a ResponsePacket- Specified by:
executeOnSpacein interfaceQuery- Throws:
SQLException
-
validateQuery
Description copied from interface:QueryEach query should have its own specific validations. this is the place to do them. if some validation fail, an SQLException will be thrown.- Specified by:
validateQueryin interfaceQuery- Throws:
SQLException
-
build
- Specified by:
buildin interfaceQuery- Throws:
SQLException
-
isPrepared
public boolean isPrepared()- Specified by:
isPreparedin interfaceQuery- Returns:
- isPrepared is this a PreparedStatment or not.
-
setSecurityInterceptor
- Specified by:
setSecurityInterceptorin interfaceQuery
-
isForceUnderTransaction
public boolean isForceUnderTransaction()Description copied from interface:QueryGets whether this query is forced to be executed under transaction.- Specified by:
isForceUnderTransactionin interfaceQuery
-
containsSubQueries
public boolean containsSubQueries()Description copied from interface:QueryGets whether this query contains sub queries.- Specified by:
containsSubQueriesin interfaceQuery
-