|
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.peer.LyRequestEncoder
public abstract class LyRequestEncoder
This class is used to encode a request made on a data source and decode results to give a response. This class is abstract and must be overriden to provide specific encoding and decoding.
The task of the request encoder is to process requests from a data source and to send 'requests' using a connection instance. The request encoder class converts a data source demand into a 'language' which is understood by the connection instance : the specific 'language' of the underlying connection, like SQL, XML, method invocation on a Corba service.
Additionally, the request encoder instance must 'decode' or interpret responses from the specific connection to a 'language' understood by Leonardi. Basically, this class implements the mapping between the chosen physical layer and the data representation in the specific connection.
LyDataSource
,
LyResponse
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LyRequestEncoder(LyDataProvider provider,
LyDataSource dataSource)
Constructs a request encoder. |
Method Summary | |
---|---|
abstract boolean |
createObject(java.lang.Object object)
Create a new object. |
abstract boolean |
deleteObject(java.lang.Object object)
Delete an object. |
boolean |
deleteObjects(java.util.Vector<java.lang.Object> objects)
To delete a list of objects. |
LyClassBinding |
getClassBinding()
Gets the binding between logical class and physical class. |
LyClass |
getDataClass()
Accessor to the physical data class of the request encoder. |
abstract boolean |
getObject(LyObjectId objectId,
java.util.Vector<LyField> fields)
Load an object from an object id. |
abstract boolean |
getObjects(java.util.Vector<LyField> fields,
LySort sort,
LyFilter filter,
int n)
Load a number of objects matching a given filter and sorted by a specified sort. |
LyDataProvider |
getProvider()
Gets the provider that created this request encoder. |
LyResponse |
getResponse()
Get the response in which results are returned. |
abstract boolean |
getSize(LyFilter filter)
Get the number of objects that match a given filter. |
boolean |
isSynchronous()
Check if the request encoder is synchronous. |
boolean |
loadObject(LyObjectId objectId,
java.util.Vector<LyField> fields)
Load an object from an object id. |
void |
setClassBinding(LyClassBinding classBinding)
Sets the binding between logical class and physical class. |
void |
setDataClass(LyClass c)
Sets the physical data class of the request encoder. |
abstract boolean |
setObject(java.lang.Object object)
To set an object. |
boolean |
setObjects(java.util.Vector<java.lang.Object> objects)
To set a list of objects. |
void |
setResponse(LyResponse response)
Set the request encoder response. |
static java.lang.String |
toString(java.lang.Object object)
Converts an Object to a string. |
static java.lang.String |
toString(java.lang.Object[] array)
Converts an Array to a string. |
static java.lang.String |
toString(java.util.Vector<?> vector)
Converts a Vector to a string. |
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 LyRequestEncoder(LyDataProvider provider, LyDataSource dataSource)
provider
- Provider that creates this request encoder.dataSource
- Data source client of the request.Method Detail |
---|
public static java.lang.String toString(java.lang.Object object)
object
- The object that must be converted.
public static java.lang.String toString(java.lang.Object[] array)
array
- The Array that must be converted.
public static java.lang.String toString(java.util.Vector<?> vector)
vector
- The vector that must be converted.
public final LyDataProvider getProvider()
public final boolean isSynchronous()
public final LyResponse getResponse()
public final LyClassBinding getClassBinding()
public void setResponse(LyResponse response)
response
- Response in which results are returned.
java.lang.IllegalArgumentException
- If the given response is null.
java.lang.IllegalStateException
- If this request encoder has already a response.public final void setClassBinding(LyClassBinding classBinding)
classBinding
- Binding between logical class and physical classpublic boolean loadObject(LyObjectId objectId, java.util.Vector<LyField> fields)
objectId
- Object identifier.fields
- Fields to load (if null, load all fields).
public abstract boolean getObject(LyObjectId objectId, java.util.Vector<LyField> fields)
objectId
- Object identifier.fields
- Fields to load (if null, load all fields).
public abstract boolean getObjects(java.util.Vector<LyField> fields, LySort sort, LyFilter filter, int n)
fields
- Fields to load (if null, load all fields).sort
- Gives sorting criterion, or null if default sort is used.filter
- Specifies filtering criterion, or null if there is no filter.n
- Maximum number of objects to get (-1 means no limit).
public abstract boolean getSize(LyFilter filter)
filter
- Specifies filtering criterion, or null if there is no filter.
public abstract boolean deleteObject(java.lang.Object object)
object
- Object to delete.
public boolean deleteObjects(java.util.Vector<java.lang.Object> objects)
objects
- Objects to delete.
public abstract boolean createObject(java.lang.Object object)
object
- New object to create.
public abstract boolean setObject(java.lang.Object object)
object
- Object to set.
public boolean setObjects(java.util.Vector<java.lang.Object> objects)
objects
- List of objects to set.
public final void setDataClass(LyClass c)
classBinding
- Binding between logical class and physical classpublic final LyClass getDataClass()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |