public class CustomTaskSearchContentProvider.TaskSearchPagingService extends Object implements IRefreshableContentProvider
Constructor and Description |
---|
TaskSearchPagingService() |
Modifier and Type | Method and Description |
---|---|
List<ITask> |
getDataRecords()
Return single page rows
|
boolean |
getNeedRefresh()
Returns
true when IRefreshable.isAutoRefresh() is on and the result properties need to be refreshed from
the data source by executing IRefreshable.refresh() method. |
int |
getNumberOfCalls() |
Object[] |
getPropertyKeys()
Returns list of properties supported by this content provider.
|
int |
getSize() |
int |
getStart() |
Class<?> |
getType(Object propertyKey)
Returns java type of the given property
|
Object |
getValue(Object propertyKey)
Returns value of the given property
|
boolean |
hasProperty(Object propertyKey)
Checks if the given property is supported by this content provider
|
boolean |
isAutoRefresh()
Returns
true if the provider is currenlty in auto-refresh mode |
void |
refresh()
(Re)loads data from the data source.
|
void |
setAutoRefresh(boolean autorefresh)
Sets auto refresh mode on.
|
void |
setNeedRefresh(boolean needRefresh)
Tells the provider that the input parameters have changed and the output results need to be refreshed the next time any
output property is requested via
IContentProvider.getValue(Object) . |
void |
setNumberOfCalls(int numberOfCalls) |
void |
setSize(int size) |
void |
setStart(int start) |
boolean |
supportsAutoRefresh()
Returns true if this content provider supports auto refresh feature.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public int getStart()
public void setStart(int start)
public int getSize()
public void setSize(int size)
public void refresh() throws ContentProviderException
IRefreshable
refresh
in interface IRefreshable
ContentProviderException
- if error loading data from the data sourcepublic int getNumberOfCalls()
public void setNumberOfCalls(int numberOfCalls)
public Object[] getPropertyKeys()
IContentProvider
Object[0]
,
never null.getPropertyKeys
in interface IContentProvider
String
or Integer
public boolean hasProperty(Object propertyKey)
IContentProvider
hasProperty
in interface IContentProvider
propertyKey
- property key of type String
or Integer
true
if property is supportedpublic Object getValue(Object propertyKey) throws ELException, PropertyNotFoundException
IContentProvider
getValue
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
null
PropertyNotFoundException
- if property is not supportedELException
public Class<?> getType(Object propertyKey) throws PropertyNotFoundException
IContentProvider
getType
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
Class
PropertyNotFoundException
- if property is not supportedpublic boolean getNeedRefresh()
IRefreshable
Returns true
when IRefreshable.isAutoRefresh()
is on and the result properties need to be refreshed from
the data source by executing IRefreshable.refresh()
method.
Implementations may return an accurate value from this method if they can track the changes to the input parameter
properties or they may require the clients to call IRefreshable.setNeedRefresh(boolean)
explicitely.
getNeedRefresh
in interface IRefreshable
true
when the output properties are not up-to-date with the current input parameters, i.e. IRefreshable.refresh()
needs to be executed manually or automatically.public boolean isAutoRefresh()
IRefreshable
true
if the provider is currenlty in auto-refresh modeisAutoRefresh
in interface IRefreshable
public void setAutoRefresh(boolean autorefresh) throws ContentProviderException
IRefreshable
Sets auto refresh mode on. When auto refresh mode is on, the provider calls IRefreshable.getNeedRefresh()
to determine whether the refresh needs to be done before returning any result properties. If it returns
true
, the provider calls IRefreshable.refresh()
method to updated the result properties.
setAutoRefresh
in interface IRefreshable
autorefresh
- true to turn it onContentProviderException
- if auto refresh mode is not supportedIRefreshable.supportsAutoRefresh()
,
IRefreshable.getNeedRefresh()
,
IRefreshable.setNeedRefresh(boolean)
public void setNeedRefresh(boolean needRefresh)
IRefreshable
IContentProvider.getValue(Object)
.setNeedRefresh
in interface IRefreshable
needRefresh
- true
if the input parameters have changedpublic boolean supportsAutoRefresh()
IRefreshable
supportsAutoRefresh
in interface IRefreshable
IRefreshable.setAutoRefresh(boolean)