Class AbstractRemoteDataSource.RowHandleImpl
- java.lang.Object
-
- com.vaadin.client.data.DataSource.RowHandle<T>
-
- com.vaadin.client.data.AbstractRemoteDataSource.RowHandleImpl
-
- Enclosing class:
- AbstractRemoteDataSource<T>
protected class AbstractRemoteDataSource.RowHandleImpl extends DataSource.RowHandle<T>
-
-
Constructor Summary
Constructors Constructor Description RowHandleImpl(T row, Object key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanequalsExplicit(Object obj)An explicit override forObject.equals(Object).TgetRow()Gets the most recent representation for the row this handle represents.protected inthashCodeExplicit()An explicit override forObject.hashCode().booleanisPinned()voidpin()Marks this row as pinned.voidsetRow(T row)A method for the data source to update the row data.voidunpin()Marks this row as unpinned.voidupdateRow()Informs the DataSource that the row data represented by this RowHandle has been updated.-
Methods inherited from class com.vaadin.client.data.DataSource.RowHandle
equals, hashCode
-
-
-
-
Method Detail
-
setRow
public void setRow(T row)
A method for the data source to update the row data.- Parameters:
row- the updated row object
-
getRow
public T getRow() throws IllegalStateException
Description copied from class:DataSource.RowHandleGets the most recent representation for the row this handle represents.- Specified by:
getRowin classDataSource.RowHandle<T>- Returns:
- the most recent representation for the row this handle represents
- Throws:
IllegalStateException- if this row handle isn't currently pinned- See Also:
DataSource.RowHandle.pin()
-
isPinned
public boolean isPinned()
-
pin
public void pin()
Description copied from class:DataSource.RowHandleMarks this row as pinned.Note: Pinning a row multiple times requires an equal amount of unpins to free the row from the "pinned" status.
Technical Note: Pinning a row makes sure that the row object for a particular set of data is always kept as up to date as the data source is able to. Since the DataSource might create a new instance of an object, object references aren't necessarily kept up-to-date. This is a technical work-around for that.
- Specified by:
pinin classDataSource.RowHandle<T>- See Also:
DataSource.RowHandle.unpin()
-
unpin
public void unpin() throws IllegalStateExceptionDescription copied from class:DataSource.RowHandleMarks this row as unpinned.Note: Pinning a row multiple times requires an equal amount of unpins to free the row from the "pinned" status.
Technical Note: Pinning a row makes sure that the row object for a particular set of data is always kept as up to date as the data source is able to. Since the DataSource might create a new instance of an object, object references aren't necessarily kept up-to-date. This is a technical work-around for that.
- Specified by:
unpinin classDataSource.RowHandle<T>- Throws:
IllegalStateException- if this row handle has not been pinned before- See Also:
DataSource.RowHandle.pin()
-
equalsExplicit
protected boolean equalsExplicit(Object obj)
Description copied from class:DataSource.RowHandleAn explicit override forObject.equals(Object). This method should be functionally equivalent to a properly implemented equals method.Having a properly implemented equals method is imperative for RowHandle to function. Because Java has no mechanism to force an override of an existing method, we're defining a new method for that instead.
- Specified by:
equalsExplicitin classDataSource.RowHandle<T>- Parameters:
obj- the reference object with which to compare- Returns:
trueif this object is the same as the obj argument;falseotherwise.
-
hashCodeExplicit
protected int hashCodeExplicit()
Description copied from class:DataSource.RowHandleAn explicit override forObject.hashCode(). This method should be functionally equivalent to a properly implemented hashCode method.Having a properly implemented hashCode method is imperative for RowHandle to function. Because Java has no mechanism to force an override of an existing method, we're defining a new method for that instead.
- Specified by:
hashCodeExplicitin classDataSource.RowHandle<T>- Returns:
- a hash code value for this object
-
updateRow
public void updateRow()
Description copied from class:DataSource.RowHandleInforms the DataSource that the row data represented by this RowHandle has been updated. DataChangeHandler for the DataSource should be informed that parts of data have been updated.- Specified by:
updateRowin classDataSource.RowHandle<T>- See Also:
DataChangeHandler.dataUpdated(int, int)
-
-