Class IDFinder


  • public class IDFinder
    extends Object
    Utility class for the looking up of record id.
    Author:
    Low Heng Sin
    • Constructor Detail

      • IDFinder

        public IDFinder()
    • Method Detail

      • findIdByColumn

        public static int findIdByColumn​(String tableName,
                                         String columnName,
                                         Object value,
                                         int AD_Client_ID,
                                         boolean ignorecase,
                                         String trxName)
        Get ID from column value for a table.
        Parameters:
        tableName -
        columnName -
        value -
        AD_Client_ID -
        ignorecase -
        trxName -
        Returns:
      • findIdByColumn

        public static int findIdByColumn​(String tableName,
                                         String columnName,
                                         Object value,
                                         int clientId,
                                         String trxName)
      • findIdByNameAndParentName

        public static int findIdByNameAndParentName​(String tableName,
                                                    String name,
                                                    String tableNameMaster,
                                                    String nameMaster,
                                                    int AD_Client_ID,
                                                    String trxName)
        Get ID from Name for a table with a parent name reference.
        Parameters:
        tableName -
        name -
        tableNameMaster -
        nameMaster -
        trxName -
      • findIdByColumnAndParentId

        public static int findIdByColumnAndParentId​(String tableName,
                                                    String columnName,
                                                    String name,
                                                    String tableNameMaster,
                                                    int masterID,
                                                    int AD_Client_ID,
                                                    String trxName)
        Get ID from column value for a table with a parent id reference.
        Parameters:
        tableName -
        columnName -
        name -
        tableNameMaster -
        masterID -
        AD_Client_ID -
        trxName -
        Returns:
      • findIdByColumnAndParentId

        public static int findIdByColumnAndParentId​(String tableName,
                                                    String columnName,
                                                    String name,
                                                    String tableNameMaster,
                                                    int masterID,
                                                    int AD_Client_ID,
                                                    boolean ignoreCase,
                                                    String trxName)
        Get ID from column value for a table with a parent id reference.
        Parameters:
        tableName -
        name -
        tableNameMaster -
        masterID -
        trxName -
      • findIdByNameAndParentId

        public static int findIdByNameAndParentId​(String tableName,
                                                  String name,
                                                  String tableNameMaster,
                                                  int masterID,
                                                  int AD_Client_ID,
                                                  String trxName)
        Get ID from Name for a table with a parent reference ID.
        Parameters:
        tableName -
        name -
        tableNameMaster -
        masterID -
        trxName -
      • findIdByName

        public static int findIdByName​(String tableName,
                                       String name,
                                       int AD_Client_ID,
                                       String trxName)
        Get ID from Name for a table.
        Parameters:
        tableName -
        name -
        AD_Client_ID -
        trxName -
      • clearIDCache

        public static void clearIDCache()