org.openrdf.sail.rdbms.schema
Class TransactionTable

java.lang.Object
  extended by org.openrdf.sail.rdbms.schema.TransactionTable

public class TransactionTable
extends Object

Manages a temporary table used when uploading new statements with the same predicate into the database.

Author:
James Leigh

Constructor Summary
TransactionTable()
           
 
Method Summary
protected  String buildInsert(String tableName, boolean predColumnPresent)
           
protected  String buildInsertSelect()
           
 void close()
           
 void committed()
           
 int getBatchSize()
           
 TripleTable getTripleTable()
           
 void insert(Number ctx, Number subj, Number pred, Number obj)
           
 boolean isEmpty()
           
protected  boolean isPredColumnPresent()
           
protected  TripleBatch newTripleBatch()
           
protected  PreparedStatement prepareInsert(String sql)
           
protected  PreparedStatement prepareInsertSelect(String sql)
           
 void removed(int count)
           
 void setBatchSize(int size)
           
 void setConnection(Connection conn)
           
 void setIdSequence(IdSequence ids)
           
 void setQueue(BlockingQueue<Batch> queue)
           
 void setSailChangedEvent(DefaultSailChangedEvent sailChangedEvent)
           
 void setTemporaryTable(RdbmsTable table)
           
 void setTripleTable(TripleTable statements)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionTable

public TransactionTable()
Method Detail

setIdSequence

public void setIdSequence(IdSequence ids)

setQueue

public void setQueue(BlockingQueue<Batch> queue)

setTemporaryTable

public void setTemporaryTable(RdbmsTable table)

setConnection

public void setConnection(Connection conn)

getTripleTable

public TripleTable getTripleTable()

setTripleTable

public void setTripleTable(TripleTable statements)

setSailChangedEvent

public void setSailChangedEvent(DefaultSailChangedEvent sailChangedEvent)

getBatchSize

public int getBatchSize()

setBatchSize

public void setBatchSize(int size)

close

public void close()
           throws SQLException
Throws:
SQLException

insert

public void insert(Number ctx,
                   Number subj,
                   Number pred,
                   Number obj)
            throws SQLException,
                   InterruptedException
Throws:
SQLException
InterruptedException

committed

public void committed()
               throws SQLException
Throws:
SQLException

removed

public void removed(int count)
             throws SQLException
Throws:
SQLException

isEmpty

public boolean isEmpty()
                throws SQLException
Throws:
SQLException

toString

public String toString()
Overrides:
toString in class Object

newTripleBatch

protected TripleBatch newTripleBatch()

prepareInsertSelect

protected PreparedStatement prepareInsertSelect(String sql)
                                         throws SQLException
Throws:
SQLException

buildInsertSelect

protected String buildInsertSelect()
                            throws SQLException
Throws:
SQLException

prepareInsert

protected PreparedStatement prepareInsert(String sql)
                                   throws SQLException
Throws:
SQLException

buildInsert

protected String buildInsert(String tableName,
                             boolean predColumnPresent)
                      throws SQLException
Throws:
SQLException

isPredColumnPresent

protected boolean isPredColumnPresent()


Copyright © 2001-2008 Aduna. All Rights Reserved.