Class Category

java.lang.Object
com.equipmentrental.equipment_rental_system.model.Category

@Entity public class Category extends Object
Represents an equipment category used to group items by type. Examples include Audio Equipment, Computing and Photography.

Each equipment item must belong to exactly one category (BR-04). A category cannot be deleted while equipment items are assigned to it (BR-06).

See Also:
  • Constructor Details

    • Category

      public Category(String name, String description)
      Creates a new category with the specified name and description.
      Parameters:
      name - the unique category name
      description - a brief description of the category
  • Method Details

    • getEquipmentCount

      public int getEquipmentCount()
      Returns the number of equipment items currently assigned to this category.
      Returns:
      the count of equipment items in this category