com.onewebsql.query.adapter
Class HSQLDB2Adapter

java.lang.Object
  extended by com.onewebsql.query.adapter.BaseDBAdapter
      extended by com.onewebsql.query.adapter.HSQLDB2Adapter
All Implemented Interfaces:
DBAdapter

public class HSQLDB2Adapter
extends BaseDBAdapter

Implementation of DBAdapter interface for the HSQLDB 2 database.


Field Summary
static String DUMMY_VALUES_EXPRESSION
          Constant used in the method getNextId(String, String, DataSource).
 
Fields inherited from class com.onewebsql.query.adapter.BaseDBAdapter
DEFAULT_VALUE_LIST_PARAMETER_HANDLER, LOB_BURST_SIZE, NEXT_VALUE_FOR, SEQUENCE_ROW_HANDLER
 
Constructor Summary
HSQLDB2Adapter()
          Constructor.
 
Method Summary
 Long getNextId(String sequenceName, String schemaName, DataSource ds)
          Returns the next value from the sequence with the specified name and the specified schema name, from the specified data source.
 void setBlob(DataSource ds, String schemaName, Column column, Object id, InputStream is, long length)
          Reads from the specified stream and writes its contents to the Blob column.
 void setClob(DataSource ds, String schemaName, Column column, Object id, Reader reader, long length)
          Reads from the specified Reader and writes its contents to the Clob column.
 
Methods inherited from class com.onewebsql.query.adapter.BaseDBAdapter
buildIdWhere, buildQuery, getBlob, getClob, getValueListParameterHandler, join
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUMMY_VALUES_EXPRESSION

public static final String DUMMY_VALUES_EXPRESSION
Constant used in the method getNextId(String, String, DataSource).

See Also:
Constant Field Values
Constructor Detail

HSQLDB2Adapter

public HSQLDB2Adapter()
Constructor.

Method Detail

getNextId

public Long getNextId(String sequenceName,
                      String schemaName,
                      DataSource ds)
Returns the next value from the sequence with the specified name and the specified schema name, from the specified data source. It invokes SELECT NEXT_VALUE_FOR FROM (VALUES(0))

Specified by:
getNextId in interface DBAdapter
Overrides:
getNextId in class BaseDBAdapter
Parameters:
sequenceName - sequence name
schemaName - name of the schema
ds - data source
Returns:
next value of the sequence

setBlob

public void setBlob(DataSource ds,
                    String schemaName,
                    Column column,
                    Object id,
                    InputStream is,
                    long length)
Description copied from interface: DBAdapter
Reads from the specified stream and writes its contents to the Blob column. The specified row must exist in the database. The row identifier might be

Specified by:
setBlob in interface DBAdapter
Overrides:
setBlob in class BaseDBAdapter
Parameters:
ds - data source
schemaName - name of the table's schema
column - column to which we are writing
id - row id
is - InputStream containing data to write or null if the column is to be set to NULL
length - the number of bytes to write or -1 if the whole stream content is to be written

setClob

public void setClob(DataSource ds,
                    String schemaName,
                    Column column,
                    Object id,
                    Reader reader,
                    long length)
Description copied from interface: DBAdapter
Reads from the specified Reader and writes its contents to the Clob column. The specified row must exist in the database. The row identifier might be

Specified by:
setClob in interface DBAdapter
Overrides:
setClob in class BaseDBAdapter
Parameters:
ds - data source
schemaName - name of the table's schema
column - column to which we are writing
id - row id
reader - Reader containing data to write or null if the column is to be set to NULL
length - the number of bytes to write or -1 if the whole stream content is to be written


Copyright © 2011-2013 e-point SA. All Rights Reserved.