Package generalDatabase.lookupTables
Class LookupList
java.lang.Object
generalDatabase.lookupTables.LookupList
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
Handles information for a single list from the look up table
- Author:
- Doug Gillespie
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(LookupItem lutItem) Add an item to the listCheck for repeated codesfindSpeciesCode
(String code) Find the lookup item for a specified code.getList()
getLookupItem
(int index) Get a lookup item as a specified indexThis method was added only so that lutList will be automatically added to PamParameterSet in the getParameterSet methodGet a set of data that describes all of the parameters in a classint
indexOfCode
(String code) removeItem
(int lutItemIndex) Remove an item at a specified index in the listboolean
removeItem
(LookupItem lutItem) Remove the first occurrence of an item from the listvoid
setListTopic
(String listTopic) void
Sort the items by the code value in the look up table (case insensitive)void
Sort the items by the database id valuevoid
Sort the items by the order value in the look up tablevoid
Sort the items by the text value in the look up table (case insensitive)
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
LookupList
-
-
Method Details
-
getList
- Returns:
- the full list of LookupItems, including ones which are not currently selectable
-
getLutList
This method was added only so that lutList will be automatically added to PamParameterSet in the getParameterSet method- Returns:
-
getSelectedList
- Returns:
- the partial list of LookupItems, currently marked as selectable
-
addItem
Add an item to the list- Parameters:
lutItem
- item to add to the list
-
removeItem
Remove the first occurrence of an item from the list- Parameters:
lutItem
- item to remove from the list- Returns:
- true if the item was found and removed.
-
removeItem
Remove an item at a specified index in the list- Parameters:
lutItemIndex
- index of item to remove- Returns:
- the removed item
-
sortItemsById
public void sortItemsById()Sort the items by the database id value -
sortItemsByOrder
public void sortItemsByOrder()Sort the items by the order value in the look up table -
sortItemsByCode
public void sortItemsByCode()Sort the items by the code value in the look up table (case insensitive) -
sortItemsByText
public void sortItemsByText()Sort the items by the text value in the look up table (case insensitive) -
setListTopic
-
getListTopic
-
checkRepeatCodes
Check for repeated codes- Returns:
- null if there are no repeats or the repeated code if it's repeated.
-
findSpeciesCode
Find the lookup item for a specified code.- Parameters:
code
- given code- Returns:
- matching lookup item (case sensitive)
-
indexOfCode
- Parameters:
code
- species code.- Returns:
- the index of a code.
-
getLookupItem
Get a lookup item as a specified index- Parameters:
index
- index of item- Returns:
- lookup item
-
getDeletedItems
- Returns:
- the deletedItems
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-