|
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.data.LyObjectSource
leon.data.LyFilteredObjectSource
public final class LyFilteredObjectSource
This class implements an object source with filtered datas. It allows to have a partial view of an object source by filtering its datas. For example, you can have only equipments of a network.
LyObjectSource
,
LyFilter
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
Fields inherited from class leon.data.LyObjectSource |
---|
GET_SIZE_CACHE_DELAY |
Constructor Summary | |
---|---|
LyFilteredObjectSource(LyDataSession session,
LyClassInfo classInfo,
LyFilter filter)
Constructs a filtered object source. |
Method Summary | |
---|---|
boolean |
checkObject(LyObjectId objectId)
Tests if an object corresponding to a given object id is found in the cache of this data source. |
boolean |
checkObject(java.lang.Object object)
Internal method to check validy of an object given as parameter. |
LyResponse |
createObject(LyObject object,
LyResponseListener listener,
boolean local,
boolean refresh)
Create a new object in this object source. |
LyResponse |
deleteObject(LyObject object,
LyResponseListener listener,
boolean local,
boolean refresh,
boolean deleteLinkedObjects)
Delete an object of this object source. |
LyResponse |
deleteObjects(java.util.Vector<? extends java.lang.Object> objects,
LyResponseListener listener,
boolean local,
boolean refresh,
boolean deleteLinkedObjects)
Delete a list of objects of this object source. |
void |
free()
Free this object source. |
LyClassInfo |
getClassInfo()
Retrieves the class info of this object source. |
LyFilter |
getFilter()
Retrieves the filter of this object source. |
java.lang.Object |
getObject(LyObjectId id)
Gets an object from this object source by the specified identifier. |
java.lang.Object |
getObject(LyObjectId id,
boolean local)
Gets an object from this object source by the specified identifier. |
LyResponse |
getObjects(java.util.Vector<LyFieldInfo> fieldInfos,
LySort sort,
LyFilter filter,
int n,
boolean local,
LyResponseListener listener)
Retrieve objects on this object source. |
LyObjectSource |
getObjectSource()
Retrieves the object source (not filtered). |
int |
getSize(LyFilter filter,
boolean local)
Return the number of objects within this object source matching the given filter. |
void |
listenTo(LyDataSource dataSource)
Associates this object source to a data source representing the physical layer. |
void |
load()
Loads completely this object source. |
LyResponse |
loadObject(LyObjectId id,
java.util.Vector<? extends LyField> fields,
LyResponseListener listener)
Method to load an object by its id from this object source. |
LyResponse |
loadObjects(java.util.Vector<? extends LyField> fieldInfos,
LySort sort,
LyFilter filter,
int n,
LyResponseListener listener)
Method for loading objects on this object source. |
LyResponse |
reloadObject(LyObjectId id,
java.util.Vector<? extends LyField> fields,
LyResponseListener listener,
LyClassBinding classBinding)
Method to reload an object from its id on the associated data provider. |
void |
setCache(LyCache cache)
Sets the cache of this object source. |
LyResponse |
setObject(LyObject object,
LyResponseListener listener,
boolean local,
boolean refresh)
Set an object of this object source. |
LyResponse |
setObjects(java.util.Vector<? extends java.lang.Object> objects,
LyResponseListener listener)
Set a list of objects of this object source. |
Methods inherited from class leon.data.LyDataSource |
---|
addListener, getApplication, getCache, getDataClass, getDataProvider, getLastModified, getObject, getSize, isReadOnly, isRollBack, isSynchronous, setIgnoreErrorOnLoad, setReadOnly, setRollBack, setSynchronous, 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 LyFilteredObjectSource(LyDataSession session, LyClassInfo classInfo, LyFilter filter)
session
- Session owner of this object source.classInfo
- Class info associated with the object source.filter
- Filter critera of this object source.Method Detail |
---|
public LyClassInfo getClassInfo()
getClassInfo
in class LyObjectSource
public LyObjectSource getObjectSource()
public LyFilter getFilter()
public void listenTo(LyDataSource dataSource)
listenTo
in class LyObjectSource
dataSource
- Data source to which this object source is associated.
java.lang.IllegalStateException
- If the given data source is not null.public void setCache(LyCache cache)
cache
- Cache to associate to this object source.
java.lang.IllegalStateException
- If the given cache is not null.public void free()
free
in class LyObjectSource
public void load()
load
in class LyObjectSource
public java.lang.Object getObject(LyObjectId id)
getObject
in class LyObjectSource
id
- Object identifier of the searched object.
public java.lang.Object getObject(LyObjectId id, boolean local)
getObject
in class LyObjectSource
id
- Object identifier of the searched object.local
- Indicates if the request must be local or not.
public int getSize(LyFilter filter, boolean local)
getSize
in class LyObjectSource
filter
- Filter applied on objects for counting.local
- Indicates if the request must be local or not.
public LyResponse createObject(LyObject object, LyResponseListener listener, boolean local, boolean refresh)
createObject
in class LyObjectSource
object
- Object to create.listener
- Listener of the response.local
- Indicates if the creation is local or not.refresh
- Indicates if the creation may be notified or not.
java.lang.IllegalStateException
- If the object source is in read only mode.public LyResponse setObject(LyObject object, LyResponseListener listener, boolean local, boolean refresh)
setObject
in class LyObjectSource
object
- Object to modify.listener
- Listener of the response.local
- Indicates if the modification must be local or not.refresh
- Indicates if the modification may be notified or not.
java.lang.IllegalStateException
- If the object source is in read only mode.
java.lang.IllegalArgumentException
- If the given object is invalid.public LyResponse setObjects(java.util.Vector<? extends java.lang.Object> objects, LyResponseListener listener)
setObjects
in class LyObjectSource
object
- List of objects to modify.listener
- Listener of the response.
java.lang.IllegalStateException
- If the object source is in read only mode.
java.lang.IllegalArgumentException
- If one of the given objects is invalid.public LyResponse deleteObject(LyObject object, LyResponseListener listener, boolean local, boolean refresh, boolean deleteLinkedObjects)
object
- Object to delete.listener
- Listener of the response.local
- Indicates if the operation must be local or not.refresh
- Indicates if the operaton may be notified or not.deleteLinkObjects
- Indicates if linked objects (composition relations, ...)
must be deleted or not.
java.lang.IllegalStateException
- If the object source is in read only mode.
java.lang.IllegalArgumentException
- If the given object is invalid.public LyResponse deleteObjects(java.util.Vector<? extends java.lang.Object> objects, LyResponseListener listener, boolean local, boolean refresh, boolean deleteLinkedObjects)
deleteObjects
in class LyObjectSource
objects
- List of objects to delete.listener
- Listener of the response.local
- Indicates if the operation must be local or not.refresh
- Indicates if the operaton may be notified or not.deleteLinkObjects
- Indicates if linked objects (composition relations, ...)
must be deleted or not.
java.lang.IllegalStateException
- If the object source is in read only mode.
java.lang.IllegalArgumentException
- If one of the given objects is invalid.public LyResponse loadObject(LyObjectId id, java.util.Vector<? extends LyField> fields, LyResponseListener listener)
loadObject
in class LyObjectSource
id
- Object identifier corresponding to the object to load.listener
- Listener of the response.fields
- Fields to load (null means all fields).
public LyResponse loadObjects(java.util.Vector<? extends LyField> fieldInfos, LySort sort, LyFilter filter, int n, LyResponseListener listener)
loadObjects
in class LyObjectSource
sort
- Gives sort criteria, or null if there is no sort (the order is the one of
the physical layer).filter
- Gives filter criteria, or null if there is no filter (all objects).n
- Indicates the number of objects to load (-1 means no limit).listener
- Listener of the response.fieldInfos
- The list of the fieldInfos to load if necessary. If this parameter is null
all the field infos are loaded. If the list is empty, only fields with
mark id or name and fields used by sort and filter are loaded.
public LyResponse getObjects(java.util.Vector<LyFieldInfo> fieldInfos, LySort sort, LyFilter filter, int n, boolean local, LyResponseListener listener)
getObjects
in class LyObjectSource
sort
- Gives sort criteria, or null if there is no sort (the order is the one of
the physical layer).filter
- Gives filter criteria, or null if there is no filter (all objects).n
- Indicates the number of objects to retrieve (-1 means no limit).local
- Indicates if the request is local (from memory) or not.listener
- Listener of the response.fieldInfos
- The list of the fieldInfos to load if necessary. If this parameter is null
all the field infos are loaded. If the list is empty, only fields with
mark id or name and fields used by sort and filter are loaded.
public boolean checkObject(LyObjectId objectId)
checkObject
in class LyDataSource
objectId
- Object id for which an object is searched.
public boolean checkObject(java.lang.Object object)
checkObject
in class LyDataSource
object
- Checked object.
public LyResponse reloadObject(LyObjectId id, java.util.Vector<? extends LyField> fields, LyResponseListener listener, LyClassBinding classBinding)
reloadObject
in class LyDataSource
id
- Object identifier corresponding to the object to reload.fields
- Fields to load (null means all fields).listener
- Listener of the response.classBinding
- binding between logical class and physical class This binding may
contain extra information required for encoding the request.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |