|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.data.DataSource.RowHandle<T>
T - the row typepublic abstract static class DataSource.RowHandle<T>
A handle that contains information on whether a row should be
pinned or unpinned, and also always the
most recent representation for that particular row.
| Constructor Summary | |
|---|---|
DataSource.RowHandle()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
protected abstract boolean |
equalsExplicit(java.lang.Object obj)
An explicit override for Object.equals(Object). |
abstract T |
getRow()
Gets the most recent representation for the row this handle represents. |
int |
hashCode()
|
protected abstract int |
hashCodeExplicit()
An explicit override for Object.hashCode(). |
abstract void |
pin()
Marks this row as pinned. |
abstract void |
unpin()
Marks this row as unpinned. |
abstract void |
updateRow()
Informs the DataSource that the row data represented by this RowHandle has been updated. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSource.RowHandle()
| Method Detail |
|---|
public abstract T getRow()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if this row handle isn't currently pinnedpin()public abstract void pin()
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.
unpin()
public abstract void unpin()
throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this row handle has not been pinned beforepin()public abstract void updateRow()
DataChangeHandler.dataUpdated(int, int)protected abstract boolean equalsExplicit(java.lang.Object obj)
Object.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.
rowHandle - the reference object with which to compare
true if this object is the same as the obj argument;
false otherwise.protected abstract int hashCodeExplicit()
Object.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.
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||