Class MLookup

    • Constructor Detail

      • MLookup

        public MLookup​(MLookupInfo info,
                       int TabNo)
        MLookup Constructor
        Parameters:
        info - info
        TabNo - tab no
    • Method Detail

      • dispose

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

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

        public NamePair get​(Object key,
                            boolean includeDirect)
        Get value (name) for key. If not found return null;
        Parameters:
        key - key (Integer for Keys or String for Lists)
        Returns:
        value
      • get

        public NamePair get​(Object key)
        Description copied from class: Lookup
        Get Object of Key Value
        Specified by:
        get in class Lookup
        Parameters:
        key - key
        Returns:
        Object or null
      • getDisplay

        public String getDisplay​(Object key)
        Get Display value (name). If not found return key embedded in inactive signs.
        Specified by:
        getDisplay in class Lookup
        Parameters:
        key - key
        Returns:
        value
      • containsKey

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

        public boolean containsKeyNoDirect​(Object key)
        The Lookup contains the key, do not get direct
        Specified by:
        containsKeyNoDirect in class Lookup
        Parameters:
        key - key
        Returns:
        true if key is known
      • toString

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

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • size

        public int size()
        Return Size
        Returns:
        size
      • isAllLoaded

        public boolean isAllLoaded()
        Is it all loaded
        Returns:
        true, if all loaded
      • isValidated

        public boolean isValidated()
        Is the List fully Validated
        Overrides:
        isValidated in class Lookup
        Returns:
        true, if validated
      • getValidation

        public String getValidation()
        Get Validation SQL
        Overrides:
        getValidation in class Lookup
        Returns:
        Validation SQL
      • getAD_Reference_Value_ID

        public int getAD_Reference_Value_ID()
        Get Reference Value
        Returns:
        Reference Value
      • hasInactive

        public boolean hasInactive()
        Has inactive elements in list
        Overrides:
        hasInactive in class Lookup
        Returns:
        true, if list contains inactive values
      • getAD_InfoWindow_ID

        public int getAD_InfoWindow_ID()
        Returns:
        AD_InfoWindow_ID
      • getData

        public ArrayList<Object> getData​(boolean mandatory,
                                         boolean onlyValidated,
                                         boolean onlyActive,
                                         boolean temporary,
                                         boolean shortlist)
        Return data as Array containing Value/KeyNamePair
        Specified by:
        getData in class Lookup
        Parameters:
        mandatory - if not mandatory, an additional empty value is inserted
        onlyValidated - only validated
        onlyActive - only active
        temporary - force load for temporary display
        shortlist -
        Returns:
        list
      • getDirect

        public NamePair getDirect​(Object key,
                                  boolean saveInCache,
                                  boolean cacheLocal,
                                  String trxName)
        Get Data Direct from Table.
        Overrides:
        getDirect in class Lookup
        Parameters:
        key - key
        saveInCache - save in cache for r/w
        cacheLocal - cache locally for r/o
        trxName - the transaction name
        Returns:
        value
      • getZoom

        public int getZoom()
        Get Zoom
        Overrides:
        getZoom in class Lookup
        Returns:
        Zoom AD_Window_ID
      • getZoom

        public int getZoom​(MQuery query)
        Get Zoom
        Overrides:
        getZoom in class Lookup
        Parameters:
        query - query
        Returns:
        Zoom Window
      • getZoom

        public int getZoom​(boolean isSOTrx)
        Overrides:
        getZoom in class Lookup
        Returns:
        Zoom AD_Window_ID
      • getZoomQuery

        public MQuery getZoomQuery()
        Get Zoom Query String
        Overrides:
        getZoomQuery in class Lookup
        Returns:
        Zoom SQL Where Clause
      • getColumnName

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

        public int refresh()
        Refresh and return number of items read. Get get data of parent lookups
        Overrides:
        refresh in class Lookup
        Returns:
        no of items read
      • refreshItemsAndCache

        public int refreshItemsAndCache()
      • refresh

        public int refresh​(boolean loadParent)
        Refresh and return number of items read
        Parameters:
        loadParent - get data of parent lookups
        Returns:
        no of items refresh
      • getLookupInfo

        public MLookupInfo getLookupInfo()
        Returns:
        lookup info