|
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
leon.data.LyWorkSpace
leon.data.LyClassWorkSpace
leon.data.LyPageWorkSpace
public final class LyPageWorkSpace
This class implements a page workspace : workspace where objects are loaded per "page" containing a given number of objects of a class info and optionally. matching a filter.
This mode of loading requires to be able to order and filter objects. These parameters are calculated on a field info that is given on construction of the workspace.
Once loaded, it's possible on demand to load the next or the previous page.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
static int |
DEFAULT_LIMIT
|
static boolean |
FORCE_RELOAD_PAGE_FOR_DATES
|
static int |
ITERATOR_LIMIT
|
static int |
MAX_LIMIT
|
static int |
MAX_PEER_LIMIT
|
Constructor Summary | |
---|---|
LyPageWorkSpace(LyDataSession session,
LyClassInfo classInfo,
LyFilter filter,
LySort sort,
int limit)
Constructs a class workspace within a given session for a class info. |
|
LyPageWorkSpace(LyDataSession session,
LyClassInfo classInfo,
LyInfoList<LyFieldInfo> fieldInfos,
LyFilter filter,
LySort sort,
int limit)
Constructs a class workspace within a given session for a class info. |
|
LyPageWorkSpace(LyDataSession session,
LyClassInfo classInfo,
LyInfoList<LyFieldInfo> fieldInfos,
LyFilter filter,
LySort sort,
int limit,
boolean dynamic,
boolean sorted)
Constructs a class workspace within a given session for a class info. |
Method Summary | |
---|---|
boolean |
dataSourceEventsGrouped(java.util.ArrayList<LyDataSourceEvent> events)
Called when grouped events are sent. |
LyFilter |
getFilter()
Gets the filter of this class workspace. |
short |
getPage()
Gets the current page number. |
short |
getPageCount()
Gets page count. |
LySort |
getSort()
Gets the current sort of this list. |
int |
getTotalCount()
|
boolean |
isPaginatedByPeer()
Indicates whether peer can paginate results. |
java.util.Iterator<LyObject> |
iterator()
Returns an implementation of the Iterator interface for this LyObjectList. |
void |
loadPage(boolean next)
Load objects corresponding to the next or previous objects "page". |
void |
loadPage(short page)
Load objects corresponding to a given objects "page". |
boolean |
objectCreated(LyDataSourceEvent event)
Method for receiving an object creation. |
boolean |
objectDeleted(LyDataSourceEvent event)
Method for receiving an object deletion. |
boolean |
objectModified(LyDataSourceEvent event)
Method for receiving an object modification. |
void |
reload()
Method for reloading this workspace. |
void |
reset()
Method for resetting this workspace. |
void |
setFilter(LyFilter filter)
Sets the filter of this class workspace. |
void |
setFilter(LyFilter filter,
boolean reset)
Sets the filter of this class workspace. |
void |
setFilterAndSort(LyFilter filter,
LySort sort,
boolean reset)
Sets the at the same time the current sort and the filter of this list. |
void |
setSort(LySort sort)
Sets the current sort of this list. |
void |
setSort(LySort sort,
boolean reset)
Sets the current sort of this list. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class leon.data.LyClassWorkSpace |
---|
getClasses, getClassInfo, getFieldInfos, getObjectSource, objectStateChanged, objectUserEvent, setFieldInfos |
Methods inherited from class leon.data.LyWorkSpace |
---|
addList, addListener, free, getListener, getListenerCount, getSession, getSources, isDynamic, isLocal, lock, 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, getSortedList, indexOf, intersects, isEmpty, isSorted, set, setSortByName, setSorted, toObjectIds |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static boolean FORCE_RELOAD_PAGE_FOR_DATES
public static int DEFAULT_LIMIT
public static int MAX_LIMIT
public static int MAX_PEER_LIMIT
public static int ITERATOR_LIMIT
Constructor Detail |
---|
public LyPageWorkSpace(LyDataSession session, LyClassInfo classInfo, LyFilter filter, LySort sort, int limit)
session
- Session in which the workspace is constructed.classInfo
- Class info to which objects of this workspace belong.filter
- Filter applied to objects for being in this workspace.sort
- Sort requested in this workspace.limit
- Number of objects per page.public LyPageWorkSpace(LyDataSession session, LyClassInfo classInfo, LyInfoList<LyFieldInfo> fieldInfos, LyFilter filter, LySort sort, int limit)
session
- Session in which the workspace is constructed.classInfo
- Class info to which objects of this workspace belong.fieldInfos
- List of fieldinfos to load.filter
- Filter applied to objects for being in this workspace.sort
- Sort requested in this workspace.limit
- Number of objects per page.public LyPageWorkSpace(LyDataSession session, LyClassInfo classInfo, LyInfoList<LyFieldInfo> fieldInfos, LyFilter filter, LySort sort, int limit, boolean dynamic, boolean sorted)
session
- Session in which the workspace is constructed.classInfo
- Class info to which objects of this workspace belong.fieldInfos
- List of fieldinfos to load.filter
- Filter applied to objects for being in this workspace.sort
- Sort requested in this workspace.limit
- Number of objects per page.dynamic
- Specifies if this workspace is dynamic or not.sorted
- Indicates if this workspace is sorted or not.Method Detail |
---|
public LyFilter getFilter()
getFilter
in class LyClassWorkSpace
public void setFilter(LyFilter filter)
filter
- Filter specified for this class workspace.public void setFilter(LyFilter filter, boolean reset)
filter
- Filter specified for this class workspace.reset
- indicates if we reset immediately or notpublic void setSort(LySort sort)
setSort
in class LyObjectList
sort
- New sort for this list.public void setSort(LySort sort, boolean reset)
sort
- New sort for this list.reset
- indicates if we reset immediately or notpublic void setFilterAndSort(LyFilter filter, LySort sort, boolean reset)
filter
- Filter specified for this class workspace.sort
- New sort for this list.reset
- indicates if we reset immediately or notpublic void reset()
reset
in class LyClassWorkSpace
public void reload()
public void loadPage(boolean next)
next
- True if the next page is requested, false otherwise.public void loadPage(short page)
page
- Index of requested page.public java.lang.String toString()
toString
in class LyClassWorkSpace
public short getPage()
public boolean isPaginatedByPeer()
public short getPageCount()
public int getTotalCount()
public boolean objectCreated(LyDataSourceEvent event)
objectCreated
in interface LyDataSourceListener
objectCreated
in class LyClassWorkSpace
event
- Event notifying the creation of an object.
public boolean objectModified(LyDataSourceEvent event)
objectModified
in interface LyDataSourceListener
objectModified
in class LyClassWorkSpace
event
- Event notifying the modification of an object.
public boolean objectDeleted(LyDataSourceEvent event)
objectDeleted
in interface LyDataSourceListener
objectDeleted
in class LyWorkSpace
event
- Event notifying the deletion of an object.
public boolean dataSourceEventsGrouped(java.util.ArrayList<LyDataSourceEvent> events)
dataSourceEventsGrouped
in interface LyAdvancedDataSourceListener
dataSourceEventsGrouped
in class LyWorkSpace
events
- Sorted list of events.
public LySort getSort()
LyObjectList
getSort
in class LyObjectList
LyObjectList.getSort()
public java.util.Iterator<LyObject> iterator()
iterator
in class LyObjectList
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |