JavaDoc


OperationInsert

org.dbreplicator.replication.synchronize
Class OperationInsert

java.lang.Object
  extended by org.dbreplicator.replication.synchronize.AbstractSynchronize
      extended by org.dbreplicator.replication.synchronize.OperationInsert

public class OperationInsert
extends AbstractSynchronize

This is the main class which handles the synchronization operations on main table when merge handler reads Insert operation from the XML file.


Field Summary
 
Fields inherited from class org.dbreplicator.replication.synchronize.AbstractSynchronize
deleteCount, insertCount, updateCount
 
Constructor Summary
OperationInsert(RepTable repTable0, java.sql.Connection connection0, java.util.TreeMap columnObjectTreeMap0, java.lang.Object conisderedId0, java.lang.Object lastSyncId0, java.lang.String remoteServerName0, AbstractDataBaseHandler dbHandler0, java.io.BufferedWriter bw0, java.lang.String replicationType0, java.lang.String transactionLogType0, MetaDataInfo mdi0, boolean isFirstPass0, boolean isCurrentTableCyclic0, java.lang.String localName0, java.lang.String remoteName0)
          OperationInsert handles th case related to Insert operation i.e.
 
Method Summary
 void closeAllStatments()
           
 void execute(XMLElement currentElement)
          Inserts a record in the corresponding Table.
 java.lang.Object getLastSyncId()
          returns last synchronisation id from shadow Table
 
Methods inherited from class org.dbreplicator.replication.synchronize.AbstractSynchronize
checkAutocommit, setAutocomitTrueAndCommitRecord, writeDateInTransactionLogFile, writeOperationInTransactionLogFile, writeUnsuccessfullOperationInTransaction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationInsert

public OperationInsert(RepTable repTable0,
                       java.sql.Connection connection0,
                       java.util.TreeMap columnObjectTreeMap0,
                       java.lang.Object conisderedId0,
                       java.lang.Object lastSyncId0,
                       java.lang.String remoteServerName0,
                       AbstractDataBaseHandler dbHandler0,
                       java.io.BufferedWriter bw0,
                       java.lang.String replicationType0,
                       java.lang.String transactionLogType0,
                       MetaDataInfo mdi0,
                       boolean isFirstPass0,
                       boolean isCurrentTableCyclic0,
                       java.lang.String localName0,
                       java.lang.String remoteName0)
                throws java.sql.SQLException
OperationInsert handles th case related to Insert operation i.e. when a record with Insert operation is found in XML File.

Parameters:
repTable0 - instance of RepTable for which insert operation is called.
connection0 - instance of Connection with local server
columnObjectTreeMap0 - columnTreeMap containing the column objects of respective columns of main table.
conisderedId0 - last UID ahead from which records of the shadow table are to be searched .
lastSyncId0 - last UID ahead from which records of the shadow table are to be searched .
remoteServerName0 - remoteServer Name.
dbHandler0 - AbstractDataBaseHandler
bw0 - BufferedWriter
replicationType0 - String
transactionLogType0 - String
mdi0 - MetaDataInfo
isFirstPass0 - boolean
isCurrentTableCyclic0 - boolean
localName0 - String
remoteName0 - String
Throws:
java.sql.SQLException
Method Detail

execute

public void execute(XMLElement currentElement)
             throws java.sql.SQLException,
                    RepException
Inserts a record in the corresponding Table.

Parameters:
currentElement -
Throws:
java.sql.SQLException
RepException

getLastSyncId

public java.lang.Object getLastSyncId()
                               throws java.sql.SQLException
returns last synchronisation id from shadow Table

Returns:
Object Last sync id from shadow table
Throws:
java.sql.SQLException

closeAllStatments

public void closeAllStatments()



Powered by Drupal - Theme by Danger4k