@classmethod
def get_by_id(cls, context, allocation_id):
    """Find an allocation by its integer ID.

        :param cls: the :class:`Allocation`
        :param context: Security context
        :param allocation_id: The ID of an allocation.
        :returns: An :class:`Allocation` object.
        :raises: AllocationNotFound

        """
    db_allocation = cls.dbapi.get_allocation_by_id(allocation_id)
    allocation = cls._from_db_object(context, cls(), db_allocation)
    return allocation
