Interface IProjektDao

    • Method Detail

      • getByUUID

        Projekt getByUUID​(IEntityContext ec,
                          UUID clientUuid,
                          UUID uuid)
        Gets a project by its UUID. The project must be in the given client.
        Parameters:
        ec - Entity context for accessing the database.
        clientUuid - UUID of the client to which the project must belong.
        uuid - UUID of the project to get.
        Returns:
        The project with the given UUID in the given client, or null if no such project exists.
      • getByUUID

        Projekt getByUUID​(IEntityContext ec,
                          Long clientId,
                          UUID uuid)
        Gets a project by its UUID. The project must be in the given client.
        Parameters:
        ec - Entity context for accessing the database.
        clientId - ID of the client to which the project must belong.
        uuid - UUID of the project to get.
        Returns:
        The project with the given UUID in the given client, or null if no such project exists.
      • getByUUID

        Projekt getByUUID​(IEntityContext ec,
                          Mandant client,
                          String uuid)
        Gets a project by its UUID. The project must be in the given client.
        Parameters:
        ec - Entity context for accessing the database.
        client - The client to which the project must belong.
        uuid - UUID of the project to get.
        Returns:
        The project with the given UUID in the given client, or null if no such project exists.
      • getByUUID

        Projekt getByUUID​(IEntityContext ec,
                          Mandant client,
                          UUID uuid)
        Gets a project by its UUID. The project must be in the given client.
        Parameters:
        ec - Entity context for accessing the database.
        client - The client to which the project must belong.
        uuid - UUID of the project to get.
        Returns:
        The project with the given UUID in the given client, or null if no such project exists.
      • getProjectsWithPreviewImage

        Set<Long> getProjectsWithPreviewImage​(IEntityContext ec,
                                              Mandant client)
        Parameters:
        ec - Entity context for accessing the database.
        client - Client to which to limit the search. May be null, in which case no restriction is applied.
        Returns:
        A list of all IDs of projects for which a preview image is available.
      • findUniqueName

        String findUniqueName​(IEntityContext ec,
                              Mandant client,
                              String candidate,
                              Projekt exclude)
        Returns a name that is not taken by another Projekt in the given client other than the excluded data source. An index will be added to the candidate if necessary.
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which a unique project name should be generated
        candidate - String project name candiate to be made unique
        exclude - Projekt project to be excluded from search
        Returns:
        unique project name in the context of the given client
        Since:
        6.6.0
      • findUniqueTitle

        String findUniqueTitle​(IEntityContext ec,
                               Mandant client,
                               String candidate,
                               Projekt exclude)
        Returns a title that is not taken by another Projekt in the given client other than the excluded data source. An index will be added to the candidate if necessary.
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which a unique project title should be generated
        candidate - String project title candiate to be made unique
        exclude - Projekt project to be excluded from search
        Returns:
        unique project title in the context of the given client
        Since:
        6.6.0
      • isNameExisiting

        boolean isNameExisiting​(IEntityContext ec,
                                Mandant client,
                                String name)
        Returns whether or not the given project name exists within the given client
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which to check uniqueness
        name - Project name to check
        Returns:
        whether or not the given name is unique
        Since:
        6.6.0
      • isTitleExisiting

        boolean isTitleExisiting​(IEntityContext ec,
                                 Mandant client,
                                 String name)
        Returns whether or not the given project title exists within the given client
        Parameters:
        ec - IEntityContext to be used
        client - Mandant for which to check uniqueness
        name - Project title to check
        Returns:
        whether or not the given title is unique
        Since:
        6.6.0
      • getPreviewImageVersion

        String getPreviewImageVersion​(IEntityContext ec,
                                      Projekt project)
        Parameters:
        ec - Entity context for accessing the database.
        project - Project for which to find the preview image.
        Returns:
        The current (locking) version of the preview image.
      • getAccessableProjects

        List<Projekt> getAccessableProjects​(IEntityContext ec,
                                            IUser user,
                                            Mandant client)
        Returns all projects which are editable or visible by the user groups of the user in the given client.
        Parameters:
        ec - IEntityContext to be used
        user - IUser who has the user groups
        client - Mandant containing the user groups
        Returns:
        all projects which are visible or editable for the user in the given client
        Since:
        8.0.0