Interface OdooRpcClient


public interface OdooRpcClient
Interface to implement for Odoo Rpc
  • Method Details

    • findByCriteria

      <T extends OdooObj> List<T> findByCriteria(int limit, int page, Class<T> classToConvert, String... criteria)
      Find an Odoo object using criteria with pagination. If no criteria, will send all the objects (id >=0 )
      Type Parameters:
      T - The target type
      Parameters:
      limit - Number of objects we want to retrieve
      page - The page we want to retrieve
      classToConvert - Type of the target object
      criteria - The search criteria
      Returns:
      List of corresponding objects
    • countByCriteria

      int countByCriteria(Class<? extends OdooObj> objectType, String... criteria)
    • findByCriteria

      <T extends OdooObj> List<T> findByCriteria(int limit, Class<T> classToConvert, String... criteria)
      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 retrieve
      classToConvert - Type of the target object
      criteria - The search criteria
      Returns:
      List of corresponding objects
    • findByCriteria

      <T extends OdooObj> List<T> findByCriteria(int limit, int page, String sortByField, Class<T> classToConvert, String... criteria)
    • findObjectById

      <T extends OdooObj> T findObjectById(OdooId idToFetch, Class<T> classToConvert)
      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 fetch
      classToConvert - The type of the target Object
      Returns:
      The object fetched
    • findListByIdsInt

      <T extends OdooObj> List<T> findListByIdsInt(List<Integer> idsToFetch, Class<T> classToConvert)
      Same as findObjectById(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 fetch
      classToConvert - The type of the target objects
      Returns:
      List of built objects
    • findListByIds

      <T extends OdooObj> List<T> findListByIds(List<OdooId> idsToFetch, Class<T> classToConvert)
      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 of OdooId
      classToConvert - The type of the target objects
      Returns:
      List of built objects