openr66.database.data
Class DbMultipleMonitor

java.lang.Object
  extended by goldengate.common.database.data.AbstractDbData
      extended by openr66.database.data.DbMultipleMonitor

public class DbMultipleMonitor
extends goldengate.common.database.data.AbstractDbData

Configuration Table object

Author:
Frederic Bregier

Nested Class Summary
static class DbMultipleMonitor.Columns
           
 
Nested classes/interfaces inherited from class goldengate.common.database.data.AbstractDbData
goldengate.common.database.data.AbstractDbData.UpdatedInfo
 
Field Summary
 int countConfig
           
 int countHost
           
 int countRule
           
static int[] dbTypes
           
protected static String insertAllValues
           
static int NBPRKEY
           
protected static String selectAllFields
           
static String table
           
protected static String updateAllFields
           
 
Fields inherited from class goldengate.common.database.data.AbstractDbData
allFields, dbSession, isSaved, otherFields, primaryKey
 
Constructor Summary
DbMultipleMonitor(goldengate.common.database.DbSession dbSession, String hostid)
           
DbMultipleMonitor(goldengate.common.database.DbSession dbSession, String hostid, int cc, int ch, int cr)
           
 
Method Summary
 void changeUpdatedInfo(goldengate.common.database.data.AbstractDbData.UpdatedInfo info)
           
 boolean checkUpdateConfig()
          On Commander side
 boolean checkUpdateHost()
          On Commander side
 boolean checkUpdateRule()
          On Commander side
 void delete()
           
 boolean exist()
           
static DbMultipleMonitor getFromStatement(goldengate.common.database.DbPreparedStatement preparedStatement)
          For instance from Commander when getting updated information
protected  String getInsertAllValues()
           
protected  String getSelectAllFields()
           
protected  String getTable()
           
protected  String getUpdateAllFields()
           
static goldengate.common.database.DbPreparedStatement getUpdatedPrepareStament(goldengate.common.database.DbSession session)
           
protected  String getWherePrimaryKey()
           
protected  void initObject()
           
 void insert()
           
 void select()
           
protected  void setFromArray()
           
protected  void setPrimaryKey()
           
protected  void setToArray()
           
 String toString()
          return the String representation
 void update()
           
 
Methods inherited from class goldengate.common.database.data.AbstractDbData
get, getTrueValue, getValue, getValues, setTrueValue, setValue, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dbTypes

public static final int[] dbTypes

table

public static final String table
See Also:
Constant Field Values

countConfig

public int countConfig

countHost

public int countHost

countRule

public int countRule

NBPRKEY

public static final int NBPRKEY
See Also:
Constant Field Values

selectAllFields

protected static final String selectAllFields

updateAllFields

protected static final String updateAllFields

insertAllValues

protected static final String insertAllValues
See Also:
Constant Field Values
Constructor Detail

DbMultipleMonitor

public DbMultipleMonitor(goldengate.common.database.DbSession dbSession,
                         String hostid,
                         int cc,
                         int ch,
                         int cr)
Parameters:
dbSession -
hostid -
cc - count for Config
ch - count for Host
cr - count for Rule

DbMultipleMonitor

public DbMultipleMonitor(goldengate.common.database.DbSession dbSession,
                         String hostid)
                  throws goldengate.common.database.exception.GoldenGateDatabaseException
Parameters:
dbSession -
hostid -
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException
Method Detail

initObject

protected void initObject()
Specified by:
initObject in class goldengate.common.database.data.AbstractDbData

getSelectAllFields

protected String getSelectAllFields()
Specified by:
getSelectAllFields in class goldengate.common.database.data.AbstractDbData

getTable

protected String getTable()
Specified by:
getTable in class goldengate.common.database.data.AbstractDbData

getInsertAllValues

protected String getInsertAllValues()
Specified by:
getInsertAllValues in class goldengate.common.database.data.AbstractDbData

getUpdateAllFields

protected String getUpdateAllFields()
Specified by:
getUpdateAllFields in class goldengate.common.database.data.AbstractDbData

setToArray

protected void setToArray()
Specified by:
setToArray in class goldengate.common.database.data.AbstractDbData

setFromArray

protected void setFromArray()
                     throws goldengate.common.database.exception.GoldenGateDatabaseSqlException
Specified by:
setFromArray in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseSqlException

getWherePrimaryKey

protected String getWherePrimaryKey()
Specified by:
getWherePrimaryKey in class goldengate.common.database.data.AbstractDbData

setPrimaryKey

protected void setPrimaryKey()
Specified by:
setPrimaryKey in class goldengate.common.database.data.AbstractDbData

delete

public void delete()
            throws goldengate.common.database.exception.GoldenGateDatabaseException
Overrides:
delete in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException

insert

public void insert()
            throws goldengate.common.database.exception.GoldenGateDatabaseException
Overrides:
insert in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException

exist

public boolean exist()
              throws goldengate.common.database.exception.GoldenGateDatabaseException
Overrides:
exist in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException

select

public void select()
            throws goldengate.common.database.exception.GoldenGateDatabaseException
Overrides:
select in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException

update

public void update()
            throws goldengate.common.database.exception.GoldenGateDatabaseException
Overrides:
update in class goldengate.common.database.data.AbstractDbData
Throws:
goldengate.common.database.exception.GoldenGateDatabaseException

getFromStatement

public static DbMultipleMonitor getFromStatement(goldengate.common.database.DbPreparedStatement preparedStatement)
                                          throws goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException,
                                                 goldengate.common.database.exception.GoldenGateDatabaseSqlException
For instance from Commander when getting updated information

Parameters:
preparedStatement -
Returns:
the next updated Configuration
Throws:
goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException
goldengate.common.database.exception.GoldenGateDatabaseSqlException

getUpdatedPrepareStament

public static goldengate.common.database.DbPreparedStatement getUpdatedPrepareStament(goldengate.common.database.DbSession session)
                                                                               throws goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException,
                                                                                      goldengate.common.database.exception.GoldenGateDatabaseSqlException
Returns:
the DbPreparedStatement for getting Updated Object in "FOR UPDATE" mode
Throws:
goldengate.common.database.exception.GoldenGateDatabaseNoConnectionException
goldengate.common.database.exception.GoldenGateDatabaseSqlException

checkUpdateConfig

public boolean checkUpdateConfig()
On Commander side

Returns:
True if this is the last update

checkUpdateHost

public boolean checkUpdateHost()
On Commander side

Returns:
True if this is the last update

checkUpdateRule

public boolean checkUpdateRule()
On Commander side

Returns:
True if this is the last update

changeUpdatedInfo

public void changeUpdatedInfo(goldengate.common.database.data.AbstractDbData.UpdatedInfo info)
Specified by:
changeUpdatedInfo in class goldengate.common.database.data.AbstractDbData

toString

public String toString()
return the String representation

Overrides:
toString in class Object


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.