|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.data.LyDataSource
leon.peer.LyPeerDataSource
public class LyPeerDataSource
This class implements a collection of data of the same class. It provides methods for accessing, creating, deleting, modifying and counting datas.
Both physical class and logical class are managed by data sources. The only difference is that physical classes use direct instances of this class, and logical classes are handled by instances of an inherited class, LyObjectSource.
Each data source is connected to a data provider which is responsible to manage real objects : encoding requests and decoding results.
Data sources are valid within an application.
Objects returned via data sources are kept in caches.
LyClass
,
LyDataSource
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LyPeerDataSource(LyDataProvider provider,
LyClass dataClass)
Constructs a data source within the given application that manages the specified class. |
Method Summary | |
---|---|
void |
addListener(LyDataSourceListener listener,
short type)
Registers a listener to receive events of the given type on objects contained within this data source. |
void |
addListener(LyDataSourceListener listener,
java.util.Vector<LyField> fields)
Registers a listener to receive modification events concerning given fields on objects contained within this data source. |
java.lang.Object |
getObject(LyObjectId id)
Gets an object from this data source by the specified identifier. |
int |
getSize(LyFilter filter)
Return the number of objects within this data source matching the given filter. |
int |
getSize(LyFilter filter,
LyClassBinding classBinding)
Return the number of objects within this data source matching the given filter. |
void |
removeListener(LyDataSourceListener listener)
Unregisters a listener for notifications from this data source. |
void |
setCache(LyInfoCache cachePolicy)
Sets the cache for this data source. |
Methods inherited from class leon.data.LyDataSource |
---|
addListener, checkObject, checkObject, createObject, deleteObject, deleteObjects, getApplication, getCache, getDataClass, getDataProvider, getLastModified, getObject, getSize, isReadOnly, isRollBack, isSynchronous, loadObject, loadObjects, receiveEvent, receiveResponse, reloadObject, setIgnoreErrorOnLoad, setObject, setObjects, setReadOnly, setRollBack, setSynchronous, unload, unload |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LyPeerDataSource(LyDataProvider provider, LyClass dataClass)
provider
- Provider on which this data source is connected.dataClass
- Class of data handled by this new data source.Method Detail |
---|
public void setCache(LyInfoCache cachePolicy)
setCache
in class LyDataSource
cachePolicy
- Informations for the cache to associate to this object source.
java.lang.IllegalArgumentException
- If the given cache policy is null.
java.lang.IllegalStateException
- If the data source is already associated to a cache that
contains objects.public void addListener(LyDataSourceListener listener, short type)
addListener
in class LyDataSource
listener
- New listener. To receive these events, the listener have to implement the
LyDataSourceListener interface.type
- Indicates which type of event the listener wants to receive. Types are
defined as constant in LyDataSourceEvent class : TYPE_CREATE, TYPE_SET,
TYPE_DELETE
java.lang.IllegalArgumentException
- If the listener is null or if the given type is unknown.public void addListener(LyDataSourceListener listener, java.util.Vector<LyField> fields)
addListener
in class LyDataSource
listener
- New listener. To receive these events, the listener have to implement the
LyDataSourceListener interface.fields
- List of fields on which the listener wants to be notified when they are
modified.
java.lang.IllegalArgumentException
- If the listener is null.public void removeListener(LyDataSourceListener listener)
removeListener
in class LyDataSource
listener
- The listener which shall not receive further events.
java.lang.IllegalArgumentException
- If the listener is null or if it is not known as listener
on this data source.public java.lang.Object getObject(LyObjectId id)
getObject
in class LyDataSource
id
- Object identifier of the searched object.
public int getSize(LyFilter filter)
getSize
in class LyDataSource
filter
- Filter applied on objects for counting.
public int getSize(LyFilter filter, LyClassBinding classBinding)
getSize
in class LyDataSource
filter
- Filter applied on objects for counting.classBinding
- Binding between logical class and physical class. This binding may
contain extra information required for encoding the request (such as
extra filter).
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |