'Retrieves a custom method for a resource or component
@param prefix: prefix of the resource name (=module name)
@param name: name of the resource (=without prefix)
@param component_name: name of the component
@param method: name of the method'

@classmethod
def get_method(cls, prefix, name, component_name=None, method=None):

    methods = current.model.methods
    cmethods = current.model.cmethods
    if (not method):
        return None
    tablename = ('%s_%s' % (prefix, name))
    if (not component_name):
        if ((method in methods) and (tablename in methods[method])):
            return methods[method][tablename]
        else:
            return None
    elif ((method in cmethods) and (component_name in cmethods[method]) and (tablename in cmethods[method][component_name])):
        return cmethods[method][component_name][tablename]
    else:
        return None
