psdi.dm.distribution

Class DMStagingHandler

  • java.lang.Object
    • psdi.dm.distribution.DMStagingHandler


  • public class DMStagingHandler
    extends java.lang.Object
    Writes data to target dmpkgstaging table using JDBC connection
    • Constructor Detail

      • DMStagingHandler

        public DMStagingHandler()
    • Method Detail

      • action

        public void action(MboRemote pkgMbo,
                           MboRemote infoMbo)
                    throws MXException,
                           java.rmi.RemoteException
        Distribute source staging records to target staging table
        Parameters:
        pkgMbo -
        infoMbo -
        driver -
        Throws:
        MXException
        java.rmi.RemoteException
      • deleteCommittedTargetStagingRecords

        public void deleteCommittedTargetStagingRecords(java.sql.Connection conn,
                                                        MboRemote pkgMbo)
                                                 throws MXException
        Delete target staging records if there is any error
        Parameters:
        conn -
        source -
        pkgDefName -
        pkg -
        Throws:
        MXException
      • readSourceStagingtable

        public void readSourceStagingtable(java.sql.Connection conn,
                                           MboRemote pkgMbo)
                                    throws MXException
        Read source staging table records
        Parameters:
        conn -
        source -
        pkgDefName -
        pkg -
        userStr -
        Throws:
        MXException
      • writeToTargetStagingtable

        public void writeToTargetStagingtable(MboRemote stageMbo,
                                              java.sql.Connection conn)
                                       throws MXException
        Writes source staging entries to target database
        Parameters:
        stageMbo -
        conn -
        Throws:
        MXException
      • setBindValue

        public void setBindValue(java.sql.PreparedStatement pstmt,
                                 MboRemote stageMbo,
                                 int bindIndex,
                                 MboValue mv,
                                 java.lang.String columnName,
                                 java.lang.String dbName)
                          throws java.lang.Exception
        Sets the bind value depending on type
        Parameters:
        pstmt -
        stageMbo -
        bindIndex -
        mv -
        columnName -
        Throws:
        java.lang.Exception
      • updateTargetDistStatus

        public void updateTargetDistStatus(java.sql.Connection conn,
                                           MboRemote pkgMbo)
                                    throws MXException
        Update distribution status to 1 for target staging records
        Parameters:
        conn -
        source -
        pkgDefName -
        pkg -
        Throws:
        MXException
      • checkPkgAlreadyDistributed

        public boolean checkPkgAlreadyDistributed(java.sql.Connection conn,
                                                  MboRemote pkgMbo)
                                           throws MXException
        Update distribution status to 1 for target staging records
        Parameters:
        conn -
        source -
        pkgDefName -
        pkg -
        Throws:
        MXException