Class AbstractElementHandler

    • Field Detail

      • log

        protected transient CLogger log
    • Constructor Detail

      • AbstractElementHandler

        public AbstractElementHandler()
    • Method Detail

      • backupRecord

        public void backupRecord​(PIPOContext ctx,
                                 int AD_Package_Imp_Detail_ID,
                                 String tableName,
                                 PO from)
        Make backup copy of record.
        Parameters:
        ctx -
        AD_Package_Imp_Detail_ID -
        tableName -
        from -
      • OpenInputfile

        public FileInputStream OpenInputfile​(String filePath)
        Open input file for processing
        Parameters:
        filePath - file with path
        Returns:
      • OpenOutputfile

        public OutputStream OpenOutputfile​(String filePath)
        Open output file for processing
        Parameters:
        filePath - file with path
        Returns:
      • copyFile

        public int copyFile​(InputStream source,
                            OutputStream target)
        Copyfile
        Parameters:
        source -
        target -
        Returns:
      • getClientId

        protected int getClientId​(Properties ctx)
        Get client id
        Parameters:
        ctx -
        Returns:
        int
      • getPackageImpId

        protected int getPackageImpId​(Properties ctx)
        Get AD_Package_Imp_ID
        Parameters:
        ctx -
        Returns:
        int
      • getUpdateMode

        protected String getUpdateMode​(Properties ctx)
        Get update system maintained dictionary flag
        Parameters:
        ctx -
        Returns:
        update mode
      • getTrxName

        protected String getTrxName​(PIPOContext ctx)
        Get current transaction name
        Parameters:
        ctx -
        Returns:
        transaction name
      • getPackageDirectory

        protected String getPackageDirectory​(Properties ctx)
        Parameters:
        ctx -
        Returns:
        package directory
      • isProcessElement

        protected boolean isProcessElement​(Properties ctx,
                                           String entityType)
        Process element by entity type and user setting.
        Parameters:
        ctx -
        entityType -
        Returns:
        boolean
      • getStringValue

        protected String getStringValue​(Element element,
                                        String qName)
        return null for empty string ("").
        Parameters:
        element -
        qName -
        Returns:
        string value
      • getStringValue

        protected String getStringValue​(Element element,
                                        String qName,
                                        List<String> excludes)
        return null for empty string ("").
        Parameters:
        element -
        qName -
        Returns:
        string value
      • getBooleanValue

        protected boolean getBooleanValue​(Element element,
                                          String qName,
                                          boolean defaultValue)
        Parameters:
        element -
        qName -
        defaultValue -
        Returns:
        boolean
      • getBigDecimal

        protected BigDecimal getBigDecimal​(Element element,
                                           String qName)
        Parameters:
        element -
        qName -
        Returns:
        BigDecimal
      • getIntValue

        protected int getIntValue​(Element element,
                                  String qName)
        Parameters:
        element -
        qName -
        Returns:
        int
      • isHandleTranslations

        protected boolean isHandleTranslations​(Properties ctx)
        Returns option - Is export-import of AD translations is needed
        Parameters:
        ctx -
        Returns:
      • defaultExcludeList

        protected List<String> defaultExcludeList​(String tableName)
        Parameters:
        tableName -
        Returns:
        list of column to exclude from processing
      • getParentId

        protected int getParentId​(Element element,
                                  String expectedName)
        Parameters:
        element -
        expectedName -
        Returns:
        Parent element record id
      • isParentDefer

        protected boolean isParentDefer​(Element element,
                                        String expectedName)
        Parameters:
        element -
        expectedName -
        Returns:
        true if parent element is defer for next round of processing
      • isParentSkip

        protected boolean isParentSkip​(Element element,
                                       String expectedName)
        Parameters:
        element -
        expectedName -
        Returns:
        true if parent element is being ignore
      • isOfficialId

        protected boolean isOfficialId​(Element element,
                                       String columnName)
        Parameters:
        element -
        columnName -
        Returns:
        true if value of columnName is office id.
      • findPO

        protected <T extends PO> T findPO​(PIPOContext ctx,
                                          Element element)
        Find po by uuid or id
        Type Parameters:
        T -
        Parameters:
        ctx -
        element -
        Returns:
        T
      • addTypeName

        protected void addTypeName​(AttributesImpl atts,
                                   String typeName)
        Parameters:
        atts -
        typeName -
      • verifyPackOutRequirement

        protected void verifyPackOutRequirement​(PO po)
      • isPackOutElement

        protected boolean isPackOutElement​(PIPOContext ctx,
                                           PO element)