org.gcube.portlets.user.speciesdiscovery.server.persistence
Class AbstractSelectableDaoBuffer<T extends SelectableElement>

java.lang.Object
  extended by org.gcube.portlets.user.speciesdiscovery.server.persistence.AbstractDaoBuffer<T>
      extended by org.gcube.portlets.user.speciesdiscovery.server.persistence.AbstractSelectableDaoBuffer<T>
All Implemented Interfaces:
FetchingBuffer<T>, SelectableFetchingBuffer<T>
Direct Known Subclasses:
ResultRowBuffer, TaxonomyRowBuffer

public abstract class AbstractSelectableDaoBuffer<T extends SelectableElement>
extends AbstractDaoBuffer<T>
implements SelectableFetchingBuffer<T>

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected  String idField
           
protected  String selectionField
           
 
Fields inherited from class org.gcube.portlets.user.speciesdiscovery.server.persistence.AbstractDaoBuffer
dao, logger
 
Constructor Summary
AbstractSelectableDaoBuffer(AbstractPersistence<T> dao, String idField, String selectionField)
           
 
Method Summary
 List<T> getSelected()
          
 int sizeSelected()
          
abstract  void updateAllSelection(boolean selection)
          
 void updateSelection(int id, boolean selection)
           
 
Methods inherited from class org.gcube.portlets.user.speciesdiscovery.server.persistence.AbstractDaoBuffer
add, getList, getList, getList, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gcube.portlets.user.speciesdiscovery.server.session.SelectableFetchingBuffer
updateAllSelectionByIds
 
Methods inherited from interface org.gcube.portlets.user.speciesdiscovery.server.session.FetchingBuffer
add, getList, getList, getList, size
 

Field Detail

idField

protected String idField

selectionField

protected String selectionField
Constructor Detail

AbstractSelectableDaoBuffer

public AbstractSelectableDaoBuffer(AbstractPersistence<T> dao,
                                   String idField,
                                   String selectionField)
Method Detail

getSelected

public List<T> getSelected()
                                              throws SQLException

Specified by:
getSelected in interface SelectableFetchingBuffer<T extends SelectableElement>
Throws:
SQLException

updateSelection

public void updateSelection(int id,
                            boolean selection)
                     throws Exception
Specified by:
updateSelection in interface SelectableFetchingBuffer<T extends SelectableElement>
Throws:
Exception

updateAllSelection

public abstract void updateAllSelection(boolean selection)
                                 throws Exception

Specified by:
updateAllSelection in interface SelectableFetchingBuffer<T extends SelectableElement>
Throws:
Exception

sizeSelected

public int sizeSelected()
                 throws Exception

Specified by:
sizeSelected in interface SelectableFetchingBuffer<T extends SelectableElement>
Throws:
Exception


Copyright © 2013. All Rights Reserved.