18 package com.mysql.clusterj.jdbc;
 
   20 import java.math.BigDecimal;
 
   21 import java.math.BigInteger;
 
   23 import java.sql.SQLException;
 
   25 import java.sql.Timestamp;
 
   27 import com.mysql.clusterj.ClusterJUserException;
 
   28 import com.mysql.clusterj.core.query.QueryExecutionContextImpl;
 
   29 import com.mysql.clusterj.core.spi.SessionSPI;
 
   30 import com.mysql.clusterj.core.util.I18NHelper;
 
   31 import com.mysql.clusterj.core.util.Logger;
 
   32 import com.mysql.clusterj.core.util.LoggerFactoryService;
 
   33 import com.mysql.jdbc.ParameterBindings;
 
   47     ParameterBindings parameterBindings;
 
   53     int numberOfParameters;
 
   61             ParameterBindings parameterBindings, 
int numberOfParameters) {
 
   63         this.parameterBindings = parameterBindings;
 
   64         this.numberOfParameters = numberOfParameters;
 
   70         offset += numberOfParameters;
 
   75             int parameterIndex = Integer.valueOf(index) + offset;
 
   76             Byte result = parameterBindings.getByte(parameterIndex);
 
   78         } 
catch (SQLException ex) {
 
   83     public BigDecimal getBigDecimal(
String index) {
 
   85             int parameterIndex = Integer.valueOf(index) + offset;
 
   86             BigDecimal result = parameterBindings.getBigDecimal(parameterIndex);
 
   88         } 
catch (SQLException ex) {
 
   89                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
   93     public BigInteger getBigInteger(
String index) {
 
   95             int parameterIndex = Integer.valueOf(index) + offset;
 
   96             BigInteger result = parameterBindings.getBigDecimal(parameterIndex).toBigInteger();
 
   98         } 
catch (SQLException ex) {
 
   99                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  103     public Boolean getBoolean(
String index) {
 
  105             int parameterIndex = Integer.valueOf(index) + offset;
 
  106             Boolean result = parameterBindings.getBoolean(parameterIndex);
 
  108         } 
catch (SQLException ex) {
 
  109                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  113     public byte[] getBytes(
String index) {
 
  115             int parameterIndex = Integer.valueOf(index) + offset;
 
  116             byte[] result = parameterBindings.getBytes(parameterIndex);
 
  118         } 
catch (SQLException ex) {
 
  119                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  123     public Double getDouble(
String index) {
 
  125             int parameterIndex = Integer.valueOf(index) + offset;
 
  126             Double result = parameterBindings.getDouble(parameterIndex);
 
  128         } 
catch (SQLException ex) {
 
  129                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  133     public Float getFloat(
String index) {
 
  135             int parameterIndex = Integer.valueOf(index) + offset;
 
  136             Float result = parameterBindings.getFloat(parameterIndex);
 
  138         } 
catch (SQLException ex) {
 
  139                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  143     public Integer getInt(
String index) {
 
  145             int parameterIndex = Integer.valueOf(index) + offset;
 
  146             Integer result = parameterBindings.getInt(parameterIndex);
 
  148         } 
catch (SQLException ex) {
 
  149                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  153     public Date getJavaSqlDate(
String index) {
 
  155             int parameterIndex = Integer.valueOf(index) + offset;
 
  156             java.sql.Date result = parameterBindings.getDate(parameterIndex);
 
  158         } 
catch (SQLException ex) {
 
  159                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  163     public Time getJavaSqlTime(
String index) {
 
  165             int parameterIndex = Integer.valueOf(index) + offset;
 
  166             Time result = parameterBindings.getTime(parameterIndex);
 
  168         } 
catch (SQLException ex) {
 
  169                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  173     public Timestamp getJavaSqlTimestamp(
String index) {
 
  175             int parameterIndex = Integer.valueOf(index) + offset;
 
  176             java.sql.Timestamp result = parameterBindings.getTimestamp(parameterIndex);
 
  178         } 
catch (SQLException ex) {
 
  179                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  183     public java.util.Date getJavaUtilDate(
String index) {
 
  185             int parameterIndex = Integer.valueOf(index) + offset;
 
  186             java.util.Date result = parameterBindings.getDate(parameterIndex);
 
  188         } 
catch (SQLException ex) {
 
  189                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  193     public Long getLong(
String index) {
 
  195             int parameterIndex = Integer.valueOf(index) + offset;
 
  196             Long result = parameterBindings.getLong(parameterIndex);
 
  198         } 
catch (SQLException ex) {
 
  199                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  203     public Short getShort(
String index) {
 
  205             int parameterIndex = Integer.valueOf(index) + offset;
 
  206             Short result = parameterBindings.getShort(parameterIndex);
 
  208         } 
catch (SQLException ex) {
 
  209                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  215             int parameterIndex = Integer.valueOf(index) + offset;
 
  216             String result = parameterBindings.getString(parameterIndex);
 
  218         } 
catch (SQLException ex) {
 
  219                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);
 
  223     public Object getObject(
String index) {
 
  225             int parameterIndex = Integer.valueOf(index) + offset;
 
  226             Object result = parameterBindings.getObject(parameterIndex);
 
  228         } 
catch (SQLException ex) {
 
  229                 throw new ClusterJUserException(local.
message(
"ERR_Getting_Parameter_Value", offset, index), ex);