LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LySubWorkSpace

java.lang.Object
  extended by leon.data.LyObjectList
      extended by leon.data.LyWorkSpace
          extended by leon.data.LySubWorkSpace
All Implemented Interfaces:
LyGetSessionInterface, LyAdvancedDataSourceListener, LyDataSourceListener

public final class LySubWorkSpace
extends LyWorkSpace

This class implements a sub-workSpace : workspace for calculating a sub-list from an initial objects list. Filtering is either done on objects class info, or with a filter or both.

See Also:
LyClassInfo, LyFilter

Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LySubWorkSpace(LyDataSession session, LyObjectList objectList, LyClassInfo classInfo, boolean dynamic)
          Constructs a sub-workspace within a given session filtered by a class info.
LySubWorkSpace(LyDataSession session, LyObjectList objectList, LyClassInfo classInfo, LyFilter filter, boolean dynamic)
          Constructs a sub-workspace within a given session filtered by a class info and/or a specified filter.
LySubWorkSpace(LyDataSession session, LyObjectList objectList, LyClassInfo classInfo, LyFilter filter, boolean dynamic, boolean local)
          Constructs a sub-workspace within a given session filtered by a class info and/or a specified filter.
LySubWorkSpace(LyDataSession session, LyObjectList objectList, LyFilter filter, boolean dynamic)
          Constructs a sub-workspace within a given session filtered by the specified filter.
 
Method Summary
 LyInfoList<LyClassInfo> getClasses()
          Return the list of all class infos to which objects of this workspace belong.
 LyClassInfo getClassInfo()
          Gets class info to which objects of this workspace belong.
 LyFilter getFilter()
          Gets the filter of this sub-workspace.
 LyObjectList getParentList()
          Gets the objects list that is filtered by this sub-workspace.
 LySimpleObjectList getSources(LyObject target)
          Method for retrieving source objects that lead to given target object.
 void reset()
          Method for resetting this workspace.
 void setFilter(LyFilter filter)
          Changes the filter of this sub-workspace.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class leon.data.LyWorkSpace
addList, addListener, dataSourceEventsGrouped, free, getListener, getListenerCount, getSession, isDynamic, isLocal, lock, objectCreated, objectDeleted, objectModified, objectStateChanged, objectUserEvent, removeListener, unlock
 
Methods inherited from class leon.data.LyObjectList
contains, delete, delete, equals, equals, getIndex, getIntersection, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getObject, getObject, getObject, getObjects, getSize, getSize, getSort, getSortedList, indexOf, intersects, isEmpty, isSorted, iterator, set, setSort, setSortByName, setSorted, toObjectIds
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LySubWorkSpace

public LySubWorkSpace(LyDataSession session,
                      LyObjectList objectList,
                      LyClassInfo classInfo,
                      LyFilter filter,
                      boolean dynamic,
                      boolean local)
Constructs a sub-workspace within a given session filtered by a class info and/or a specified filter.

Parameters:
session - Session in which the workspace is constructed.
objectList - Objects list that is filtered by this sub-workspace.
classInfo - Class info to which objects of this workspace have to belong (may be null).
filter - Filter applied for objects loaded in this workspace (may be null).
dynamic - Specifies if this workspace is dynamic or not.
local - Specifies if this workspace is local or not.
Throws:
java.lang.IllegalArgumentException - If the constructed sub-workspace is dynamic and the given objects list is not.

LySubWorkSpace

public LySubWorkSpace(LyDataSession session,
                      LyObjectList objectList,
                      LyClassInfo classInfo,
                      LyFilter filter,
                      boolean dynamic)
Constructs a sub-workspace within a given session filtered by a class info and/or a specified filter.

Parameters:
session - Session in which the workspace is constructed.
objectList - Objects list that is filtered by this sub-workspace.
classInfo - Class info to which objects of this workspace have to belong (may be null).
filter - Filter applied for objects loaded in this workspace (may be null).
dynamic - Specifies if this workspace is dynamic or not.
Throws:
java.lang.IllegalArgumentException - If the constructed sub-workspace is dynamic and the given objects list is not.

LySubWorkSpace

public LySubWorkSpace(LyDataSession session,
                      LyObjectList objectList,
                      LyClassInfo classInfo,
                      boolean dynamic)
Constructs a sub-workspace within a given session filtered by a class info.

Parameters:
session - Session in which the workspace is constructed.
objectList - Objects list that is filtered by this sub-workspace.
classInfo - Class info to which objects of this workspace have to belong (may be null).
dynamic - Specifies if this workspace is dynamic or not.
Throws:
java.lang.IllegalArgumentException - If the constructed sub-workspace is dynamic and the given objects list is not.

LySubWorkSpace

public LySubWorkSpace(LyDataSession session,
                      LyObjectList objectList,
                      LyFilter filter,
                      boolean dynamic)
Constructs a sub-workspace within a given session filtered by the specified filter.

Parameters:
session - Session in which the workspace is constructed.
objectList - Objects list that is filtered by this sub-workspace.
filter - Filter applied for objects loaded in this workspace (may be null).
dynamic - Specifies if this workspace is dynamic or not.
Throws:
java.lang.IllegalArgumentException - If the constructed sub-workspace is dynamic and the given objects list is not.
Method Detail

getParentList

public LyObjectList getParentList()
Gets the objects list that is filtered by this sub-workspace.

Returns:
Objects list filtered by this sub-workspace.

getClassInfo

public LyClassInfo getClassInfo()
Gets class info to which objects of this workspace belong.

Returns:
Class info specified for this workspace (may be null).

getFilter

public LyFilter getFilter()
Gets the filter of this sub-workspace.

Returns:
Filter specified for this sub-workspace (may be null).

getClasses

public LyInfoList<LyClassInfo> getClasses()
Return the list of all class infos to which objects of this workspace belong.

Specified by:
getClasses in class LyObjectList
Returns:
List of classes to which objects of this workspace belong.

setFilter

public void setFilter(LyFilter filter)
Changes the filter of this sub-workspace. On this call, the workspace is resetted.

Parameters:
filter - New filter specified for this sub-workspace.

reset

public void reset()
Method for resetting this workspace. Objects contained in this workspace are removed and reloaded from parent list.

Overrides:
reset in class LyWorkSpace

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class LyObjectList
Returns:
This workspace returned as a string.

getSources

public LySimpleObjectList getSources(LyObject target)
Method for retrieving source objects that lead to given target object.

Overrides:
getSources in class LyWorkSpace
Parameters:
target - Target object
Returns:
Source objects that leade to target object.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com