"""Entry point for building LOL DMSQuery XML."""
from ecmind_blue_client.ecm.builder._dms_query_builder import DmsQueryBuilder
from ecmind_blue_client.ecm.builder._dms_query_object_type_lol import (
    DmsQueryObjectTypeLol,
)


class DmsQueryBuilderLol(DmsQueryBuilder):
    """Builder for LOL (Linear Object List) DMSQuery requests.

    Pre-sets ``requesttype`` to ``LOL``. Use this builder for flat, paginated result lists.
    """

    def __init__(self):
        super().__init__()
        self._node.attrib["requesttype"] = "LOL"

    def object_type(self, internal_name_or_type_id: str | int) -> DmsQueryObjectTypeLol:
        return DmsQueryObjectTypeLol(self._archive_node, internal_name_or_type_id)
