Package com.j_spaces.jdbc
Class CreateTableQuery
java.lang.Object
com.j_spaces.jdbc.CreateTableQuery
- All Implemented Interfaces:
Query
This class handles the CREATE TABLE logic.
- Author:
- Michael Mitrani, 2Train4, 2004
-
Constructor Summary
ConstructorsConstructorDescriptionCreateTableQuery(String tableName, ITypeDesc typeDesc, boolean[] extraIndices) -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()booleanGets whether this query contains sub queries.executeOnSpace(ISpaceProxy space, Transaction txn) The main logic method, execute the query on the space by calling snapshotGets the routing field name for the created table.booleanGets whether this query is forced to be executed under transaction.booleanvoidsetColumnNames(String[] columnNames) voidsetColumnTypes(String[] columnTypes) voidsetIndices(boolean[] indices) voidsetRoutingFieldName(String routingFieldName) Sets the routing field name for the created table.voidsetSecurityInterceptor(SecurityInterceptor securityInterceptor) voidsetSession(QuerySession session) voidsetTableName(String table) 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
-
CreateTableQuery
public CreateTableQuery() -
CreateTableQuery
-
-
Method Details
-
setRoutingFieldName
Sets the routing field name for the created table. -
getRoutingFieldName
Gets the routing field name for the created table. -
setTableName
-
setSession
- Specified by:
setSessionin interfaceQuery
-
getSession
-
executeOnSpace
The main logic method, execute the query on the space by calling snapshot- 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.
-
setColumnNames
-
setColumnTypes
-
setIndices
public void setIndices(boolean[] indices) -
setSecurityInterceptor
- Specified by:
setSecurityInterceptorin interfaceQuery
-
getSecurityInterceptor
- Returns:
- the securityInterceptor
-
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
-