org.eclipse.datatools.connectivity.oda_3.3.3.v201110130935

16:42:44.755 INFO  jd.cli.Main - Decompiling org.eclipse.datatools.connectivity.oda_3.3.3.v201110130935.jar
package org.eclipse.datatools.connectivity.oda;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;

public abstract interface IAdvancedQuery
  extends IQuery
{
  public abstract boolean execute()
    throws OdaException;
  
  public abstract IResultSet getResultSet()
    throws OdaException;
  
  public abstract boolean getMoreResults()
    throws OdaException;
  
  public abstract String[] getResultSetNames()
    throws OdaException;
  
  public abstract IResultSetMetaData getMetaDataOf(String paramString)
    throws OdaException;
  
  public abstract IResultSet getResultSet(String paramString)
    throws OdaException;
  
  public abstract IParameterRowSet setNewRow(String paramString)
    throws OdaException;
  
  public abstract IParameterRowSet setNewRow(int paramInt)
    throws OdaException;
  
  public abstract IParameterRowSet setNewRowSet(String paramString)
    throws OdaException;
  
  public abstract IParameterRowSet setNewRowSet(int paramInt)
    throws OdaException;
  
  public abstract int getInt(String paramString)
    throws OdaException;
  
  public abstract int getInt(int paramInt)
    throws OdaException;
  
  public abstract double getDouble(String paramString)
    throws OdaException;
  
  public abstract double getDouble(int paramInt)
    throws OdaException;
  
  public abstract BigDecimal getBigDecimal(String paramString)
    throws OdaException;
  
  public abstract BigDecimal getBigDecimal(int paramInt)
    throws OdaException;
  
  public abstract String getString(String paramString)
    throws OdaException;
  
  public abstract String getString(int paramInt)
    throws OdaException;
  
  public abstract Date getDate(String paramString)
    throws OdaException;
  
  public abstract Date getDate(int paramInt)
    throws OdaException;
  
  public abstract Time getTime(String paramString)
    throws OdaException;
  
  public abstract Time getTime(int paramInt)
    throws OdaException;
  
  public abstract Timestamp getTimestamp(String paramString)
    throws OdaException;
  
  public abstract Timestamp getTimestamp(int paramInt)
    throws OdaException;
  
  public abstract IBlob getBlob(String paramString)
    throws OdaException;
  
  public abstract IBlob getBlob(int paramInt)
    throws OdaException;
  
  public abstract IClob getClob(String paramString)
    throws OdaException;
  
  public abstract IClob getClob(int paramInt)
    throws OdaException;
  
  public abstract boolean getBoolean(String paramString)
    throws OdaException;
  
  public abstract boolean getBoolean(int paramInt)
    throws OdaException;
  
  public abstract Object getObject(String paramString)
    throws OdaException;
  
  public abstract Object getObject(int paramInt)
    throws OdaException;
  
  public abstract IParameterRowSet getRow(String paramString)
    throws OdaException;
  
  public abstract IParameterRowSet getRow(int paramInt)
    throws OdaException;
  
  public abstract int findOutParameter(String paramString)
    throws OdaException;
  
  public abstract boolean wasNull()
    throws OdaException;
  
  public abstract void setSortSpec(String paramString, SortSpec paramSortSpec)
    throws OdaException;
  
  public abstract SortSpec getSortSpec(String paramString)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IAdvancedQuery
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import java.io.InputStream;

public abstract interface IBlob
{
  public abstract InputStream getBinaryStream()
    throws OdaException;
  
  public abstract byte[] getBytes(long paramLong, int paramInt)
    throws OdaException;
  
  public abstract long length()
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IBlob
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import java.io.Reader;

public abstract interface IClob
{
  public abstract Reader getCharacterStream()
    throws OdaException;
  
  public abstract String getSubString(long paramLong, int paramInt)
    throws OdaException;
  
  public abstract long length()
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IClob
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import com.ibm.icu.util.ULocale;
import java.util.Properties;

public abstract interface IConnection
{
  public abstract void open(Properties paramProperties)
    throws OdaException;
  
  public abstract void setAppContext(Object paramObject)
    throws OdaException;
  
  public abstract void close()
    throws OdaException;
  
  public abstract boolean isOpen()
    throws OdaException;
  
  public abstract IDataSetMetaData getMetaData(String paramString)
    throws OdaException;
  
  public abstract IQuery newQuery(String paramString)
    throws OdaException;
  
  public abstract int getMaxQueries()
    throws OdaException;
  
  public abstract void commit()
    throws OdaException;
  
  public abstract void rollback()
    throws OdaException;
  
  public abstract void setLocale(ULocale paramULocale)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IConnection
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public abstract interface IDataSetMetaData
{
  public static final int sqlStateXOpen = 0;
  public static final int sqlStateSQL99 = 1;
  public static final int sortModeNone = 0;
  public static final int sortModeSingleOrder = 1;
  public static final int sortModeColumnOrder = 2;
  public static final int sortModeSingleColumn = 3;
  
  public abstract IConnection getConnection()
    throws OdaException;
  
  public abstract IResultSet getDataSourceObjects(String paramString1, String paramString2, String paramString3, String paramString4)
    throws OdaException;
  
  public abstract int getDataSourceMajorVersion()
    throws OdaException;
  
  public abstract int getDataSourceMinorVersion()
    throws OdaException;
  
  public abstract String getDataSourceProductName()
    throws OdaException;
  
  public abstract String getDataSourceProductVersion()
    throws OdaException;
  
  public abstract int getSQLStateType()
    throws OdaException;
  
  public abstract boolean supportsMultipleResultSets()
    throws OdaException;
  
  public abstract boolean supportsMultipleOpenResults()
    throws OdaException;
  
  public abstract boolean supportsNamedResultSets()
    throws OdaException;
  
  public abstract boolean supportsNamedParameters()
    throws OdaException;
  
  public abstract boolean supportsInParameters()
    throws OdaException;
  
  public abstract boolean supportsOutParameters()
    throws OdaException;
  
  public abstract int getSortMode();
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IDataSetMetaData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public abstract interface IDriver
{
  public abstract IConnection getConnection(String paramString)
    throws OdaException;
  
  public abstract void setLogConfiguration(LogConfiguration paramLogConfiguration)
    throws OdaException;
  
  public abstract int getMaxConnections()
    throws OdaException;
  
  public abstract void setAppContext(Object paramObject)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IDriver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public abstract interface IParameterMetaData
{
  public static final int parameterModeUnknown = 0;
  public static final int parameterModeIn = 1;
  public static final int parameterModeInOut = 2;
  public static final int parameterModeOut = 3;
  public static final int parameterNullableUnknown = 0;
  public static final int parameterNoNulls = 1;
  public static final int parameterNullable = 2;
  
  public abstract int getParameterCount()
    throws OdaException;
  
  public abstract int getParameterMode(int paramInt)
    throws OdaException;
  
  public abstract String getParameterName(int paramInt)
    throws OdaException;
  
  public abstract int getParameterType(int paramInt)
    throws OdaException;
  
  public abstract String getParameterTypeName(int paramInt)
    throws OdaException;
  
  public abstract int getPrecision(int paramInt)
    throws OdaException;
  
  public abstract int getScale(int paramInt)
    throws OdaException;
  
  public abstract int isNullable(int paramInt)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IParameterMetaData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;

public abstract interface IParameterRowSet
  extends IResultSet
{
  public abstract boolean absolute(int paramInt)
    throws OdaException;
  
  public abstract boolean previous()
    throws OdaException;
  
  public abstract int add()
    throws OdaException;
  
  public abstract void clear()
    throws OdaException;
  
  public abstract boolean isEmpty()
    throws OdaException;
  
  public abstract int size()
    throws OdaException;
  
  public abstract void setInt(int paramInt1, int paramInt2)
    throws OdaException;
  
  public abstract void setInt(String paramString, int paramInt)
    throws OdaException;
  
  public abstract void setDouble(int paramInt, double paramDouble)
    throws OdaException;
  
  public abstract void setDouble(String paramString, double paramDouble)
    throws OdaException;
  
  public abstract void setBigDecimal(int paramInt, BigDecimal paramBigDecimal)
    throws OdaException;
  
  public abstract void setBigDecimal(String paramString, BigDecimal paramBigDecimal)
    throws OdaException;
  
  public abstract void setString(int paramInt, String paramString)
    throws OdaException;
  
  public abstract void setString(String paramString1, String paramString2)
    throws OdaException;
  
  public abstract void setDate(int paramInt, Date paramDate)
    throws OdaException;
  
  public abstract void setDate(String paramString, Date paramDate)
    throws OdaException;
  
  public abstract void setTime(int paramInt, Time paramTime)
    throws OdaException;
  
  public abstract void setTime(String paramString, Time paramTime)
    throws OdaException;
  
  public abstract void setTimestamp(int paramInt, Timestamp paramTimestamp)
    throws OdaException;
  
  public abstract void setTimestamp(String paramString, Timestamp paramTimestamp)
    throws OdaException;
  
  public abstract void setBoolean(int paramInt, boolean paramBoolean)
    throws OdaException;
  
  public abstract void setBoolean(String paramString, boolean paramBoolean)
    throws OdaException;
  
  public abstract void setObject(int paramInt, Object paramObject)
    throws OdaException;
  
  public abstract void setObject(String paramString, Object paramObject)
    throws OdaException;
  
  public abstract void setNull(int paramInt)
    throws OdaException;
  
  public abstract void setNull(String paramString)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IParameterRowSet
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.eclipse.datatools.connectivity.oda.spec.QuerySpecification;

public abstract interface IQuery
{
  public abstract void prepare(String paramString)
    throws OdaException;
  
  public abstract void setAppContext(Object paramObject)
    throws OdaException;
  
  public abstract void setProperty(String paramString1, String paramString2)
    throws OdaException;
  
  public abstract void close()
    throws OdaException;
  
  public abstract void setMaxRows(int paramInt)
    throws OdaException;
  
  public abstract int getMaxRows()
    throws OdaException;
  
  public abstract IResultSetMetaData getMetaData()
    throws OdaException;
  
  public abstract IResultSet executeQuery()
    throws OdaException;
  
  public abstract void clearInParameters()
    throws OdaException;
  
  public abstract void setInt(String paramString, int paramInt)
    throws OdaException;
  
  public abstract void setInt(int paramInt1, int paramInt2)
    throws OdaException;
  
  public abstract void setDouble(String paramString, double paramDouble)
    throws OdaException;
  
  public abstract void setDouble(int paramInt, double paramDouble)
    throws OdaException;
  
  public abstract void setBigDecimal(String paramString, BigDecimal paramBigDecimal)
    throws OdaException;
  
  public abstract void setBigDecimal(int paramInt, BigDecimal paramBigDecimal)
    throws OdaException;
  
  public abstract void setString(String paramString1, String paramString2)
    throws OdaException;
  
  public abstract void setString(int paramInt, String paramString)
    throws OdaException;
  
  public abstract void setDate(String paramString, Date paramDate)
    throws OdaException;
  
  public abstract void setDate(int paramInt, Date paramDate)
    throws OdaException;
  
  public abstract void setTime(String paramString, Time paramTime)
    throws OdaException;
  
  public abstract void setTime(int paramInt, Time paramTime)
    throws OdaException;
  
  public abstract void setTimestamp(String paramString, Timestamp paramTimestamp)
    throws OdaException;
  
  public abstract void setTimestamp(int paramInt, Timestamp paramTimestamp)
    throws OdaException;
  
  public abstract void setBoolean(String paramString, boolean paramBoolean)
    throws OdaException;
  
  public abstract void setBoolean(int paramInt, boolean paramBoolean)
    throws OdaException;
  
  public abstract void setObject(String paramString, Object paramObject)
    throws OdaException;
  
  public abstract void setObject(int paramInt, Object paramObject)
    throws OdaException;
  
  public abstract void setNull(String paramString)
    throws OdaException;
  
  public abstract void setNull(int paramInt)
    throws OdaException;
  
  public abstract int findInParameter(String paramString)
    throws OdaException;
  
  public abstract IParameterMetaData getParameterMetaData()
    throws OdaException;
  
  public abstract void setSortSpec(SortSpec paramSortSpec)
    throws OdaException;
  
  public abstract SortSpec getSortSpec()
    throws OdaException;
  
  public abstract void setSpecification(QuerySpecification paramQuerySpecification)
    throws OdaException, UnsupportedOperationException;
  
  public abstract QuerySpecification getSpecification();
  
  public abstract String getEffectiveQueryText();
  
  public abstract void cancel()
    throws OdaException, UnsupportedOperationException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IQuery
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;

public abstract interface IResultSet
{
  public abstract IResultSetMetaData getMetaData()
    throws OdaException;
  
  public abstract void close()
    throws OdaException;
  
  public abstract void setMaxRows(int paramInt)
    throws OdaException;
  
  public abstract boolean next()
    throws OdaException;
  
  public abstract int getRow()
    throws OdaException;
  
  public abstract String getString(int paramInt)
    throws OdaException;
  
  public abstract String getString(String paramString)
    throws OdaException;
  
  public abstract int getInt(int paramInt)
    throws OdaException;
  
  public abstract int getInt(String paramString)
    throws OdaException;
  
  public abstract double getDouble(int paramInt)
    throws OdaException;
  
  public abstract double getDouble(String paramString)
    throws OdaException;
  
  public abstract BigDecimal getBigDecimal(int paramInt)
    throws OdaException;
  
  public abstract BigDecimal getBigDecimal(String paramString)
    throws OdaException;
  
  public abstract Date getDate(int paramInt)
    throws OdaException;
  
  public abstract Date getDate(String paramString)
    throws OdaException;
  
  public abstract Time getTime(int paramInt)
    throws OdaException;
  
  public abstract Time getTime(String paramString)
    throws OdaException;
  
  public abstract Timestamp getTimestamp(int paramInt)
    throws OdaException;
  
  public abstract Timestamp getTimestamp(String paramString)
    throws OdaException;
  
  public abstract IBlob getBlob(int paramInt)
    throws OdaException;
  
  public abstract IBlob getBlob(String paramString)
    throws OdaException;
  
  public abstract IClob getClob(int paramInt)
    throws OdaException;
  
  public abstract IClob getClob(String paramString)
    throws OdaException;
  
  public abstract boolean getBoolean(int paramInt)
    throws OdaException;
  
  public abstract boolean getBoolean(String paramString)
    throws OdaException;
  
  public abstract Object getObject(int paramInt)
    throws OdaException;
  
  public abstract Object getObject(String paramString)
    throws OdaException;
  
  public abstract boolean wasNull()
    throws OdaException;
  
  public abstract int findColumn(String paramString)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IResultSet
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public abstract interface IResultSetMetaData
{
  public static final int columnNoNulls = 0;
  public static final int columnNullable = 1;
  public static final int columnNullableUnknown = 2;
  
  public abstract int getColumnCount()
    throws OdaException;
  
  public abstract String getColumnName(int paramInt)
    throws OdaException;
  
  public abstract String getColumnLabel(int paramInt)
    throws OdaException;
  
  public abstract int getColumnType(int paramInt)
    throws OdaException;
  
  public abstract String getColumnTypeName(int paramInt)
    throws OdaException;
  
  public abstract int getColumnDisplayLength(int paramInt)
    throws OdaException;
  
  public abstract int getPrecision(int paramInt)
    throws OdaException;
  
  public abstract int getScale(int paramInt)
    throws OdaException;
  
  public abstract int isNullable(int paramInt)
    throws OdaException;
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.IResultSetMetaData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public class LogConfiguration
{
  private String m_dataSourceId;
  private int m_logLevel;
  private String m_logDirectory;
  private String m_logPrefix;
  private String m_formatterClassName;
  
  public LogConfiguration(String dataSourceId, int logLevel, String logDirectory, String logPrefix, String formatterClassName)
  {
    m_dataSourceId = dataSourceId;
    setLogConfiguration(logLevel, logDirectory, 
      logPrefix, formatterClassName);
  }
  
  public LogConfiguration(int logLevel, String logDirectory, String logPrefix, String formatterClassName)
  {
    setLogConfiguration(logLevel, logDirectory, 
      logPrefix, formatterClassName);
  }
  
  LogConfiguration() {}
  
  private void setLogConfiguration(int logLevel, String logDirectory, String logPrefix, String formatterClassName)
  {
    m_logLevel = logLevel;
    if ((logDirectory != null) && (logDirectory.length() == 0)) {
      logDirectory = null;
    }
    m_logDirectory = logDirectory;
    if ((logPrefix != null) && (logPrefix.length() == 0)) {
      logPrefix = null;
    }
    m_logPrefix = logPrefix;
    if ((formatterClassName != null) && (formatterClassName.length() == 0)) {
      formatterClassName = null;
    }
    m_formatterClassName = formatterClassName;
  }
  
  public String getDataSourceId()
  {
    return m_dataSourceId;
  }
  
  public String getFormatterClassName()
  {
    return m_formatterClassName;
  }
  
  public String getLogDirectory()
  {
    return m_logDirectory;
  }
  
  public int getLogLevel()
  {
    return m_logLevel;
  }
  
  public String getLogPrefix()
  {
    return m_logPrefix;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.LogConfiguration
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

public class OdaException
  extends Exception
{
  private static final long serialVersionUID = 1L;
  private String m_sqlState;
  private int m_vendorCode;
  private OdaException m_nextException;
  private boolean m_isCauseSet = false;
  private Throwable m_cause = null;
  
  public OdaException()
  {
    m_sqlState = null;
    m_vendorCode = 0;
    m_nextException = null;
  }
  
  public OdaException(String message)
  {
    super(message);
    m_sqlState = null;
    m_vendorCode = 0;
    m_nextException = null;
  }
  
  public OdaException(String message, String sqlState)
  {
    super(message);
    m_sqlState = sqlState;
    m_vendorCode = 0;
    m_nextException = null;
  }
  
  public OdaException(String message, String sqlState, int vendorCode)
  {
    super(message);
    m_sqlState = sqlState;
    m_vendorCode = vendorCode;
    m_nextException = null;
  }
  
  public OdaException(Throwable cause)
  {
    initCause(cause);
  }
  
  public String getSQLState()
  {
    return m_sqlState;
  }
  
  public int getErrorCode()
  {
    return m_vendorCode;
  }
  
  public OdaException getNextException()
  {
    return m_nextException;
  }
  
  public void setNextException(OdaException nextException)
  {
    OdaException ex = this;
    while (m_nextException != null) {
      ex = m_nextException;
    }
    m_nextException = nextException;
  }
  
  public Throwable initCause(Throwable cause)
    throws IllegalArgumentException, IllegalStateException
  {
    if (m_isCauseSet) {
      throw new IllegalStateException("initCause() cannot be called multiple times.");
    }
    if (this == cause) {
      throw new IllegalArgumentException("This cannot be caused by itself.");
    }
    m_cause = cause;
    m_isCauseSet = true;
    return this;
  }
  
  public Throwable getCause()
  {
    return m_cause;
  }
  
  public String toString()
  {
    String message = super.toString();
    
    Throwable cause = getCause();
    if (cause != null)
    {
      String causeString = cause.toString();
      if ((causeString != null) && (causeString.length() > 0)) {
        message = message + " ;\n    " + causeString;
      }
    }
    if (getNextException() != null) {
      message = message + " ;\n    " + getNextException();
    }
    return message;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.OdaException
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

final class SortSpec$SortKey
{
  private String m_columnName;
  private int m_sortOrder;
  
  private SortSpec$SortKey(String columnName, int sortOrder)
  {
    m_columnName = columnName;
    m_sortOrder = sortOrder;
  }
  
  private String getColumnName()
  {
    return m_columnName;
  }
  
  private int getSortOrder()
  {
    return m_sortOrder;
  }
  
  public String toString()
  {
    return 
      "{" + m_columnName + ", " + SortSpec.access$0(m_sortOrder) + "}";
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.SortSpec.SortKey
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda;

import com.ibm.icu.util.ULocale;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.datatools.connectivity.oda.nls.Messages;

public class SortSpec
{
  public static final int sortAsc = 0;
  public static final int sortDesc = 1;
  private int m_sortMode;
  private List m_sortKeys;
  
  public SortSpec(int sortMode)
  {
    if ((sortMode != 0) && 
      (sortMode != 1) && 
      (sortMode != 2) && 
      (sortMode != 3)) {
      throw new IllegalArgumentException(
        Messages.bind(Messages.sortSpec_INVALID_SORT_MODE_SPECIFIED, 
        new Integer(sortMode)));
    }
    m_sortMode = sortMode;
    m_sortKeys = new ArrayList();
  }
  
  public void addSortKey(String columnName, int sortOrder)
  {
    if (columnName == null) {
      throw new NullPointerException(
        Messages.sortSpec_NULL_COLUMN_NAME_SPECIFIED);
    }
    if (columnName.length() == 0) {
      throw new IllegalArgumentException(
        Messages.bind(Messages.sortSpec_INVALID_COLUMN_NAME_SPECIFIED, 
        columnName));
    }
    if ((sortOrder != 0) && (sortOrder != 1)) {
      throw new IllegalArgumentException(
        Messages.bind(Messages.sortSpec_INVALID_SORT_ORDER_SPECIFIED, 
        new Integer(sortOrder)));
    }
    if (m_sortMode == 0) {
      throw new IllegalStateException(
        Messages.sortSpec_NO_DYNAMIC_SORT_KEY_FOR_SORTMODENONE);
    }
    if ((m_sortMode == 3) && 
      (doGetSortKeyCount() > 0)) {
      throw new IllegalStateException(
        Messages.sortSpec_ONE_SORTCOLUMN_FOR_SINGLE_COLUMN_MODE);
    }
    if ((m_sortMode == 1) && 
      (doGetSortKeyCount() > 0))
    {
      SortKey sortKey = (SortKey)m_sortKeys.get(0);
      if (sortKey.getSortOrder() != sortOrder) {
        throw new IllegalStateException(
          Messages.sortSpec_ONE_SORTORDER_FOR_SINGLE_ORDER_MODE);
      }
    }
    SortKey sortKey = new SortKey(columnName, sortOrder, null);
    m_sortKeys.add(sortKey);
  }
  
  public int getSortMode()
  {
    return m_sortMode;
  }
  
  public int getSortKeyCount()
  {
    return doGetSortKeyCount();
  }
  
  private int doGetSortKeyCount()
  {
    return m_sortKeys.size();
  }
  
  public String getSortColumn(int index)
  {
    validateIndex(index);
    
    SortKey sortKey = (SortKey)m_sortKeys.get(index - 1);
    return sortKey.getColumnName();
  }
  
  public int getSortOrder(int index)
  {
    validateIndex(index);
    
    SortKey sortKey = (SortKey)m_sortKeys.get(index - 1);
    return sortKey.getSortOrder();
  }
  
  private void validateIndex(int index)
  {
    int count = doGetSortKeyCount();
    if ((index < 1) || (index > count)) {
      throw new IndexOutOfBoundsException(
        Messages.bind(Messages.sortSpec_INDEX_OUT_OF_BOUND, 
        new Integer(index), new Integer(count)));
    }
  }
  
  public String[] getSortColumns()
  {
    if (m_sortMode != 1) {
      throw new IllegalStateException(
        Messages.sortSpec_ONLY_IN_SINGLE_ORDER_MODE);
    }
    int size = doGetSortKeyCount();
    String[] sortColumns = new String[size];
    for (int i = 0; i < size; i++)
    {
      SortKey sortKey = (SortKey)m_sortKeys.get(i);
      String columnName = sortKey.getColumnName();
      sortColumns[i] = columnName;
    }
    return sortColumns;
  }
  
  public int getSortOrder()
  {
    if (m_sortMode != 1) {
      throw new IllegalStateException(
        Messages.sortSpec_ONLY_IN_SINGLE_ORDER_MODE);
    }
    if (doGetSortKeyCount() == 0) {
      return 0;
    }
    SortKey sortKey = (SortKey)m_sortKeys.get(0);
    return sortKey.getSortOrder();
  }
  
  /**
   * @deprecated
   */
  public void setLocale(ULocale locale) {}
  
  public String toString()
  {
    return 
      "Sort Mode: " + sortModeAsString(m_sortMode) + ", Sort Keys: " + m_sortKeys;
  }
  
  private static String sortOrderAsString(int sortOrder)
  {
    switch (sortOrder)
    {
    case 0: 
      return "Ascending";
    case 1: 
      return "Descending";
    }
    return "";
  }
  
  private static String sortModeAsString(int sortMode)
  {
    switch (sortMode)
    {
    case 0: 
      return "sortModeNone";
    case 1: 
      return "sortModeSingleOrder";
    case 2: 
      return "sortModeColumnOrder";
    case 3: 
      return "sortModeSingleColumn";
    }
    return "";
  }
  
  private static final class SortKey
  {
    private String m_columnName;
    private int m_sortOrder;
    
    private SortKey(String columnName, int sortOrder)
    {
      m_columnName = columnName;
      m_sortOrder = sortOrder;
    }
    
    private String getColumnName()
    {
      return m_columnName;
    }
    
    private int getSortOrder()
    {
      return m_sortOrder;
    }
    
    public String toString()
    {
      return 
        "{" + m_columnName + ", " + SortSpec.sortOrderAsString(m_sortOrder) + "}";
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.SortSpec
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import org.eclipse.datatools.connectivity.oda.IBlob;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class Blob
  implements IBlob
{
  private byte[] m_byteArray = null;
  private InputStream m_stream = null;
  private long m_length = Long.MIN_VALUE;
  
  Blob() {}
  
  public Blob(byte[] byteArray)
  {
    m_byteArray = byteArray;
  }
  
  public InputStream getBinaryStream()
    throws OdaException
  {
    if (m_stream == null) {
      m_stream = new ByteArrayInputStream(m_byteArray);
    }
    return m_stream;
  }
  
  public byte[] getBytes(long position, int length)
    throws OdaException
  {
    throw new UnsupportedOperationException();
  }
  
  public long length()
    throws OdaException
  {
    if (m_length == Long.MIN_VALUE) {
      m_length = m_byteArray.length;
    }
    return m_length;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.Blob
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import java.io.Reader;
import java.io.StringReader;
import org.eclipse.datatools.connectivity.oda.IClob;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class Clob
  implements IClob
{
  private String m_string = null;
  private Reader m_reader = null;
  private long m_length = Long.MIN_VALUE;
  
  Clob() {}
  
  public Clob(String string)
  {
    m_string = string;
  }
  
  public Reader getCharacterStream()
    throws OdaException
  {
    if (m_reader == null) {
      m_reader = new StringReader(m_string);
    }
    return m_reader;
  }
  
  public String getSubString(long position, int length)
    throws OdaException
  {
    throw new UnsupportedOperationException();
  }
  
  public long length()
    throws OdaException
  {
    if (m_length == Long.MIN_VALUE) {
      m_length = m_string.length();
    }
    return m_length;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.Clob
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import com.ibm.icu.util.ULocale;
import java.util.Properties;
import org.eclipse.datatools.connectivity.oda.IConnection;
import org.eclipse.datatools.connectivity.oda.IDataSetMetaData;
import org.eclipse.datatools.connectivity.oda.IQuery;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class SimpleConnection
  implements IConnection
{
  private boolean m_isOpen = false;
  
  public void open(Properties connProperties)
    throws OdaException
  {
    setIsOpen(true);
    
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public void setAppContext(Object context)
    throws OdaException
  {}
  
  public void close()
    throws OdaException
  {
    setIsOpen(false);
    
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public boolean isOpen()
    throws OdaException
  {
    return m_isOpen;
  }
  
  protected void setIsOpen(boolean isOpen)
  {
    m_isOpen = isOpen;
  }
  
  public IDataSetMetaData getMetaData(String dataSetType)
    throws OdaException
  {
    return new SimpleDataSetMetaData(this);
  }
  
  public IQuery newQuery(String dataSetType)
    throws OdaException
  {
    return new SimpleQuery();
  }
  
  public int getMaxQueries()
    throws OdaException
  {
    return 0;
  }
  
  public void commit()
    throws OdaException
  {}
  
  public void rollback()
    throws OdaException
  {
    throw new UnsupportedOperationException();
  }
  
  public void setLocale(ULocale uLocale)
    throws OdaException
  {
    throw new UnsupportedOperationException();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.SimpleConnection
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import org.eclipse.datatools.connectivity.oda.IConnection;
import org.eclipse.datatools.connectivity.oda.IDataSetMetaData;
import org.eclipse.datatools.connectivity.oda.IResultSet;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class SimpleDataSetMetaData
  implements IDataSetMetaData
{
  private IConnection m_connection;
  
  protected SimpleDataSetMetaData(IConnection connection)
  {
    m_connection = connection;
  }
  
  public IConnection getConnection()
    throws OdaException
  {
    return m_connection;
  }
  
  public IResultSet getDataSourceObjects(String catalog, String schema, String object, String version)
    throws OdaException
  {
    throw new UnsupportedOperationException();
  }
  
  public int getDataSourceMajorVersion()
    throws OdaException
  {
    return 0;
  }
  
  public int getDataSourceMinorVersion()
    throws OdaException
  {
    return 0;
  }
  
  public String getDataSourceProductName()
    throws OdaException
  {
    return "Simple Data Source";
  }
  
  public String getDataSourceProductVersion()
    throws OdaException
  {
    return 
      Integer.toString(getDataSourceMajorVersion()) + "." + Integer.toString(getDataSourceMinorVersion());
  }
  
  public int getSQLStateType()
    throws OdaException
  {
    return 1;
  }
  
  public boolean supportsMultipleResultSets()
    throws OdaException
  {
    return false;
  }
  
  public boolean supportsMultipleOpenResults()
    throws OdaException
  {
    return false;
  }
  
  public boolean supportsNamedResultSets()
    throws OdaException
  {
    return false;
  }
  
  public boolean supportsNamedParameters()
    throws OdaException
  {
    return false;
  }
  
  public boolean supportsInParameters()
    throws OdaException
  {
    return false;
  }
  
  public boolean supportsOutParameters()
    throws OdaException
  {
    return false;
  }
  
  public int getSortMode()
  {
    return 0;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.SimpleDataSetMetaData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import org.eclipse.datatools.connectivity.oda.IConnection;
import org.eclipse.datatools.connectivity.oda.IDriver;
import org.eclipse.datatools.connectivity.oda.LogConfiguration;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class SimpleDriver
  implements IDriver
{
  public IConnection getConnection(String dataSourceType)
    throws OdaException
  {
    return newConnection(dataSourceType);
  }
  
  protected IConnection newConnection(String dataSourceType)
    throws OdaException
  {
    return new SimpleConnection();
  }
  
  public void setLogConfiguration(LogConfiguration logConfig)
    throws OdaException
  {}
  
  public int getMaxConnections()
    throws OdaException
  {
    return 0;
  }
  
  public void setAppContext(Object context)
    throws OdaException
  {}
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.SimpleDriver
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
import org.eclipse.datatools.connectivity.oda.OdaException;

/**
 * @deprecated
 */
public class SimpleParameterMetaData
  implements IParameterMetaData
{
  public int getParameterCount()
    throws OdaException
  {
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public int getParameterMode(int param)
    throws OdaException
  {
    return 0;
  }
  
  public String getParameterName(int param)
    throws OdaException
  {
    return null;
  }
  
  public int getParameterType(int param)
    throws OdaException
  {
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public String getParameterTypeName(int param)
    throws OdaException
  {
    return null;
  }
  
  public int getPrecision(int param)
    throws OdaException
  {
    return -1;
  }
  
  public int getScale(int param)
    throws OdaException
  {
    return -1;
  }
  
  public int isNullable(int param)
    throws OdaException
  {
    return 0;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.datatools.connectivity.oda.impl.SimpleParameterMetaData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.datatools.connectivity.oda.impl;

import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.eclipse.datatools.connectivity.oda.IParameterMetaData;
import org.eclipse.datatools.connectivity.oda.IQuery;
import org.eclipse.datatools.connectivity.oda.IResultSet;
import org.eclipse.datatools.connectivity.oda.IResultSetMetaData;
import org.eclipse.datatools.connectivity.oda.OdaException;
import org.eclipse.datatools.connectivity.oda.SortSpec;
import org.eclipse.datatools.connectivity.oda.spec.QuerySpecification;

/**
 * @deprecated
 */
public class SimpleQuery
  implements IQuery
{
  private int m_maxRows;
  
  public void prepare(String queryText)
    throws OdaException
  {
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public void setAppContext(Object context)
    throws OdaException
  {}
  
  public void close()
    throws OdaException
  {
    throw new UnsupportedOperationException("Please override and implement me.");
  }
  
  public IResultSetMetaData getMetaData()
    throws OdaException
  {
    return new SimpleResultSetMetaData();
  }
  
  public IResultSet executeQuery()
    throws OdaException
  {
    IResultSet resultSet = new SimpleResultSet();
    resultSet.setMaxRows(getMaxRows());
    return resultSet;
  }
  
  public void setProperty(String name, String value)
    throws OdaException
  {}
  
  public void setMaxRows(int max)
    throws OdaException
  {
    m_maxRows = max;
  }
  
  public int getMaxRows()
    throws OdaException
  {
    return m_maxRows;
  }
  
  public void clearInParameters()
    throws OdaException
  {}
  
  public void setInt(String parameterName, int value)
    throws OdaException
  {}
  
  public void setInt(int parameterId, int value)
    throws OdaException
  {}
  
  public void setDouble(String parameterName, double value)
    throws OdaException
  {}
  
  public void setDouble(int parameterId, double value)
    throws OdaException
  {}
  
  public void setBigDecimal(String parameterName, BigDecimal value)
    throws OdaException
  {}
  
  public void setBigDecimal(int parameterId, BigDecimal value)
    throws OdaException
  {}
  
  public void setString(String parameterName
1 2 3 4 5 6 7 8 9 10

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd