Ejemplo n.º 1
0
    def unlock(type, uow):
        if(type == "DESKTOP"):
            result = DesktopTDG.unlock(uow)

        elif(type == "LAPTOP"):
            result = LaptopTDG.unlock(uow)

        elif(type == "MONITOR"):
            result = MonitorDisplayTDG.unlock(uow)

        elif(type == "TABLET"):
            result = TabletTDG.unlock(uow)

        return result
Ejemplo n.º 2
0
    def delete(itemspec):
        if(type(itemspec) is Desktop):
            result = DesktopTDG.delete(itemspec)

        elif(type(itemspec) is Laptop):
            result = LaptopTDG.delete(itemspec)

        elif(type(itemspec) is MonitorDisplay):
            result = MonitorDisplayTDG.delete(itemspec)

        elif(type(itemspec) is Tablet):
            result = TabletTDG.delete(itemspec)

        return result
Ejemplo n.º 3
0
    def findAll(type):

        if (type == "DESKTOP"):
            result = DesktopTDG.findAll()

        elif(type == "LAPTOP"):
            result = LaptopTDG.findAll()

        elif(type == "TABLET"):
            result = TabletTDG.findAll()

        elif(type == "MONITOR"):
            result = MonitorDisplayTDG.findAll()

        itemSpecList = ItemSpecMapper.resultSetToItemSpec(result, type)
        return itemSpecList
Ejemplo n.º 4
0
    def find(modelNumber, specType):
        result = []

        if(specType == "DESKTOP"):
            result = DesktopTDG.find(modelNumber)

        elif(specType == "LAPTOP"):
            result = LaptopTDG.find(modelNumber)

        elif(specType == "MONITOR"):
            result = MonitorDisplayTDG.find(modelNumber)

        elif(specType == "TABLET"):
            result = TabletTDG.find(modelNumber)

        spec = ItemSpecMapper.resultSetToItemSpec([result], specType)
        if len(spec) == 0:
            return None
        else:
            return spec[0]