ParameterRowSet.java from BIRT at Krugle
Show ParameterRowSet.java syntax highlighted
/*
*************************************************************************
* Copyright (c) 2004, 2005 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Actuate Corporation - initial API and implementation
*
*************************************************************************
*/
package org.eclipse.birt.data.oda.adapter.dtp;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.eclipse.datatools.connectivity.oda.IParameterRowSet;
import org.eclipse.datatools.connectivity.oda.OdaException;
/**
* ParameterRowSet is the DTP ODA adapter for the BIRT ODA driver interface IParameterRowSet.
*/
public class ParameterRowSet extends ResultSet implements IParameterRowSet
{
private org.eclipse.birt.data.oda.IParameterRowSet
m_birtParameterRowSet = null;
/**
* Creates a ParameterRowSet adapter for the specified object.
* @param birtParameterRowSet BIRT ODA IParameterRowSet interface implementation.
*/
public ParameterRowSet( org.eclipse.birt.data.oda.IParameterRowSet birtParameterRowSet )
{
super( birtParameterRowSet );
m_birtParameterRowSet = birtParameterRowSet;
}
private ParameterRowSet()
{
super( null );
}
private org.eclipse.birt.data.oda.IParameterRowSet getBirtParameterRowSet()
{
return m_birtParameterRowSet;
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#absolute(int)
*/
public boolean absolute( int rowIndex ) throws OdaException
{
try
{
return getBirtParameterRowSet().absolute( rowIndex );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#previous()
*/
public boolean previous() throws OdaException
{
try
{
return getBirtParameterRowSet().previous();
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#add()
*/
public int add() throws OdaException
{
try
{
return getBirtParameterRowSet().add();
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#clear()
*/
public void clear() throws OdaException
{
try
{
getBirtParameterRowSet().clear();
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#isEmpty()
*/
public boolean isEmpty() throws OdaException
{
try
{
return getBirtParameterRowSet().isEmpty();
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#size()
*/
public int size() throws OdaException
{
try
{
return getBirtParameterRowSet().size();
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setInt(int, int)
*/
public void setInt( int columnIndex, int value ) throws OdaException
{
try
{
getBirtParameterRowSet().setInt( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setInt(java.lang.String, int)
*/
public void setInt( String columnName, int value ) throws OdaException
{
try
{
getBirtParameterRowSet().setInt( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setDouble(int, double)
*/
public void setDouble( int columnIndex, double value ) throws OdaException
{
try
{
getBirtParameterRowSet().setDouble( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setDouble(java.lang.String, double)
*/
public void setDouble( String columnName, double value )
throws OdaException
{
try
{
getBirtParameterRowSet().setDouble( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setBigDecimal(int, java.math.BigDecimal)
*/
public void setBigDecimal( int columnIndex, BigDecimal value )
throws OdaException
{
try
{
getBirtParameterRowSet().setBigDecimal( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setBigDecimal(java.lang.String, java.math.BigDecimal)
*/
public void setBigDecimal( String columnName, BigDecimal value )
throws OdaException
{
try
{
getBirtParameterRowSet().setBigDecimal( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setString(int, java.lang.String)
*/
public void setString( int columnIndex, String value ) throws OdaException
{
try
{
getBirtParameterRowSet().setString( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setString(java.lang.String, java.lang.String)
*/
public void setString( String columnName, String value )
throws OdaException
{
try
{
getBirtParameterRowSet().setString( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setDate(int, java.sql.Date)
*/
public void setDate( int columnIndex, Date value ) throws OdaException
{
try
{
getBirtParameterRowSet().setDate( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setDate(java.lang.String, java.sql.Date)
*/
public void setDate( String columnName, Date value ) throws OdaException
{
try
{
getBirtParameterRowSet().setDate( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setTime(int, java.sql.Time)
*/
public void setTime( int columnIndex, Time value ) throws OdaException
{
try
{
getBirtParameterRowSet().setTime( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setTime(java.lang.String, java.sql.Time)
*/
public void setTime( String columnName, Time value ) throws OdaException
{
try
{
getBirtParameterRowSet().setTime( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setTimestamp(int, java.sql.Timestamp)
*/
public void setTimestamp( int columnIndex, Timestamp value )
throws OdaException
{
try
{
getBirtParameterRowSet().setTimestamp( columnIndex, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.oda.IParameterRowSet#setTimestamp(java.lang.String, java.sql.Timestamp)
*/
public void setTimestamp( String columnName, Timestamp value )
throws OdaException
{
try
{
getBirtParameterRowSet().setTimestamp( columnName, value );
}
catch( org.eclipse.birt.data.oda.OdaException e )
{
throw new OdaAdapterException( e );
}
}
}
See more files for this project here