Class CreateTableQuery

java.lang.Object
com.j_spaces.jdbc.CreateTableQuery
All Implemented Interfaces:
Query

public class CreateTableQuery extends Object implements Query
This class handles the CREATE TABLE logic.
Author:
Michael Mitrani, 2Train4, 2004
  • Constructor Details

    • CreateTableQuery

      public CreateTableQuery()
    • CreateTableQuery

      public CreateTableQuery(String tableName, ITypeDesc typeDesc, boolean[] extraIndices)
  • Method Details

    • setRoutingFieldName

      public void setRoutingFieldName(String routingFieldName)
      Sets the routing field name for the created table.
    • getRoutingFieldName

      public String getRoutingFieldName()
      Gets the routing field name for the created table.
    • setTableName

      public void setTableName(String table)
    • setSession

      public void setSession(QuerySession session)
      Specified by:
      setSession in interface Query
    • getSession

      public QuerySession getSession()
    • executeOnSpace

      public ResponsePacket executeOnSpace(ISpaceProxy space, Transaction txn) throws SQLException
      The main logic method, execute the query on the space by calling snapshot
      Specified by:
      executeOnSpace in interface Query
      Throws:
      SQLException
    • validateQuery

      public void validateQuery(ISpaceProxy space) throws SQLException
      Description copied from interface: Query
      Each 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:
      validateQuery in interface Query
      Throws:
      SQLException
    • build

      public void build() throws SQLException
      Specified by:
      build in interface Query
      Throws:
      SQLException
    • isPrepared

      public boolean isPrepared()
      Specified by:
      isPrepared in interface Query
      Returns:
      isPrepared is this a PreparedStatment or not.
    • setColumnNames

      public void setColumnNames(String[] columnNames)
    • setColumnTypes

      public void setColumnTypes(String[] columnTypes)
    • setIndices

      public void setIndices(boolean[] indices)
    • setSecurityInterceptor

      public void setSecurityInterceptor(SecurityInterceptor securityInterceptor)
      Specified by:
      setSecurityInterceptor in interface Query
    • getSecurityInterceptor

      public SecurityInterceptor getSecurityInterceptor()
      Returns:
      the securityInterceptor
    • isForceUnderTransaction

      public boolean isForceUnderTransaction()
      Description copied from interface: Query
      Gets whether this query is forced to be executed under transaction.
      Specified by:
      isForceUnderTransaction in interface Query
    • containsSubQueries

      public boolean containsSubQueries()
      Description copied from interface: Query
      Gets whether this query contains sub queries.
      Specified by:
      containsSubQueries in interface Query