Class Image

java.lang.Object
com.needleandstitch.pavuk.model.Image

@Entity public class Image extends Object
An entity class for image.

This class serves as a model for the image table in the database.

Since:
15.12.2024
Version:
1.0.0
Author:
Needle & Stitch
  • Constructor Details

    • Image

      public Image()
      Default constructor.
    • Image

      public Image(String name, String url, boolean isPrimary)
      Constructor to create an image with a specified name, URL, and primary status.
      Parameters:
      name - The name of the image
      url - The URL of the image
      isPrimary - Whether the image is marked as the primary image
  • Method Details

    • getId

      public Long getId()
      Gets the unique identifier for the image.
      Returns:
      The image ID
    • setId

      public void setId(Long id)
      Sets the unique identifier for the image.
      Parameters:
      id - The image ID to set
    • getName

      public String getName()
      Gets the name of the image.
      Returns:
      The name of the image
    • setName

      public void setName(String name)
      Sets the name of the image.
      Parameters:
      name - The name of the image to set
    • getUrl

      public String getUrl()
      Gets the URL of the image.
      Returns:
      The URL of the image
    • setUrl

      public void setUrl(String url)
      Sets the URL of the image.
      Parameters:
      url - The URL to set for the image
    • getIsPrimary

      public boolean getIsPrimary()
      Gets whether the image is marked as the primary image.
      Returns:
      True\False depending on whether the image is primary.
    • setIsPrimary

      public void setIsPrimary(boolean isPrimary)
      Sets whether the image is marked as the primary image.
      Parameters:
      isPrimary - True\False depending on whether you want to set an image as primary one.