def __init__( self, # - Required arguments from BaseProduct name: (str, ), summary: (str, ), available: (bool, ), store_available: (bool, ), # - Optional arguments from BaseProduct description: (str, None) = None, dimensions: (str, None) = None, metadata: (dict, ) = {}, shipping_weight: (int, ) = 0, # - Optional arguments from BaseDataObject/JSONFileDataObject oid: (UUID, str, None) = None, created: (datetime, str, float, int, None) = None, modified: (datetime, str, float, int, None) = None, is_active: (bool, int, None) = None, is_deleted: (bool, int, None) = None, is_dirty: (bool, int, None) = None, is_new: (bool, int, None) = None, ): """ Object initialization. self .............. (Product instance, required) The instance to execute against name .............. (str, required) The name of the product summary ........... (str, required) A one-line summary of the product available ......... (bool, required) Flag indicating whether the product is considered available by the artisan who makes it store_available ... (bool, required) Flag indicating whether the product is considered available on the web- store by the central office description ....... (str, optional, defaults to None) A detailed description of the product dimensions ........ (str, optional, defaults to None) A measurement- description of the product metadata .......... (dict, optional, defaults to {}) A collection of metadata keys and values describing the product shipping_weight ... (int, optional, defaults to 0) The shipping- weight of the product oid ............... (UUID|str, optional, defaults to None) created ........... (datetime|str|float|int, optional, defaults to None) modified .......... (datetime|str|float|int, optional, defaults to None) is_active ......... (bool|int, optional, defaults to None) is_deleted ........ (bool|int, optional, defaults to None) is_dirty .......... (bool|int, optional, defaults to None) is_new ............ (bool|int, optional, defaults to None) products .......... (BaseProduct collection) The products associated with the Artisan that the instance represents """ # - Call parent initializers if needed BaseProduct.__init__(self, name, summary, available, store_available, description, dimensions, metadata, shipping_weight) JSONFileDataObject.__init__(self, oid, created, modified, is_active, is_deleted, is_dirty, is_new) # - Set default instance property-values using _del_... methods # - Set instance property-values from arguments using # _set_... methods # - Perform any other initialization needed self._set_is_dirty(False)
def _del_store_available(self) -> None: result = BaseProduct._del_store_available(self) self._set_is_dirty(True) return result
def _del_summary(self) -> None: result = BaseProduct._del_summary(self) self._set_is_dirty(True) return result
def _del_metadata(self) -> None: result = BaseProduct._del_metadata(self) self._set_is_dirty(True) return result
def _del_shipping_weight(self) -> None: result = BaseProduct._del_shipping_weight(self) self._set_is_dirty(True) return result
def _del_description(self) -> None: result = BaseProduct._del_description(self) self._set_is_dirty(True) return result
def _del_dimensions(self) -> None: result = BaseProduct._del_dimensions(self) self._set_is_dirty(True) return result
def _set_store_available(self, value: (bool, int)): result = BaseProduct._set_store_available(self, value) self._set_is_dirty(True) return result
def _set_summary(self, value: str) -> None: result = BaseProduct._set_summary(self, value) self._set_is_dirty(True) return result
def _set_shipping_weight(self, value: (int, float)): result = BaseProduct._set_shipping_weight(self, value) self._set_is_dirty(True) return result
def _set_metadata(self, value: (dict, )): result = BaseProduct._set_metadata(self, value) self._set_is_dirty(True) return result
def _set_dimensions(self, value: str) -> None: result = BaseProduct._set_dimensions(self, value) self._set_is_dirty(True) return result
def _set_description(self, value: str) -> None: result = BaseProduct._set_description(self, value) self._set_is_dirty(True) return result
def __init__( self, # - Arguments from HMSMongoDataObject name: (str, ), summary: (str, ), available: (bool, ), store_available: (bool, ), # - Optional arguments: description: (str, None) = None, dimensions: (str, None) = None, metadata: (dict, ) = {}, shipping_weight: (int, ) = 0, # - Arguments from HMSMongoDataObject oid: (UUID, str, None) = None, created: (datetime, str, float, int, None) = None, modified: (datetime, str, float, int, None) = None, is_active: (bool, int, None) = None, is_deleted: (bool, int, None) = None, is_dirty: (bool, int, None) = None, is_new: (bool, int, None) = None, ): """ Object initialization. self .............. (Product instance, required) The instance to execute against name .............. (str, required) The name of the product summary ........... (str, required) A one-line summary of the product available ......... (bool, required) Flag indicating whether the product is considered available by the artisan who makes it store_available ... (bool, required) Flag indicating whether the product is considered available on the web- store by the central office description ....... (str, optional, defaults to None) A detailed description of the product dimensions ........ (str, optional, defaults to None) A measurement- description of the product metadata .......... (dict, optional, defaults to {}) A collection of metadata keys and values describing the product shipping_weight ... (int, optional, defaults to 0) The shipping- weight of the product oid ............... (UUID|str, optional, defaults to None) The unique identifier of the object's state-data record in the back-end data-store created ........... (datetime|str|float|int, optional, defaults to None) The date/time that the object was created modified .......... (datetime|str|float|int, optional, defaults to None) The date/time that the object was last modified is_active ......... (bool|int, optional, defaults to None) A flag indicating that the object is active is_deleted ........ (bool|int, optional, defaults to None) A flag indicating that the object should be considered deleted (and may be in the near future) is_dirty .......... (bool|int, optional, defaults to None) A flag indicating that the object's data needs to be updated in the back-end data-store is_new ............ (bool|int, optional, defaults to None) A flag indicating that the object's data needs to be created in the back-end data-store """ # - Call parent initializers if needed BaseProduct.__init__(self, name, summary, available, store_available, description, dimensions, metadata, shipping_weight) HMSMongoDataObject.__init__(self, oid, created, modified, is_active, is_deleted, is_dirty, is_new)