Class Image


  • @Entity
    public class Image
    extends Object
    This is the Image entity class, which declares the attributes for the image. Included are the image ID, image file name, the image description (not required), the Product ID, and a created timestamp. The Product ID is annotated by a @ManyToOne.
    • Constructor Detail

      • Image

        public Image()
    • Method Detail

      • getId

        public Long getId()
        Gets id
        Returns:
        id
      • getImageFileName

        @NonNull
        public String getImageFileName()
        Gets the filename for the image.
        Returns:
        The image filename.
      • setImageFileName

        public void setImageFileName​(@NonNull
                                     String imageFileName)
        Parameters:
        imageFileName - - String
      • getImageDescription

        public String getImageDescription()
        Gets the image description.
        Returns:
        The image description.
      • setImageDescription

        public void setImageDescription​(String imageDescription)
        Parameters:
        imageDescription - - String
      • getProduct

        @NonNull
        public Product getProduct()
        Gets the Product associated with the image.
        Returns:
        The Product for the image.
      • setProduct

        public void setProduct​(@NonNull
                               Product product)
        Sets Product id
        Parameters:
        product - - Product id
      • getCreated

        @NonNull
        public Date getCreated()
        Gets the creation timestamp for the image.
        Returns:
        The image's creation timestamp.