Package ch.helvethink.odoo.models
Class OdooId
java.lang.Object
ch.helvethink.odoo.models.OdooId
Encapsulate an Odoo Id
Can be an object "false" due to xmlrpc implementation from Odoo
-
Field Summary
FieldsModifier and TypeFieldDescriptionDescription of the identifier Not really useful except when debuggingbooleanDoes the Id really exists In some cases null values are handled like a Boolean equals to falseintId if real Id -
Constructor Summary
ConstructorsConstructorDescriptionOdooId()Default constructorConstructor with id and descriptionConstructor with boolean - useful for null valuesConstructor with array of objects For some reason sometimes Odoo sent ids under this format -
Method Summary
-
Field Details
-
id
public int idId if real Id -
description
Description of the identifier Not really useful except when debugging -
exists
public boolean existsDoes 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
Constructor with boolean - useful for null values- Parameters:
b- Should always be false - describe if the id exists
-
OdooId
Constructor with id and description- Parameters:
id- The id of the target fielddesc- The description of the target field, provided by Odoo
-
OdooId
Constructor with array of objects For some reason sometimes Odoo sent ids under this format- Parameters:
idRepresentation- The pair (id, description)
-