StudentLoanManagement
com.student_loan.model.Item Class Reference

Classes

enum  ItemCondition
 
enum  ItemStatus
 

Public Member Functions

 Item ()
 
 Item (Long id, String name, String description, String category, ItemStatus status, Long owner, Date purchaseDate, Double purchasePrice, ItemCondition condition, String image)
 
Long getId ()
 
void setId (Long id)
 
String getName ()
 
void setName (String name)
 
String getDescription ()
 
void setDescription (String description)
 
String getCategory ()
 
void setCategory (String category)
 
ItemStatus getStatus ()
 
void setStatus (ItemStatus status)
 
Long getOwner ()
 
void setOwner (Long owner)
 
Date getPurchaseDate ()
 
void setPurchaseDate (Date purchaseDate)
 
Double getPurchasePrice ()
 
void setPurchasePrice (Double purchasePrice)
 
ItemCondition getCondition ()
 
void setCondition (ItemCondition condition)
 
String getImage ()
 
void setImage (String image)
 
String toString ()
 

Detailed Description

Entity class representing an item in the system. Maps to the "items" table in the database.

Definition at line 12 of file Item.java.

Constructor & Destructor Documentation

◆ Item() [1/2]

com.student_loan.model.Item.Item ( )

Default constructor for the Item class.

Definition at line 91 of file Item.java.

◆ Item() [2/2]

com.student_loan.model.Item.Item ( Long  id,
String  name,
String  description,
String  category,
ItemStatus  status,
Long  owner,
Date  purchaseDate,
Double  purchasePrice,
ItemCondition  condition,
String  image 
)

Constructor for the Item class.

Parameters
idThe unique identifier for the item.
nameThe name of the item.
descriptionA description of the item.
categoryThe category of the item.
statusThe status of the item.
ownerThe ID of the owner of the item.
purchaseDateThe purchase date of the item.
purchasePriceThe purchase price of the item.
conditionThe condition of the item.
imageThe URL or path to the image of the item.

Definition at line 108 of file Item.java.

Member Function Documentation

◆ getCategory()

String com.student_loan.model.Item.getCategory ( )

Gets the category of the item.

Returns
The category of the item.

Definition at line 182 of file Item.java.

◆ getCondition()

ItemCondition com.student_loan.model.Item.getCondition ( )

Gets the condition of the item.

Returns
The condition of the item.

Definition at line 272 of file Item.java.

◆ getDescription()

String com.student_loan.model.Item.getDescription ( )

Gets the description of the item.

Returns
The description of the item.

Definition at line 164 of file Item.java.

◆ getId()

Long com.student_loan.model.Item.getId ( )

Gets the unique identifier for the item.

Returns
The unique identifier for the item.

Definition at line 128 of file Item.java.

◆ getImage()

String com.student_loan.model.Item.getImage ( )

Gets the URL or path to the image of the item.

Returns
The URL or path to the image of the item.

Definition at line 290 of file Item.java.

◆ getName()

String com.student_loan.model.Item.getName ( )

Gets the name of the item.

Returns
The name of the item.

Definition at line 146 of file Item.java.

◆ getOwner()

Long com.student_loan.model.Item.getOwner ( )

Gets the ID of the owner of the item.

Returns
The ID of the owner of the item.

Definition at line 218 of file Item.java.

◆ getPurchaseDate()

Date com.student_loan.model.Item.getPurchaseDate ( )

Gets the purchase date of the item.

Returns
The purchase date of the item.

Definition at line 236 of file Item.java.

◆ getPurchasePrice()

Double com.student_loan.model.Item.getPurchasePrice ( )

Gets the purchase price of the item.

Returns
The purchase price of the item.

Definition at line 254 of file Item.java.

◆ getStatus()

ItemStatus com.student_loan.model.Item.getStatus ( )

Gets the status of the item.

Returns
The status of the item.

Definition at line 200 of file Item.java.

◆ setCategory()

void com.student_loan.model.Item.setCategory ( String  category)

Sets the category of the item.

Parameters
categoryThe category of the item.

Definition at line 191 of file Item.java.

◆ setCondition()

void com.student_loan.model.Item.setCondition ( ItemCondition  condition)

Sets the condition of the item.

Parameters
conditionThe condition of the item.

Definition at line 281 of file Item.java.

◆ setDescription()

void com.student_loan.model.Item.setDescription ( String  description)

Sets the description of the item.

Parameters
descriptionThe description of the item.

Definition at line 173 of file Item.java.

◆ setId()

void com.student_loan.model.Item.setId ( Long  id)

Sets the unique identifier for the item.

Parameters
idThe unique identifier for the item.

Definition at line 137 of file Item.java.

◆ setImage()

void com.student_loan.model.Item.setImage ( String  image)

Sets the URL or path to the image of the item.

Parameters
imageThe URL or path to the image of the item.

Definition at line 299 of file Item.java.

◆ setName()

void com.student_loan.model.Item.setName ( String  name)

Sets the name of the item.

Parameters
nameThe name of the item.

Definition at line 155 of file Item.java.

◆ setOwner()

void com.student_loan.model.Item.setOwner ( Long  owner)

Sets the ID of the owner of the item.

Parameters
ownerThe ID of the owner of the item.

Definition at line 227 of file Item.java.

◆ setPurchaseDate()

void com.student_loan.model.Item.setPurchaseDate ( Date  purchaseDate)

Sets the purchase date of the item.

Parameters
purchaseDateThe purchase date of the item.

Definition at line 245 of file Item.java.

◆ setPurchasePrice()

void com.student_loan.model.Item.setPurchasePrice ( Double  purchasePrice)

Sets the purchase price of the item.

Parameters
purchasePriceThe purchase price of the item.

Definition at line 263 of file Item.java.

◆ setStatus()

void com.student_loan.model.Item.setStatus ( ItemStatus  status)

Sets the status of the item.

Parameters
statusThe status of the item.

Definition at line 209 of file Item.java.

◆ toString()

String com.student_loan.model.Item.toString ( )

Returns a string representation of the item.

Returns
A string representation of the item.

Definition at line 309 of file Item.java.


The documentation for this class was generated from the following file: