Class OdooId

java.lang.Object
ch.helvethink.odoo.models.OdooId

public class OdooId extends Object
Encapsulate an Odoo Id Can be an object "false" due to xmlrpc implementation from Odoo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Description of the identifier Not really useful except when debugging
    boolean
    Does the Id really exists In some cases null values are handled like a Boolean equals to false
    int
    Id if real Id
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
    OdooId(int id, String desc)
    Constructor with id and description
    Constructor with boolean - useful for null values
    OdooId(Object[] idRepresentation)
    Constructor with array of objects For some reason sometimes Odoo sent ids under this format
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      public int id
      Id if real Id
    • description

      public String description
      Description of the identifier Not really useful except when debugging
    • exists

      public boolean exists
      Does the Id really exists In some cases null values are handled like a Boolean equals to false
  • Constructor Details

    • OdooId

      public OdooId()
      Default constructor
    • OdooId

      public OdooId(Boolean b)
      Constructor with boolean - useful for null values
      Parameters:
      b - Should always be false - describe if the id exists
    • OdooId

      public OdooId(int id, String desc)
      Constructor with id and description
      Parameters:
      id - The id of the target field
      desc - The description of the target field, provided by Odoo
    • OdooId

      public OdooId(Object[] idRepresentation)
      Constructor with array of objects For some reason sometimes Odoo sent ids under this format
      Parameters:
      idRepresentation - The pair (id, description)