com.apelon.dts.common
Class NspIIDGenerator

java.lang.Object
  extended by com.apelon.dts.common.NspIIDGenerator

public class NspIIDGenerator
extends Object

Title: NspSeqIIDGenerator

Description: Builds a IID based on the namespace id and the current table sequence value.

Copyright: Copyright (c) 2005

Company: Apelon Inc.

Since:
3.4.0
Version:
DTS 3.4.0
Author:
Apelon Inc.

Constructor Summary
NspIIDGenerator(Connection conn, com.apelon.common.util.db.dao.GeneralDAO dao)
           
 
Method Summary
 long getIID(int namespaceId, String tableName)
           
 void synchronizeAllSequences()
          This synchronizes all the sequence objects in cache with db.
 void synchSequences(HashMap seqMap, Connection targetConn)
          This synchronizes all sequences in the target connection as provided in the HashMap.
 void updateSequence(String seqName, long startSeqVal, long incSeqVal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NspIIDGenerator

public NspIIDGenerator(Connection conn,
                       com.apelon.common.util.db.dao.GeneralDAO dao)
Method Detail

getIID

public long getIID(int namespaceId,
                   String tableName)
            throws SQLException
Throws:
SQLException

synchronizeAllSequences

public void synchronizeAllSequences()
                             throws SQLException
This synchronizes all the sequence objects in cache with db. This should be run at the end of data loading process.

Throws:
SQLException

updateSequence

public void updateSequence(String seqName,
                           long startSeqVal,
                           long incSeqVal)
                    throws SQLException
Throws:
SQLException

synchSequences

public void synchSequences(HashMap seqMap,
                           Connection targetConn)
                    throws SQLException
This synchronizes all sequences in the target connection as provided in the HashMap.

Throws:
SQLException


Copyright © 2011. All Rights Reserved.