net.wotonomy.datastore
Interface DataView

All Superinterfaces:
java.util.Collection, java.lang.Iterable, java.util.List
All Known Implementing Classes:
DefaultDataView

public interface DataView
extends java.util.List


Method Summary
 void addObserver(java.util.Observer o)
          Called to add the specified observer to the list of observers that should receive notifications when the view if modified.
 boolean commit()
          This method is called commit all changes to the DataView to its data store.
 void deleteObserver(java.util.Observer o)
          Called to remove the specified observer from the list of observers that should receive notifications when the view if modified.
 void deleteObservers()
          Called to clear the list of observers that should receive notifications when the view if modified.
 DataKey getKeyForObject(java.lang.Object anObject)
          Returns the key for the specified object.
 java.lang.Object getObjectForKey(DataKey aKey)
          Returns the object for the specified key.
 void update(java.lang.Object o)
          This method is called to notify the DataView that one of its objects has been modified and should be updated when the view is committed.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

update

void update(java.lang.Object o)
This method is called to notify the DataView that one of its objects has been modified and should be updated when the view is committed.


commit

boolean commit()
This method is called commit all changes to the DataView to its data store. The list elements may be refreshed from the datastore, although the list itself should remain unchanged.

Returns:
True if the commit was successful, otherwise false.

addObserver

void addObserver(java.util.Observer o)
Called to add the specified observer to the list of observers that should receive notifications when the view if modified. DataViews notify when objects are added, updated, or deleted, passing the affected object as the parameter to the Observer's notify method.

Parameters:
o - The observer to add.

deleteObserver

void deleteObserver(java.util.Observer o)
Called to remove the specified observer from the list of observers that should receive notifications when the view if modified.

Parameters:
o - The observer to delete.

deleteObservers

void deleteObservers()
Called to clear the list of observers that should receive notifications when the view if modified.


getKeyForObject

DataKey getKeyForObject(java.lang.Object anObject)
Returns the key for the specified object. If the object is not in the view, returns null.


getObjectForKey

java.lang.Object getObjectForKey(DataKey aKey)
Returns the object for the specified key. If the key is not in the view, returns null.



Copyright © 2006 null. All Rights Reserved.