apollo.dataadapter.chado.jdbc
Class SybaseChadoAdapter

java.lang.Object
  extended by apollo.dataadapter.chado.jdbc.JdbcChadoAdapter
      extended by apollo.dataadapter.chado.jdbc.SybaseChadoAdapter

public class SybaseChadoAdapter
extends JdbcChadoAdapter

A subclass of JdbcChadoAdapter specific to Sybase installations of Chado. (And, furthermore, probably specific to the TIGR Chado instances.)

Version:
$Revision: 1.34 $ $Date: 2007-02-07 21:14:14 $ $Author: jcrabtree $
Author:
Jonathan Crabtree

Field Summary
protected static java.lang.Integer FALSEVAL
           
protected static org.apache.log4j.Logger logger
           
protected static java.lang.Integer TRUEVAL
           
 
Fields inherited from class apollo.dataadapter.chado.jdbc.JdbcChadoAdapter
chadoDb, chadoVersion, fkcMap, jdbcUrl, organismLike, password, pkcMap, sqlLogPath, transactionConnection, txnLogPath, username
 
Constructor Summary
SybaseChadoAdapter()
           
 
Method Summary
protected  java.lang.String getAnalysisFeatureIdentityField()
          analysisfeature.identity was renamed to pidentity in the TIGR/Sybase port of Chado, since identity is a reserved word in Sybase.
protected  java.lang.Object getBooleanValue(boolean val)
           
protected  java.lang.String getClobLengthFunction()
           
protected  java.sql.Connection getNewConnection()
          Opens and return a new Connection to the database specified in the arguments to init.
protected  boolean setForcePlan(java.sql.Statement stmt, boolean on)
          Run 'set forceplan on' or 'set forceplan off'; this is a Sybase option that forces the Sybase query optimizer to access the tables in the order that they are named in the FROM clause of the SQL query.
 
Methods inherited from class apollo.dataadapter.chado.jdbc.JdbcChadoAdapter
_addExonsToTranscript, _addFeatures, _addFeaturesToFeatureSet, _addTranscriptsToGene, _makeExon, _makeFeatureSet, _makeNewTranscript, _makeSeqFeature, _makeSeqFeature, addGenePredictionResults, addGenePredictionResults, addGenePredictionResults, addOneLevelAnnotations, addPrimaryKeyColumnValue, addProteinAlignments, addSearchHits, beginTransaction, chadoFeatureExists, chadoFeatureExists, commitChanges, commitTransaction, computeMD5Checksum, copyAnnotatedGenesIntoResultTier, decrementGeneTranscriptRanks, decrementTranscriptExonRanks, deleteFeatureDbXrefRow, deleteFeaturepropRow, deleteFeatureRelationshipRow, deleteFeatureSynonymRow, deleteReferencingRows, deleteRow, deleteSynonymRowIfNoLongerNeeded, deleteUnreferencedRow, executeLoggedSelectQuery, executeLoggedSelectQuery, executeLoggedUpdate, getAllChadoSequencesByType, getCDSFeatures, getCDSFeatures, getCDSFeatures, getCdsPolypeptideIds, getChadoInstance, getChadoProgramWhereClause, getChadoVersion, getConnection, getConnectionUsedForLastTransaction, getConnectionWithException, getCurationSet, getCurationSetInRange, getDbId, getDbXrefId, getExonRank, getFeatNamesByType, getFeatureDbXrefId, getFeatureId, getFeatureId, getFeatureIdBySynonym, getFeatureRelationshipId, getFeatureType, getForeignKeyConstraints, getForeignKeyReferenceMapping, getGeneTranscriptIds, getNextPrimaryKeyId, getNullCVTermId, getPrimaryKeyColumn, getPrimaryKeyColumnMapping, getReferencingRowIds, getRelatedFeatureIds, getRelatedFeatureRank, getRelationshipCVTermId, getSeqLengthForFeatureId, getSequence, getSequence, getSynonymId, getTranscriptCdsIds, getTranscriptExonIds, getTranscriptPolypeptideIds, getTranscriptRank, hasOpenTransaction, incrementGeneTranscriptRanks, incrementTranscriptExonRanks, init, initWithException, insertDbRowIfNeeded, insertDbXrefRowIfNeeded, insertFeatureDbXrefRow, insertFeaturelocRow, insertFeaturepropPubRow, insertFeaturepropRow, insertFeaturepropRow, insertFeatureRelationshipRow, insertFeatureRow, insertFeatureSynonymRow, insertPubRowIfNeeded, insertRow, insertSynonymRowIfNeeded, integersTheSame, isSharedExon, loadClass, longsTheSame, rollbackTransaction, setChadoInstance, setPropertyScheme, stringsTheSame, updateFeatureDbXrefRow, updateFeaturelocRow, updateFeaturepropRow, updateFeatureRelationshipRanks, updateFeatureRow, updateRow, validateConnectionAndSequence, validateConnectionAndSequence, zeroPad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

TRUEVAL

protected static final java.lang.Integer TRUEVAL

FALSEVAL

protected static final java.lang.Integer FALSEVAL
Constructor Detail

SybaseChadoAdapter

public SybaseChadoAdapter()
Method Detail

setForcePlan

protected boolean setForcePlan(java.sql.Statement stmt,
                               boolean on)
Run 'set forceplan on' or 'set forceplan off'; this is a Sybase option that forces the Sybase query optimizer to access the tables in the order that they are named in the FROM clause of the SQL query. It is the equivalent of the Oracle optimizer hint "ORDERED".

Parameters:
stmt - JDBC Statement used to execute the set forceplan command.
on - Whether to set this Sybase option on (true) or off (false).
Returns:
The JDBC result value from the executeUpdate command.

getNewConnection

protected java.sql.Connection getNewConnection()
                                        throws java.sql.SQLException
Description copied from class: JdbcChadoAdapter
Opens and return a new Connection to the database specified in the arguments to init.

Overrides:
getNewConnection in class JdbcChadoAdapter
Throws:
java.sql.SQLException

getAnalysisFeatureIdentityField

protected java.lang.String getAnalysisFeatureIdentityField()
analysisfeature.identity was renamed to pidentity in the TIGR/Sybase port of Chado, since identity is a reserved word in Sybase.

Overrides:
getAnalysisFeatureIdentityField in class JdbcChadoAdapter

getBooleanValue

protected java.lang.Object getBooleanValue(boolean val)
Specified by:
getBooleanValue in class JdbcChadoAdapter
Returns:
The Java object that represents the "true" or "false" value for chado columns of type boolean.

getClobLengthFunction

protected java.lang.String getClobLengthFunction()
Specified by:
getClobLengthFunction in class JdbcChadoAdapter
Returns:
The name of a function that can be used to compute the length (in characters) of a CLOB (Character Large OBject) or TEXT value.