Administrative

Projects

Active

Future

Finished

Reference

Abandoned

Project: EloInv

EloInv Part class

This page contains developer documentation for the Part class importable from partclass - currently, more a notepad for me than real documentation.

Public methods

Part.init()

(Part) = Part(ID = None)

(Part) = Part(
  [type = ''],
  [package = ''],
  [value = ''],
  [description = ''],
  [cnt_target = 0],
  [cnt_min = 0],
  [storage_id = ''],
  [dslink = ''],
  [rmk = '']
  )

Data presentation

Part.str()

(string) = __str__()

Part.html_long()

(string) = html_long()

Part.html_short()

(string) = html_short()

Part.txt_short()

(string) = txt_short()

Database interaction

Part.store()

store()

Part storage handling

Part.storage_add()

storage_add(
  count = 0,
  [storage = 0]
  )

Part.storage_sub()

storage_sub(
  count = 0,
  [storage = 0]
  )

Part.storage_set()

storage_set(
  storage = 0,
  count = 0
  )

Part.storage_default_get()

(int) = storage_default_get()

Part availability

Part.storage_total_get()

(int) = storage_total_get()

Part.is_ordered()

(0 | 1) = is_ordered()

Exceptions

InvalidData

  'COUNTINVAL': 'Invalid count for operation.', \
  'UNDERFLOW': 'Not enough parts in whole storage to subtract.', \
  'STOREMPTY': 'Not enough parts in this storage.', \
  'STORNONE': 'No usable storage exists for this part.', \
  'STORINVAL': 'Unknown storage.', \
  'UNDEF': 'Undefined InvalidData error.' \

Logbook

Last page update: 2010-01-03