def findByUser(email): rows = PurchasedItemIDTDG.findByUser(email) result = list() for row in rows: itemSpec = ItemSpecMapper.find(row['modelNum'], row['type']) result.append(PurchasedItemID(row['serialNum'], itemSpec, email, row['type'], row['timeStamp'])) return result
def find(serialNumber): result = PurchasedItemIDTDG.findByPurchaseId(serialNumber) itemSpec = ItemSpecMapper.find(result['modelNum'], result['type']) result = PurchasedItemID(result['serialNum'], itemSpec, result['userID'], result['type'], result['timeStamp']) return result
def unlock(lockOwner): result = PurchasedItemIDTDG.unlock(lockOwner) return result
def update(purchaseItemID): PurchasedItemIDTDG.update(purchaseItemID)
def delete(serialNumber): PurchasedItemIDTDG.delete(serialNumber) return
def insert(newPurchaseItem): PurchasedItemIDTDG.insert(newPurchaseItem.serialNumber, newPurchaseItem.spec.modelNumber, newPurchaseItem.email, newPurchaseItem.spec.type, newPurchaseItem.timeStamp) return