Class ImmutableAttachmentBean.Builder

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.ImmutableAttachmentBean.Builder
Enclosing class:
ImmutableAttachmentBean

@NotThreadSafe public static final class ImmutableAttachmentBean.Builder extends Object
Builds instances of type ImmutableAttachmentBean. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder from(AttachmentBean instance)
      Fill a builder with attribute values from the provided AttachmentBean instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setId

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setId(@Nullable Integer id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id (can be null)
      Returns:
      this builder for use in a chained invocation
    • setObjectId

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setObjectId(Integer objectId)
      Initializes the value for the objectId attribute.
      Parameters:
      objectId - The value for objectId
      Returns:
      this builder for use in a chained invocation
    • setAuthor

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setAuthor(String author)
      Initializes the value for the author attribute.
      Parameters:
      author - The value for author
      Returns:
      this builder for use in a chained invocation
    • setComment

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setComment(@Nullable String comment)
      Initializes the value for the comment attribute.
      Parameters:
      comment - The value for comment (can be null)
      Returns:
      this builder for use in a chained invocation
    • setFilename

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setFilename(String filename)
      Initializes the value for the filename attribute.
      Parameters:
      filename - The value for filename
      Returns:
      this builder for use in a chained invocation
    • setMimeType

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setMimeType(String mimeType)
      Initializes the value for the mimeType attribute.
      Parameters:
      mimeType - The value for mimeType
      Returns:
      this builder for use in a chained invocation
    • setNameInFileSystem

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setNameInFileSystem(String nameInFileSystem)
      Initializes the value for the nameInFileSystem attribute.
      Parameters:
      nameInFileSystem - The value for nameInFileSystem
      Returns:
      this builder for use in a chained invocation
    • setFileSize

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setFileSize(Long fileSize)
      Initializes the value for the fileSize attribute.
      Parameters:
      fileSize - The value for fileSize
      Returns:
      this builder for use in a chained invocation
    • setCreated

      @CanIgnoreReturnValue public final ImmutableAttachmentBean.Builder setCreated(Date created)
      Initializes the value for the created attribute.
      Parameters:
      created - The value for created
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableAttachmentBean build()
      Returns:
      An immutable instance of AttachmentBean
      Throws:
      IllegalStateException - if any required attributes are missing