LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.peer.union
Class LyUnionRequestEncoder

java.lang.Object
  extended by leon.peer.LyRequestEncoder
      extended by leon.peer.union.LyUnionRequestEncoder

public class LyUnionRequestEncoder
extends LyRequestEncoder

This class is used to send requests and to receive answers.

See Also:
LyRequestEncoder

Field Summary
static java.lang.String __VERSION
           
 char VALUE_SEP
           
 
Constructor Summary
LyUnionRequestEncoder(LyDataProvider provider, LyDataSource dataSource)
          Constructor.
 
Method Summary
 boolean createObject(java.lang.Object object)
          To create a new object.
 boolean deleteObject(java.lang.Object object)
          To delete an object.
 boolean deleteObjects(java.util.Vector<java.lang.Object> objects)
          To delete a list of objects.
 boolean getObject(LyObjectId objectId, java.util.Vector<LyField> fields)
          Get an object.
 boolean getObjects(java.util.Vector<LyField> fields, LySort sort, LyFilter filter, int n)
          Get a set of objects.
 java.util.Collection<LyClass> getPeerClasses()
           
 boolean getSize(LyFilter filter)
          Return the number of objects from the data provider.
 boolean setObject(java.lang.Object object)
          To set an object.
 boolean setObjects(java.util.Vector<java.lang.Object> objects)
          To set a set of objects.
 void setResponse(LyResponse response)
          Set the request encoder response.
 LyObjectId[] splitObjectId(LyObjectId objectId)
          This utility method split a given object id related to a union object to an array of sub-objects ids, each corresponding to a sub-class of the union class.
 
Methods inherited from class leon.peer.LyRequestEncoder
getClassBinding, getDataClass, getProvider, getResponse, isSynchronous, loadObject, setClassBinding, setDataClass, toString, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

VALUE_SEP

public char VALUE_SEP
Constructor Detail

LyUnionRequestEncoder

public LyUnionRequestEncoder(LyDataProvider provider,
                             LyDataSource dataSource)
Constructor.

Parameters:
provider -
dataSource -
Method Detail

setResponse

public void setResponse(LyResponse response)
Set the request encoder response. Inherited method of LyRequestEncoder to set properties to the response.

Overrides:
setResponse in class LyRequestEncoder
Parameters:
the - response

getObject

public boolean getObject(LyObjectId objectId,
                         java.util.Vector<LyField> fields)
Get an object.

Specified by:
getObject in class LyRequestEncoder
Parameters:
objectId - object identifier
fields - the fields to load (if null, load all)
Returns:
true if the request was correctly sent to the external data provider.

splitObjectId

public LyObjectId[] splitObjectId(LyObjectId objectId)
This utility method split a given object id related to a union object to an array of sub-objects ids, each corresponding to a sub-class of the union class. There are a few rules to respect: All Id field in the union class must correspond to all Id field of class 1. The union field must be the Id field of class 2 (and all Id field of class 2 must be union field (it allows an object of 2 to be uniquely identify using the union fields) )

Parameters:
objectId - an object id related to a union object
Returns:
an array of object id, each related to a sub-class of the current union class.

getObjects

public boolean getObjects(java.util.Vector<LyField> fields,
                          LySort sort,
                          LyFilter filter,
                          int n)
Get a set of objects.

Specified by:
getObjects in class LyRequestEncoder
Parameters:
fields - the fields to load (if null, load all)
sort - indicates sorting criterion, or null if default sort is used.
filter - indicates filtering criterion, or null if there is no filter.
n - maximum number of objects to get.
Returns:
true if the request was correctly sent to the external data provider.

getSize

public boolean getSize(LyFilter filter)
Return the number of objects from the data provider.

Specified by:
getSize in class LyRequestEncoder
Parameters:
filter - Specifies filtering criterion, or null if there is no filter.
Returns:
true if the request was correctly sent to the external data provider.

deleteObject

public boolean deleteObject(java.lang.Object object)
To delete an object.

Specified by:
deleteObject in class LyRequestEncoder
Parameters:
object - the object to delete
Returns:
true if the request was correctly sent to the external data provider.

deleteObjects

public boolean deleteObjects(java.util.Vector<java.lang.Object> objects)
To delete a list of objects.

Overrides:
deleteObjects in class LyRequestEncoder
Parameters:
objects - the objects to delete
Returns:
true if the request was correctly sent to the external data provider.

createObject

public boolean createObject(java.lang.Object object)
To create a new object.

Specified by:
createObject in class LyRequestEncoder
Parameters:
values - the values of the new object
Returns:
true if the request was correctly sent to the external data provider.

setObject

public boolean setObject(java.lang.Object object)
To set an object.

Specified by:
setObject in class LyRequestEncoder
Parameters:
object - the object to set
values - the new values of the object
Returns:
true if the request was correctly sent to the external data provider.

setObjects

public boolean setObjects(java.util.Vector<java.lang.Object> objects)
To set a set of objects.

Overrides:
setObjects in class LyRequestEncoder
Parameters:
objects - the objects to set
values - the new values of the objects
Returns:
true if the request was correctly sent to the external data provider.

getPeerClasses

public java.util.Collection<LyClass> getPeerClasses()

(c) January 2013 - W4 S.A.

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