'Get the GET method handler'

def __GET(self, resource=None):

    method = self.method
    transform = False
    if ((method is None) or (method in ('read', 'display', 'update'))):
        if self.transformable():
            method = 'export_tree'
            transform = True
        elif self.component:
            resource = self.resource
            if (self.interactive and (resource.count() == 1)):
                if (not resource._rows):
                    resource.load(start=0, limit=1)
                if resource._rows:
                    self.record = resource._rows[0]
                    self.id = resource.get_id()
                    self.uid = resource.get_uid()
            if (self.component.multiple and (not self.component_id)):
                method = 'list'
            else:
                method = 'read'
        elif (self.id or (method in ('read', 'display', 'update'))):
            resource = self.resource
            if (not resource._rows):
                resource.load(start=0, limit=1)
            if resource._rows:
                self.record = resource._rows[0]
                self.id = resource.get_id()
                self.uid = resource.get_uid()
            else:
                self.error(404, current.ERROR.BAD_RECORD)
            method = 'read'
        else:
            method = 'list'
    elif (method in ('create', 'update')):
        if self.transformable(method='import'):
            method = 'import_tree'
            transform = True
    elif (method == 'delete'):
        return self.__DELETE()
    elif ((method == 'clear') and (not self.component)):
        s3_remove_last_record_id(self.tablename)
        self.next = URL(r=self, f=self.name)
        return (lambda r, **attr: None)
    elif self.transformable():
        transform = True
    return self.get_handler(method, transform=transform)
