Class Merge

java.lang.Object
org.compiere.apps.form.Merge
Direct Known Subclasses:
WMerge

public class Merge extends Object
Form to Merge source/from record to target/to record
  • Field Details

    • m_WindowNo

      protected int m_WindowNo
      Window No
    • m_totalCount

      protected int m_totalCount
      Total Count
    • m_errorLog

      protected StringBuffer m_errorLog
      Error Log
    • log

      protected static final CLogger log
      Logger
    • AD_ORG_ID

      public static String AD_ORG_ID
    • C_BPARTNER_ID

      public static String C_BPARTNER_ID
    • AD_USER_ID

      public static String AD_USER_ID
    • M_PRODUCT_ID

      public static String M_PRODUCT_ID
    • s_delete_Org

      protected static String[] s_delete_Org
      Tables to delete (not update) for AD_Org
    • s_delete_User

      protected static String[] s_delete_User
      Tables to delete (not update) for AD_User
    • s_delete_BPartner

      protected static String[] s_delete_BPartner
      Tables to delete (not update) for C_BPartner
    • s_delete_Product

      protected static String[] s_delete_Product
      Tables to delete (not update) for M_Product
    • m_columnName

      protected String[] m_columnName
    • m_deleteTables

      protected String[] m_deleteTables
  • Constructor Details

    • Merge

      public Merge()
  • Method Details

    • updateDeleteTable

      protected void updateDeleteTable(String columnName)
      Determine the list of tables to delete records by key columnName
      Parameters:
      columnName -
    • merge

      public boolean merge(String ColumnName, int from_ID, int to_ID)
      Execute Merge.
      Parameters:
      ColumnName - ID column (M_Product_ID, AD_Org_ID, C_BPartner_ID or AD_User_ID)
      from_ID - from id
      to_ID - to id
      Returns:
      true if merged
    • mergeTable

      protected int mergeTable(String TableName, String ColumnName, int from_ID, int to_ID)
      Execute Merge for record in a Table
      Parameters:
      TableName - table name
      ColumnName - key column name
      from_ID - from id
      to_ID - to id
      Returns:
      -1 for error or number of records updated
    • postMerge

      public void postMerge(String ColumnName, int to_ID)
      Post Merge Operations
      Parameters:
      ColumnName - key column name
      to_ID - to id