Class BudgetDao

java.lang.Object
com.omarigrant.budget.dao.BudgetDao
All Implemented Interfaces:
Dao<Budget>

@Component public class BudgetDao extends Object implements Dao<Budget>
A DAO for the Budget entity
  • Constructor Details

    • BudgetDao

      public BudgetDao()
  • Method Details

    • get

      public Optional<Budget> get(long id)
      Description copied from interface: Dao
      Return one item from database
      Specified by:
      get in interface Dao<Budget>
      Parameters:
      id - id to find item by
      Returns:
      Optional object of item
    • all

      public List<Budget> all()
      Description copied from interface: Dao
      Return all items from database
      Specified by:
      all in interface Dao<Budget>
      Returns:
      A list of items
    • save

      public void save(Budget item)
      Description copied from interface: Dao
      Save item to database
      Specified by:
      save in interface Dao<Budget>
      Parameters:
      item - item to save
    • delete

      public void delete(long id)
      Description copied from interface: Dao
      Delete item from database
      Specified by:
      delete in interface Dao<Budget>
      Parameters:
      id - id of item to be deleted