org.springframework.richclient.widget.editor.provider
Interface DataProvider
- All Superinterfaces:
- DataProviderEventSource
- All Known Implementing Classes:
- AbstractDataProvider, ItemDataProvider, SupplierDataProvider
public interface DataProvider
- extends DataProviderEventSource
The DataProvider regulates access to the back-end services. It can be used by eg a
DefaultDataEditorWidget
as a central access point to the services that provide the data.
Nested Class Summary |
static class |
DataProvider.RefreshPolicy
Each DataProvider can specify a policy that dictates when to refresh the data list. |
getDetailObject
Object getDetailObject(Object selectedObject,
boolean forceLoad)
- Fetch the detailed object from the back-end. To optimize your code, a flag is passed (forceLoad) to
specify if a back-end load is absolutely necessary or not. If forceLoad is
false
you may
return the selectedObject directly if it is already detailed. On the other hand if forceLoad is
true
you MUST fetch the detailed object from the back-end. If your object doesn't have a
specific detail the same logic must be applied to allow the fetching of a fresh individual object.
- Parameters:
selectedObject
- the object that must be used to fetch the detailed one.forceLoad
- if true
always go to back-end and load the object; if false
a
shortcut can be used to return an already detailed selected object.
getSimpleObject
Object getSimpleObject(Object selectedObject)
supportsFiltering
boolean supportsFiltering()
getList
List getList(Object criteria)
supportsUpdate
boolean supportsUpdate()
update
Object update(Object updatedData)
supportsCreate
boolean supportsCreate()
create
Object create(Object newData)
newInstance
Object newInstance(Object criteria)
supportsClone
boolean supportsClone()
clone
Object clone(Object sampleData)
supportsDelete
boolean supportsDelete()
delete
void delete(Object dataToRemove)
supportsBaseCriteria
boolean supportsBaseCriteria()
setBaseCriteria
void setBaseCriteria(Object criteria)
exists
boolean exists(Object data)
getRefreshPolicy
DataProvider.RefreshPolicy getRefreshPolicy()
Copyright © 2004-2009 The Spring Framework. All Rights Reserved.