Class Fabric

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

@Entity public class Fabric extends Object
An entity class for fabric.

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

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

    • Fabric

      public Fabric()
      Default constructor.
    • Fabric

      public Fabric(String name, Image image, Set<Color> colors)
      Constructor to create a fabric with a specified name, image, and set of colors.
      Parameters:
      name - The name of the fabric
      image - The image associated with the fabric
      colors - The set of colors associated with the fabric
  • Method Details

    • getId

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

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

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

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

      public Image getImage()
      Gets the image associated with the fabric.
      Returns:
      The image associated with the fabric
    • setImage

      public void setImage(Image image)
      Sets the image associated with the fabric.
      Parameters:
      image - The image to set for the fabric
    • getColors

      public Set<Color> getColors()
      Gets the set of colors associated with the fabric.
      Returns:
      The set of colors associated with the fabric
    • setColors

      public void setColors(Set<Color> colors)
      Sets the set of colors associated with the fabric.
      Parameters:
      colors - The set of colors to set for the fabric