Package ch.helvethink.odoo4java.rpc
Interface OdooRpcClient
public interface OdooRpcClient
Interface to implement for Odoo Rpc
-
Method Summary
Modifier and TypeMethodDescriptionfindByCriteria(int limit, Class<T> classToConvert, String... criteria) Find an Odoo object using criteria.findListByIds(List<OdooId> idsToFetch, Class<T> classToConvert) Same as above but with Odoo IdsfindListByIdsInt(List<Integer> idsToFetch, Class<T> classToConvert) Same asfindObjectById(OdooId, Class)but with a List<T extends OdooObj>
TfindObjectById(OdooId idToFetch, Class<T> classToConvert) Fetch an object by its id
-
Method Details
-
findByCriteria
Find an Odoo object using criteria. If no criteria, will send all the objects (id >=0 )- Type Parameters:
T- The target type- Parameters:
limit- Number of objects we want to retrieveclassToConvert- Type of the target objectcriteria- The search criteria- Returns:
- List of corresponding objects
-
findObjectById
Fetch an object by its id- Type Parameters:
T- The type of the target Object- Parameters:
idToFetch- The id of the object we want to fetchclassToConvert- The type of the target Object- Returns:
- The object fetched
-
findListByIdsInt
Same asfindObjectById(OdooId, Class)but with a List- Type Parameters:
T- The type of the target objects If an exception occured, will send back an empty list- Parameters:
idsToFetch- The ids of objects we want to fetchclassToConvert- The type of the target objects- Returns:
- List of built objects
-
findListByIds
Same as above but with Odoo Ids- Type Parameters:
T- The type of the target objects- Parameters:
idsToFetch- The ids of objects we want to fetch under the form ofOdooIdclassToConvert- The type of the target objects- Returns:
- List of built objects
-