com.sun.jdo.api.persistence.support
Interface SpecialDBOperation


public interface SpecialDBOperation

SpecialDBOperation interface is defined for database specific operations.

Author:
Shing Wai Chan

Method Summary
 void bindFixedCharColumn(PreparedStatement ps, int index, String strVal, int length)
          Binds specified value to parameter at specified index that is bound to CHAR column.
 void defineColumnTypeForResult(PreparedStatement ps, List columns)
          Defines column type for result.
 void initialize(DatabaseMetaData metaData, String identifier)
          This method is called immediately after an instance implementing this interface is created.
 

Method Detail

initialize

void initialize(DatabaseMetaData metaData,
                String identifier)
                throws SQLException
This method is called immediately after an instance implementing this interface is created. The implementation can initialize itself using supplied metaData.

Parameters:
metaData - DatbaseMetaData of the database for which an instance implementing this interface is ingratiated.
identifier - Identifier of object used to obtain databaseMetaData. This can be null in non managed environment.
Throws:
SQLException

defineColumnTypeForResult

void defineColumnTypeForResult(PreparedStatement ps,
                               List columns)
                               throws SQLException
Defines column type for result.

Parameters:
ps - java.sql.PreparedStatement
columns - List of ColumnElement corresponding to select clause
Throws:
SQLException

bindFixedCharColumn

void bindFixedCharColumn(PreparedStatement ps,
                         int index,
                         String strVal,
                         int length)
                         throws SQLException
Binds specified value to parameter at specified index that is bound to CHAR column.

Parameters:
ps - java.sql.PreparedStatement
index - Index of paramater marker in ps.
strVal - value that needs to bound.
length - length of the column to which strVal is bound.
Throws:
SQLException


Copyright © 2012. All Rights Reserved.