org.rcfaces.core.model
Class CollectionIndexesModel

java.lang.Object
  extended by org.rcfaces.core.model.AbstractIndexesModel
      extended by org.rcfaces.core.model.CollectionIndexesModel
All Implemented Interfaces:
Serializable, ICommitableObject, IIndexesModel
Direct Known Subclasses:
MapIndexesModel

public class CollectionIndexesModel
extends AbstractIndexesModel
implements Serializable, ICommitableObject

Version:
$Revision: 1.18 $ $Date: 2011/06/16 09:29:41 $
Author:
Olivier Oeuillot (latest modification by $Author: jbmeslin $)
See Also:
Serialized Form

Field Summary
protected  Collection collection
           
protected  boolean commited
           
protected static int[] EMPTY_SELECTION
           
protected static int UNKNOWN_INDEX
           
 
Constructor Summary
CollectionIndexesModel(Collection collection)
           
 
Method Summary
 boolean addIndex(int index)
           
 void clearIndexes()
          Clear all selection.
 void commit()
           
 boolean containsIndex(int index)
          Returns if the index of item is selected.
 IIndexesModel copy()
           
 int countIndexes()
          Number of selected items.
 int getFirstIndex()
          Returns the first index.
protected  int getIndex(Object object)
           
protected  Object getKey(int index)
           
protected  int getUnknownIndex()
           
 boolean isCommited()
           
 int[] listSortedIndexes()
          List all indexes sorted by ascendending.
 boolean removeIndex(int index)
           
 void setIndexes(int[] indexes)
          Specify the indexes of selected items.
 
Methods inherited from class org.rcfaces.core.model.AbstractIndexesModel
getFirstSelectedObject, listSelectedObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_SELECTION

protected static final int[] EMPTY_SELECTION

UNKNOWN_INDEX

protected static final int UNKNOWN_INDEX
See Also:
Constant Field Values

collection

protected final Collection collection

commited

protected boolean commited
Constructor Detail

CollectionIndexesModel

public CollectionIndexesModel(Collection collection)
Method Detail

getFirstIndex

public int getFirstIndex()
Description copied from interface: IIndexesModel
Returns the first index.

Specified by:
getFirstIndex in interface IIndexesModel

listSortedIndexes

public final int[] listSortedIndexes()
Description copied from interface: IIndexesModel
List all indexes sorted by ascendending.

Specified by:
listSortedIndexes in interface IIndexesModel

clearIndexes

public final void clearIndexes()
Description copied from interface: IIndexesModel
Clear all selection.

Specified by:
clearIndexes in interface IIndexesModel

containsIndex

public final boolean containsIndex(int index)
Description copied from interface: IIndexesModel
Returns if the index of item is selected.

Specified by:
containsIndex in interface IIndexesModel

getIndex

protected int getIndex(Object object)

getKey

protected Object getKey(int index)

getUnknownIndex

protected int getUnknownIndex()

addIndex

public boolean addIndex(int index)
Specified by:
addIndex in interface IIndexesModel

removeIndex

public final boolean removeIndex(int index)
Specified by:
removeIndex in interface IIndexesModel

setIndexes

public void setIndexes(int[] indexes)
Description copied from interface: IIndexesModel
Specify the indexes of selected items.

Specified by:
setIndexes in interface IIndexesModel

countIndexes

public int countIndexes()
Description copied from interface: IIndexesModel
Number of selected items.

Specified by:
countIndexes in interface IIndexesModel

commit

public void commit()
Specified by:
commit in interface ICommitableObject

isCommited

public boolean isCommited()
Specified by:
isCommited in interface ICommitableObject

copy

public IIndexesModel copy()
Specified by:
copy in interface IIndexesModel


Copyright © 2006-2011 Vedana. All Rights Reserved.