'Checks whether there are components defined for a table
@param table: the table or table name'

@classmethod
def has_components(cls, table):

    components = current.model.components
    load = cls.table
    if (type(table) is Table):
        tablename = table._tablename
    else:
        tablename = table
        table = load(tablename)
        if (table is None):
            return False
    if cls.get_config(tablename, 'dynamic_components'):
        cls.add_dynamic_components(tablename)
    hooks = Storage()
    get_hooks = cls.__get_hooks
    h = components.get(tablename, None)
    if h:
        get_hooks(hooks, h)
    if len(hooks):
        return True
    supertables = cls.get_config(tablename, 'super_entity')
    if supertables:
        if (not isinstance(supertables, (list, tuple))):
            supertables = [supertables]
        for s in supertables:
            if isinstance(s, str):
                s = load(s)
            if (s is None):
                continue
            h = components.get(s._tablename, None)
            if h:
                get_hooks(hooks, h, supertable=s)
        if len(hooks):
            return True
    return False
