|
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.LyObjectList
public abstract class LyObjectList
This class implements a list of logical objects (LyObject).
This list can be sorted by a specified sort. If this sort is null or not enough discriminating, a default sort is used to be sure that we have a full order (sorting the list several times will always produce the same result). The default sort can be done either on objects names or on objects ids.
It is also possible to turn these lists to not sorted.
Objects list can be dynamic (see classes that extend LyWorkSpace). This means that modifications made on the content of the list can be notified to registered listeners.
LyObject
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
Method Summary | |
---|---|
void |
addList(LyObjectList objectList)
Adds objects of the specified list to this list. |
boolean |
contains(LyObject object)
Test if the specified object is contained in this list. |
void |
delete()
Methods for deleting all objects of this list. |
void |
delete(boolean local,
boolean refresh)
Methods for deleting all objects of this list. |
boolean |
equals(LyObjectList targetList)
Compare the content of the object lists Object lists are equals if they have exactlky the same LyObjects Sorting is *NOT* taken into account. |
boolean |
equals(java.lang.Object targetList)
Compare the content of the object lists Object lists are equals if they have exactlky the same LyObjects Sorting is *NOT* taken into account. |
abstract LyInfoList<LyClassInfo> |
getClasses()
Return the list of all class infos to which objects of this list belong. |
int |
getIndex(LyObject object)
Returns the position of the specified object. |
LyObjectList |
getIntersection(LyObjectList list)
Gets intersection of this list with the given list. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass,
boolean dynamic)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass,
boolean dynamic,
boolean local)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass,
LyFilter filter)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass,
LyFilter filter,
boolean local)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo targetClass,
LyFilter filter,
boolean dynamic,
boolean local)
Calculate cross references. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
LyInfoList<? extends LyRoute> routes,
boolean dynamic)
Gets an objects list containing objects accessed through the given routes from objects of this list that belong to the specified source class. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
LyInfoList<? extends LyRoute> routes,
boolean dynamic,
boolean local)
Gets an objects list containing objects accessed through the given routes from objects of this list that belong to the specified source class. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
LyRoute route,
boolean dynamic)
Gets an objects list containing objects accessed through the given route from objects of this list that belong to the specified source class. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
LyRoute route,
boolean dynamic,
boolean local)
Gets an objects list containing objects accessed through the given route from objects of this list that belong to the specified source class. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
LyRoute route,
boolean dynamic,
boolean local,
boolean recurse)
Gets an objects list containing objects accessed through the given route from objects of this list that belong to the specified source class. |
LyObjectList |
getList(LyDataSession session,
LyClassInfo sourceClass,
java.lang.String routeId,
boolean dynamic)
Gets an objects list containing objects accessed through the route with the given id from objects of this list that belong to the specified source class. |
LyObject |
getObject(int index)
Returns the object at the specified index. |
LyObject |
getObject(LyApplication application,
java.lang.String id)
Returns the object with the specified identifier given as a string within the specified application. |
LyObject |
getObject(LyObjectId objectId)
Returns the object with the specified identifier. |
java.util.Vector<LyObject> |
getObjects()
Return a vector of objects contained in this list. |
int |
getSize()
Returns the number of objects contained in this list. |
int |
getSize(LyClassInfo classInfo)
Returns the number of objects of the given classInfo contained in this list. |
LySort |
getSort()
Gets the current sort of this list. |
LyObjectList |
getSortedList(LyInfoLabel label)
Gets a new list corresponding to this list sorted by the given label. |
int |
indexOf(LyObject object)
Returns the position of the specified object using This method is used instead of getIndex when searched object is changed, because the fields values on which the list is sorted could have been changed. |
boolean |
intersects(LyObjectList list)
Checks if the given list intersects with this list, this means at least one object is common to the two lists. |
boolean |
isDynamic()
Checks whether this list is dynamic or not. |
boolean |
isEmpty()
Checks if the list is empty or not. |
boolean |
isSorted()
Checks whether this list is sorted or not. |
java.util.Iterator<LyObject> |
iterator()
Returns an implementation of the Iterator interface for this LyObjectList. |
void |
reset()
Resets this list. |
void |
set(LyValueSet values)
Methods for setting all objects of this list. |
void |
setSort(LySort sort)
Sets the current sort of this list. |
void |
setSortByName(boolean byName)
Specifies if the defaut sorting is done on objects names or on objects ids. |
void |
setSorted(boolean sorted)
Sets boolean indicating if this list has to be sorted or not (even if no explicit sort is specified). |
LyObjectId[] |
toObjectIds()
Return an array of object ids contained in this list. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Method Detail |
---|
public final java.util.Vector<LyObject> getObjects()
public final LyObjectId[] toObjectIds()
public LySort getSort()
public boolean isDynamic()
public boolean isSorted()
public void setSort(LySort sort)
sort
- New sort for this list.public void setSortByName(boolean byName)
byName
- True if default sorting is done with objects names, false if objects ids are
used.public void setSorted(boolean sorted)
sorted
- Boolean specifying if this list has to be sorted or not.public abstract LyInfoList<LyClassInfo> getClasses()
public void reset()
public boolean isEmpty()
public int getSize(LyClassInfo classInfo)
classInfo
- Class info for which the number of objects is requested.
public int getSize()
public boolean contains(LyObject object)
object
- Checked object.
java.lang.IllegalArgumentException
- If the given object is null.public final LyObject getObject(int index)
idx
- Index of the searched object.
java.lang.IndexOutOfBoundsException
- If the given index is negative or greater or equal to
the number of objects in this list.public LyObject getObject(LyObjectId objectId)
id
- Id of the searched object.
java.lang.IllegalArgumentException
- If the given id is null.public LyObject getObject(LyApplication application, java.lang.String id)
id
- Id of the search object given as a string.
public int indexOf(LyObject object)
object
- Object searched in this list.
java.lang.IllegalArgumentException
- If the given object is null.getIndex
public int getIndex(LyObject object)
object
- Object searched in this list.
java.lang.IllegalArgumentException
- If the given object is null.indexOf
public void addList(LyObjectList objectList)
objectList
- Objects to add to this list.public LyObjectList getIntersection(LyObjectList list)
list
- List intersected with this list.
public boolean intersects(LyObjectList list)
list
- List tested for intersection with this list.
public LyObjectList getList(LyDataSession session, LyClassInfo targetClass, boolean dynamic)
session
- Session in which this search is made. This parameter may be null if
the request is not dynamic.targetClass
- Target class of objects to retrieve.dynamic
- Specifies if the result list has to be dynamic or not.
java.lang.IllegalArgumentException
- If target class is null.public LyObjectList getList(LyDataSession session, LyClassInfo targetClass, boolean dynamic, boolean local)
session
- Session in which this search is made. This parameter may be null if
the request is not dynamic.targetClass
- Target class of objects to retrieve.dynamic
- Specifies if the result list has to be dynamic or not.local
- Specifies if the result list has to be local or not.
java.lang.IllegalArgumentException
- If target class is null.public final LyObjectList getList(LyDataSession session, LyClassInfo targetClass, LyFilter filter)
session
- Session in which this search is made. This parameter may be null if
the request is not dynamic.targetClass
- Target class of objects to retrieve (may be null).filter
- a filter for the result list (may be null).
java.lang.IllegalArgumentException
- If targetClass and filter are both null.public final LyObjectList getList(LyDataSession session, LyClassInfo targetClass, LyFilter filter, boolean local)
session
- Session in which this search is made. This parameter may be null if
the request is not dynamic.targetClass
- Target class of objects to retrieve (may be null).filter
- a filter for the result list (may be null).local
- Specifies if the result list must be local or not.
java.lang.IllegalArgumentException
- If targetClass and filter are both null.public LyObjectList getList(LyDataSession session, LyClassInfo targetClass, LyFilter filter, boolean dynamic, boolean local)
session
- Session in which this search is made. This parameter may be null if
the request is not dynamic.targetClass
- Target class of objects to retrieve (may be null).filter
- a filter for the result list (may be null).local
- Specifies if the result list must be local or not.
java.lang.IllegalArgumentException
- If targetClass and filter are both null.public final LyObjectList getList(LyDataSession session, LyClassInfo targetClass)
session
- Session in which this search is made.targetClass
- Target class of objects to retrieve.
java.lang.IllegalArgumentException
- If target class is null.public LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, java.lang.String routeId, boolean dynamic)
session
- Session in which this search is made.sourceClass
- Source class for objects of this list. This may restrict objects of
this list that are used to calculate the result list.routeId
- Identifier of the route used to reach taraget objects.dynamic
- Specifies if the result list has to be dynamic or not.
java.lang.IllegalArgumentException
- If no route with the given id is found on the source
class.public final LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, LyInfoList<? extends LyRoute> routes, boolean dynamic)
session
- Session in which this search is made.sourceClass
- Source class.routes
- List of routes used to reach target objects.dynamic
- Specifies if the result list has to be dynamic or not.
java.lang.IllegalArgumentException
- If the given list of routes is null or empty.public LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, LyInfoList<? extends LyRoute> routes, boolean dynamic, boolean local)
session
- Session in which this search is made.sourceClass
- Source class.routes
- List of routes used to reach target objects.dynamic
- Specifies if the result list has to be dynamic or not.local
- Specifies if the result list has to be local or not.
java.lang.IllegalArgumentException
- If the given list of routes is null or empty.public final LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, LyRoute route, boolean dynamic)
session
- Session in which this search is made.sourceClass
- Source class for objects of this list.route
- Route used to reach target objects.dynamic
- Specifies if the result list has to be dynamic or not.public final LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, LyRoute route, boolean dynamic, boolean local)
session
- Session in which this search is made.sourceClass
- Source class for objects of this list.route
- Route used to reach target objects.dynamic
- Specifies if the result list has to be dynamic or not.local
- Specifies if the result list has to be local or not.public LyObjectList getList(LyDataSession session, LyClassInfo sourceClass, LyRoute route, boolean dynamic, boolean local, boolean recurse)
session
- Session in which this search is made.sourceClass
- Source class for objects of this list.route
- Route used to reach target objects.dynamic
- Specifies if the result list has to be dynamic or not.local
- Specifies if the result list has to be local or not.recurse
- Activates recursion when sourceClass and targetClass are identical.public void set(LyValueSet values)
public void delete()
public void delete(boolean local, boolean refresh)
local
- Indicates if deletions must be local or notrefresh
- Indicates if the deletions may be notified or not.public boolean equals(java.lang.Object targetList)
equals
in class java.lang.Object
public boolean equals(LyObjectList targetList)
public java.lang.String toString()
toString
in class java.lang.Object
public LyObjectList getSortedList(LyInfoLabel label)
label
- Label used to sort this list.
public java.util.Iterator<LyObject> iterator()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |