ajax.wrappers
Class WrapperManager

java.lang.Object
  |
  +--ajax.wrappers.WrapperManager

public class WrapperManager
extends java.lang.Object


Field Summary
static int FILE_TABLE
           
static int JDBC_TABLE
           
 
Method Summary
 void close()
          closes all statements used by WrapperManager
 boolean close(java.lang.String tableName)
          closes a wrapper
 void createTable(java.lang.String createQuery, int type)
          Create a table with query and type given in argument.
 int executeInJdbcUpdate(java.lang.String query)
          force execution of an update in jdbc.
 java.sql.ResultSet executeQuery(java.lang.String query)
          Execute a SQL query.
 int executeUpdate(java.lang.String sql)
          Execute a sql update
static WrapperManager getWrapperManager()
          Get unique instance.
static void main(java.lang.String[] args)
           
 void openTable(java.lang.String tableName, int type)
          Open an existing table.
 Wrapper wrapper(java.lang.String tableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDBC_TABLE

public static final int JDBC_TABLE

FILE_TABLE

public static final int FILE_TABLE
Method Detail

wrapper

public Wrapper wrapper(java.lang.String tableName)

getWrapperManager

public static WrapperManager getWrapperManager()
Get unique instance.
Returns:
the intance of WrapperManager

createTable

public void createTable(java.lang.String createQuery,
                        int type)
                 throws WrapperException
Create a table with query and type given in argument.
Wanring: metadata are not save for file tables.
Parameters:
createQuery - SQL CREATE query
type - type of table

openTable

public void openTable(java.lang.String tableName,
                      int type)
               throws WrapperException
Open an existing table.
Parameters:
tableName - table name (file or jdbc)
type - type of table

executeInJdbcUpdate

public int executeInJdbcUpdate(java.lang.String query)
                        throws java.sql.SQLException
force execution of an update in jdbc.
Parameters:
query - SQL update
See Also:
Statement.executeUpdate(String)

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String query)
                                throws java.sql.SQLException
Execute a SQL query.
Parameters:
query - SQL SELECT query
Returns:
the result

executeUpdate

public int executeUpdate(java.lang.String sql)
                  throws WrapperException
Execute a sql update
Parameters:
sql - SQL INSERT query
Returns:
either the row count for INSERT, UPDATE or DELETE or 0 for SQL statements that return nothing.
See Also:
Statement.executeUpdate(String)

close

public void close()
           throws WrapperException
closes all statements used by WrapperManager

close

public boolean close(java.lang.String tableName)
              throws java.sql.SQLException
closes a wrapper
Parameters:
tableName - name of wrapper (so table name)
See Also:
Wrapper.close()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception