Class MLocatorLookup

All Implemented Interfaces:
Serializable, ComboBoxModel<Object>, ListModel<Object>, MutableComboBoxModel<Object>

public final class MLocatorLookup extends Lookup implements Serializable
Warehouse Locator Lookup Model.
Version:
$Id: MLocatorLookup.java,v 1.3 2006/07/30 00:58:04 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1892920 ] Locators fieldshould be ordered by Warehouse/Value
  • FR [ 2306161 ] Removed limit of 200 on max number of locators.
  • See Also:
    • Field Details

      • C_Locator_ID

        protected int C_Locator_ID
    • Constructor Details

      • MLocatorLookup

        public MLocatorLookup(Properties ctx, int WindowNo)
        Constructor
        Parameters:
        ctx - context
        WindowNo - window no
      • MLocatorLookup

        public MLocatorLookup(Properties ctx, int WindowNo, String validationCode)
        Constructor
        Parameters:
        ctx - context
        WindowNo - window no
        validationCode - Lookup validation code
    • Method Details

      • dispose

        public void dispose()
        Dispose
        Overrides:
        dispose in class Lookup
      • setOnly_Warehouse_ID

        public void setOnly_Warehouse_ID(int only_Warehouse_ID)
        Set Warehouse restriction
        Parameters:
        only_Warehouse_ID - warehouse
      • getOnly_Warehouse_ID

        public int getOnly_Warehouse_ID()
        Get Only Wahrehouse
        Returns:
        M_Warehouse_ID
      • setOnly_Product_ID

        public void setOnly_Product_ID(int only_Product_ID)
        Set Product restriction
        Parameters:
        only_Product_ID - Product
      • getOnly_Product_ID

        public int getOnly_Product_ID()
        Get Only Product
        Returns:
        M_Product_ID
      • loadComplete

        public void loadComplete()
        Wait until async Load Complete
        Overrides:
        loadComplete in class Lookup
      • get

        public NamePair get(Object key)
        Get KeyNamePair via key value. Delegate to getDirect(Object, boolean, String) if key not in local lookup cache(m_lookup).
        Specified by:
        get in class Lookup
        Parameters:
        key - key value
        Returns:
        KeyNamePair
      • getDisplay

        public String getDisplay(Object key)
        Get Display text
        Specified by:
        getDisplay in class Lookup
        Parameters:
        key - key value
        Returns:
        display text
      • containsKey

        public boolean containsKey(Object key)
        The Lookup contains the key
        Specified by:
        containsKey in class Lookup
        Parameters:
        key - key
        Returns:
        true, if lookup contains key
      • containsKeyNoDirect

        public boolean containsKeyNoDirect(Object key)
        Same as containsKey(Object) in this lookup implementation.
        Specified by:
        containsKeyNoDirect in class Lookup
        Parameters:
        key - key
        Returns:
        true if contains key
      • getDirect

        public NamePair getDirect(Object keyValue, boolean saveInCache, String trxName)
        Get from MLocator cache or DB
        Parameters:
        keyValue - integer key value
        saveInCache - true save in lookup cache
        trxName - transaction
        Returns:
        KeyNamePair
      • getMLocator

        public MLocator getMLocator(Object keyValue, String trxName)
        Get from MLocator cache or DB
        Parameters:
        keyValue - integer key value
        trxName - transaction
        Returns:
        MLocator
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.
      • isValid

        public boolean isValid(Object key)
        Is Locator with key valid (Warehouse)
        Parameters:
        key - key
        Returns:
        true if valid
      • isValid

        public boolean isValid(MLocator locator)
        Is Locator with key valid (Warehouse)
        Parameters:
        locator - locator
        Returns:
        true if valid
      • getData

        public Collection<MLocator> getData()
        Return data as Locator ArrayList, waits for loader to finish if loading is in progress.
        Returns:
        Collection of MLocator
      • getData

        public ArrayList<Object> getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary, boolean shortlist)
        Get lookup data
        Specified by:
        getData in class Lookup
        Parameters:
        mandatory - mandatory
        onlyValidated - only validated
        onlyActive - only active
        temporary - force load for temporary display
        Returns:
        ArrayList of lookup values
      • refresh

        public int refresh()
        Refresh local lookup cache
        Overrides:
        refresh in class Lookup
        Returns:
        new size of lookup
      • refreshIfNeeded

        public int refreshIfNeeded()
        Call refresh() if isNeedRefresh() return true.
        Returns:
        lookup size
      • getColumnName

        public String getColumnName()
        Get underlying fully qualified Table.Column Name
        Specified by:
        getColumnName in class Lookup
        Returns:
        Table.ColumnName
      • dynamicDisplay

        public void dynamicDisplay(Properties ctx)
      • setValidationCode

        public void setValidationCode(String validationCode)
        Set SQL validation code for lookup
        Parameters:
        validationCode -