Adempiere 3.5.2a

org.compiere.model
Class MLocatorLookup

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.compiere.model.Lookup
          extended by org.compiere.model.MLocatorLookup
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel, MutableComboBoxModel

public final class MLocatorLookup
extends Lookup
implements Serializable

Warehouse Locator Lookup Model. (Lookup Model is model.Lookup.java)

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
  • See Also:
    Serialized Form

    Field Summary
    protected  int C_Locator_ID
               
     
    Fields inherited from class org.compiere.model.Lookup
    log, p_data
     
    Fields inherited from class javax.swing.AbstractListModel
    listenerList
     
    Constructor Summary
    MLocatorLookup(Properties ctx, int WindowNo)
              Constructor
     
    Method Summary
     boolean containsKey(Object key)
              The Lookup contains the key
     void dispose()
              Dispose
     NamePair get(Object key)
              Get value
     String getColumnName()
              Get underlying fully qualified Table.Column Name
     Collection<MLocator> getData()
              Return info as ArrayList containing Locator, waits for the loader to finish
     ArrayList<Object> getData(boolean mandatory, boolean onlyValidated, boolean onlyActive, boolean temporary)
              Return data as sorted ArrayList
     NamePair getDirect(Object keyValue, boolean saveInCache, String trxName)
              Get Data Direct from Table
     String getDisplay(Object value)
              Get Display value
     MLocator getMLocator(Object keyValue, String trxName)
              Get Data Direct from Table
     int getOnly_Product_ID()
              Get Only Product
     int getOnly_Warehouse_ID()
              Get Only Wahrehouse
     boolean isValid(MLocator locator)
              Is Locator with key valid (Warehouse)
     boolean isValid(Object key)
              Is Locator with key valid (Warehouse)
     void loadComplete()
              Wait until async Load Complete
     int refresh()
              Refresh Values
     void setOnly_Product_ID(int only_Product_ID)
              Set Product restriction
     void setOnly_Warehouse_ID(int only_Warehouse_ID)
              Set Warehouse restriction
     String toString()
               
     
    Methods inherited from class org.compiere.model.Lookup
    addElement, fillComboBox, fillComboBox, getDirect, getDisplayType, getElementAt, getIndexOf, getInfoFactoryClass, getSelectedItem, getSize, getValidation, getWindowNo, getZoom, getZoom, getZoomQuery, hasInactive, insertElementAt, isLoaded, isMandatory, isValidated, put, put, removeAllElements, removeElement, removeElementAt, setMandatory, setSelectedItem
     
    Methods inherited from class javax.swing.AbstractListModel
    addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface javax.swing.ListModel
    addListDataListener, removeListDataListener
     

    Field Detail

    C_Locator_ID

    protected int C_Locator_ID
    Constructor Detail

    MLocatorLookup

    public MLocatorLookup(Properties ctx,
                          int WindowNo)
    Constructor

    Parameters:
    ctx - context
    WindowNo - window no
    Method Detail

    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:
    warehouse

    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:
    Product

    loadComplete

    public void loadComplete()
    Wait until async Load Complete

    Overrides:
    loadComplete in class Lookup

    get

    public NamePair get(Object key)
    Get value

    Specified by:
    get in class Lookup
    Parameters:
    key - key
    Returns:
    value value

    getDisplay

    public String getDisplay(Object value)
    Get Display value

    Specified by:
    getDisplay in class Lookup
    Parameters:
    value - value
    Returns:
    String to display

    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

    getDirect

    public NamePair getDirect(Object keyValue,
                              boolean saveInCache,
                              String trxName)
    Get Data Direct from Table

    Parameters:
    keyValue - integer key value
    saveInCache - save in cache
    trxName - transaction
    Returns:
    Object directly loaded

    getMLocator

    public MLocator getMLocator(Object keyValue,
                                String trxName)
    Get Data Direct from Table

    Parameters:
    keyValue - integer key value
    trxName - transaction
    Returns:
    Object directly loaded

    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 info as ArrayList containing Locator, waits for the loader to finish

    Returns:
    Collection of lookup values

    getData

    public ArrayList<Object> getData(boolean mandatory,
                                     boolean onlyValidated,
                                     boolean onlyActive,
                                     boolean temporary)
    Return data as sorted ArrayList

    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 Values

    Overrides:
    refresh in class Lookup
    Returns:
    new size of lookup

    getColumnName

    public String getColumnName()
    Get underlying fully qualified Table.Column Name

    Specified by:
    getColumnName in class Lookup
    Returns:
    Table.ColumnName

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.