|
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.LyResponse
public final class LyResponse
This class implements a response to an operation requested on a data source.
Supported operations are : create, set, delete, load, count, save.
The status of the response is used to know : if the operation has been completed (COMPLETED), if it has not been sent yet (PENDING), if there is no result yet (RUNNING), or if an error occured (ERROR).
Depending on the requested operation, the result can be simple or multiple.
If an error occurs, the response contains an error message which indicates the origin of the error.
LyDataSource
Nested Class Summary | |
---|---|
static class |
LyResponse.Operation
Operation types. |
static class |
LyResponse.Status
Response statuses. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version |
Constructor Summary | |
---|---|
LyResponse(LyResponse.Operation operation,
LyClass cls)
Constructs a response concerning the given operation type. |
Method Summary | |
---|---|
void |
addResponse(java.lang.Object object,
LyValueSet values)
Adds a new response for the given object in this response. |
boolean |
contains(LyObject object)
Checks if an object is contained in responses list. |
boolean |
deleteLinkedObjects()
Checks if linked objects are deleted or not. |
void |
deleteLinkedObjects(boolean deleteLinkedObjects)
Modified of the _deleteLinkedObjects property. |
void |
enableReloading(boolean reloading)
Sets whether the response allows existing objects to be reloaded. |
java.lang.String |
getError()
Gets error message of the response. |
LyResponseListener |
getListener()
Gets the listener which sent the request to the data source. |
LyObjectList |
getObjects()
Gets a copy of the list of objects in the response. |
LyObjectList |
getObjects(boolean distinctValues)
Gets a copy of the list of objects in the response. |
LyResponse.Operation |
getOperation()
Gets the operation type of the response. |
java.lang.Object |
getResponse(int idx)
Get the object of this response at the given position. |
int |
getSize()
Gets the number of available responses. |
java.util.Vector<LyDataSourceListener> |
getSkippedListeners()
Method to get listeners that don't need to be notified of an event following this response. |
LyResponse.Status |
getStatus()
Gets the status of the response. |
LyValueSet |
getValues(int idx)
Get the values set of this response at the given position. |
boolean |
hasDistinctValues()
Checks if the response has distincted values or not. |
boolean |
isCounted()
Checks if the response is counted. |
boolean |
isFiltered()
Checks if the response is filtered. |
boolean |
isFullLoad()
Checks if the response is a ful load. |
boolean |
isLocal()
Check if the operation is local or not. |
boolean |
isNotified()
Check if the response is a notification one. |
boolean |
isPaginated()
Checks if the response is paginated. |
boolean |
isPartial()
Checks if the response is partial. |
boolean |
isPartialNotification()
Checks if the response manages partial notifications of loaded objects. |
boolean |
isRefresh()
Check if the operation is refreshed or not. |
boolean |
isReloadingEnabled()
Checks if the response allows existing objects to be reloaded. |
boolean |
isSorted()
Checks if the response is sorted. |
void |
setCounted(boolean counted)
Sets whether this response is counted or not. |
void |
setDistinctValues(boolean distinctValues)
Sets whether this response has distinct values or not. |
void |
setError(java.lang.String error)
Sets the error message of the response. |
void |
setFiltered(boolean filtered)
Sets whether this response is filtered or not. |
void |
setFullLoad(boolean fullLoad)
Sets whether this response is a full loading or not. |
void |
setListener(LyResponseListener listener)
Sets the listener of this response. |
void |
setLocal(boolean local)
Set whether this operation is local or not. |
void |
setNotified(boolean notified)
Set whether this response is a notification or not. |
void |
setPaginated(boolean paginated)
Sets whether this response is paginated or not. |
void |
setPartial(boolean partial)
Sets whether this response is partial or not. |
void |
setPartialNotification(boolean partialNotification)
Sets whether this response manages partial notifications of loaded objects. |
void |
setRefresh(boolean refresh)
Set whether this operation is refresh or not. |
void |
setSorted(boolean sorted)
Sets whether this response is sorted or not. |
void |
setStatus(LyResponse.Status status)
Sets the status of the response. |
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 LyResponse(LyResponse.Operation operation, LyClass cls)
operation
- Type of operation.cls
- The class of the operation.Method Detail |
---|
public LyResponse.Operation getOperation()
public LyResponse.Status getStatus()
public LyResponseListener getListener()
public java.lang.String getError()
java.lang.IllegalStateException
- If the response has not the error status.public boolean isSorted()
public boolean isFiltered()
public boolean isCounted()
public boolean hasDistinctValues()
public boolean isPartial()
public boolean isFullLoad()
public boolean isNotified()
public boolean isLocal()
public boolean isRefresh()
public boolean deleteLinkedObjects()
public int getSize()
public java.lang.Object getResponse(int idx)
idx
- Index of the requested object.
java.lang.IllegalStateException
- If the response is still pending (not sent).
java.lang.IndexOutOfBoundsException
- If index is negative or greater or equals to the number
of available responses.public LyValueSet getValues(int idx)
idx
- Index of the requested values set.
java.lang.IllegalStateException
- If the response is still pending (not sent).
java.lang.IndexOutOfBoundsException
- If index is negative or greater or equals to the number
of available responses.public LyObjectList getObjects()
java.lang.IllegalStateException
- If the response is still pending (not sent).getResponse(int)
public LyObjectList getObjects(boolean distinctValues)
distinctValues
- Boolean indicating if distinct values are requested.
java.lang.IllegalStateException
- If the response is still pending (not sent).getResponse(int)
public boolean contains(LyObject object)
object
- Checked object.
public void setListener(LyResponseListener listener)
listener
- Listener of this response.
java.lang.IllegalStateException
- If this response has already a listener.public void setSorted(boolean sorted)
sorted
- True if the response is sorted, false otherwise.public void setFiltered(boolean filtered)
filtered
- True if the response is filtered, false otherwise.public void setNotified(boolean notified)
notified
- true if the response is a notification.public void setLocal(boolean local)
local
- true if the operation is local.public void setRefresh(boolean refresh)
refresh
- true if the operation is refresh.public void deleteLinkedObjects(boolean deleteLinkedObjects)
deleteLinkedObjects
- a list of LyObjectpublic void setCounted(boolean counted)
counted
- True if the response is counted, false otherwise.public void setDistinctValues(boolean distinctValues)
distinctValues
- True if the response has distinct values, false otherwise.public void setPartial(boolean partial)
partial
- True if the response is partial, false otherwise.public void setFullLoad(boolean fullLoad)
fullLoad
- True if the response is a full loading, false otherwise.public void setStatus(LyResponse.Status status)
status
- New status of this response.
java.lang.IllegalArgumentException
- If the given status is unknown.public void setError(java.lang.String error)
error
- New error message.public void addResponse(java.lang.Object object, LyValueSet values)
object
- Object concerned by the response.values
- List of values changed on the given object (may be null).
java.lang.IllegalStateException
- If the status of this response is pending.
java.lang.IllegalStateException
- If the status of this response is error and the given object
is not null.public java.util.Vector<LyDataSourceListener> getSkippedListeners()
public boolean isPaginated()
public void setPaginated(boolean paginated)
paginated
- True if the response is paginated, false otherwise.public boolean isReloadingEnabled()
public void enableReloading(boolean reloading)
public boolean isPartialNotification()
public void setPartialNotification(boolean partialNotification)
partialNotification
- True if the response manages partial notifications of loaded objects, false otherwise.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |