com.flexive.shared.value
Class SelectMany

java.lang.Object
  extended by com.flexive.shared.value.SelectMany
All Implemented Interfaces:
java.io.Serializable

public class SelectMany
extends java.lang.Object
implements java.io.Serializable

Container for manipulating FxSelectList items used in FxSelectMany values

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
SelectMany(FxSelectList list)
          Constructor
 
Method Summary
 SelectMany deselect(long id)
          Deselect an item by its id, will throw an exception if item id does not belong to the managed list
 void deselectAll()
          Deselects all items
 SelectMany deselectItem(FxSelectListItem item)
          Deselect an item
 boolean equals(java.lang.Object o)
           
 java.util.List<FxSelectListItem> getAvailable()
          Get all items available for selection (unmodifiable!)
 java.util.List<FxSelectListItem> getSelected()
          Get all items selected (unmodifiable!)
 java.util.List<java.lang.Long> getSelectedIds()
          Return the selected item ids.
 java.lang.String getSelectedIdsList()
          Get an ordered comma separated list of selected id's
 java.util.List<java.lang.String> getSelectedLabels()
          Return the selected item labels.
 FxSelectList getSelectList()
          Get this SelectMany's SelectList
 int hashCode()
           
 SelectMany select(long id)
          Select an item by its id, will throw an exception if item id does not belong to the managed list
 SelectMany selectFromList(java.lang.String list)
          Select all items that are in the given comma separated list
 SelectMany selectItem(FxSelectListItem item)
          Select an item
 void setSelectList(FxSelectList list)
          Updates the select list for this instance.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectMany

public SelectMany(FxSelectList list)
Constructor

Parameters:
list - the handled list
Method Detail

getAvailable

public java.util.List<FxSelectListItem> getAvailable()
Get all items available for selection (unmodifiable!)

Returns:
all items available for selection (unmodifiable!)

getSelected

public java.util.List<FxSelectListItem> getSelected()
Get all items selected (unmodifiable!)

Returns:
all items selected (unmodifiable!)

getSelectedIds

public java.util.List<java.lang.Long> getSelectedIds()
Return the selected item ids.

Returns:
the selected item ids.

getSelectedLabels

public java.util.List<java.lang.String> getSelectedLabels()
Return the selected item labels.

Returns:
the selected item labels.

select

public SelectMany select(long id)
Select an item by its id, will throw an exception if item id does not belong to the managed list

Parameters:
id - item id to select
Returns:
this

selectFromList

public SelectMany selectFromList(java.lang.String list)
Select all items that are in the given comma separated list

Parameters:
list - items to select
Returns:
this

selectItem

public SelectMany selectItem(FxSelectListItem item)
Select an item

Parameters:
item - the item to select
Returns:
this

deselect

public SelectMany deselect(long id)
Deselect an item by its id, will throw an exception if item id does not belong to the managed list

Parameters:
id - item id to deselect
Returns:
this

deselectItem

public SelectMany deselectItem(FxSelectListItem item)
Deselect an item

Parameters:
item - the item to deselect
Returns:
this

getSelectList

public FxSelectList getSelectList()
Get this SelectMany's SelectList

Returns:
FxSelectList

setSelectList

public void setSelectList(FxSelectList list)
Updates the select list for this instance.

Parameters:
list - the select list for this instance.

deselectAll

public void deselectAll()
Deselects all items


toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

getSelectedIdsList

public java.lang.String getSelectedIdsList()
Get an ordered comma separated list of selected id's

Returns:
ordered comma separated list of selected id's

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object