Interface ArtifactDefinitionDao

    • Method Detail

      • findById

        @Nullable
        @Nullable ArtifactDefinition findById​(long id)
        Get artifact definition of specified id
        Parameters:
        id - id of artifact definition
        Returns:
        artifact definition of specified id or null if not found
      • findByName

        @Nullable
        @Nullable ArtifactDefinition findByName​(@NotNull
                                                @NotNull ImmutablePlan plan,
                                                @NotNull
                                                @NotNull String name)
        Find artifact definition of a given name associated with a producer job.
        Parameters:
        plan - plan which associated artifact definition should be retrieved
        name - name to search among plan's artifact definitions
        Returns:
        artifact definition matching plan and label or null if not found
      • findByNameInChain

        @Nullable
        @Nullable ArtifactDefinition findByNameInChain​(@NotNull
                                                       @NotNull ImmutableChain chain,
                                                       @NotNull
                                                       @NotNull String name)
        Find artifact definition of a given name which has sharedArtifact property set to true, associated with a producer job that belongs to the chain.
        Parameters:
        chain - chain which associated artifact definition should be retrieved
        name - name to search among plan's artifact definitions
        Returns:
        artifact definition matching plan and label or null if not found
      • findAll

        @NotNull
        @NotNull Collection<? extends ArtifactDefinition> findAll()
        Find all artifact definitions
        Returns:
        Collection of all artifact definitions
      • findByProducer

        @NotNull
        @NotNull List<ArtifactDefinition> findByProducer​(@NotNull
                                                         @NotNull ImmutablePlan plan)
        Get list of artifact definitions associated with a plan
        Parameters:
        plan - plan which associated artifact definitions should be retrieved
        Returns:
        list of artifact definitions
      • findSharedArtifactsByChain

        @NotNull
        @NotNull List<ArtifactDefinition> findSharedArtifactsByChain​(@NotNull
                                                                     @NotNull ImmutableChain chain)
        Find all shared artifacts that exist for a particular chain.
        Parameters:
        chain - chain which associated artifact definitions should be retrieved
        Returns:
        shared artifacts that exist for the specified particular chain
      • removeByProducer

        void removeByProducer​(@NotNull
                              @NotNull ImmutablePlan plan)
        Remove all artifact definitions associated with a plan.
        Parameters:
        plan - plan which associated artifact definitions should be removed
      • getMaxArtifactDefinitionOid

        @NotNull
        @NotNull BambooEntityOid getMaxArtifactDefinitionOid​(int serverKey)
        Find maximum oid used by existing objects in the db.
        Parameters:
        serverKey -
        Returns: