Package com.omarigrant.budget.model
Class User
java.lang.Object
com.omarigrant.budget.model.User
A representation of an oauth2 user
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBudgets(Budget budget) Attach budget to userbooleaninthashCode()Overrided hashcode and equals to prevent stack overflow error due to Budgets model referencing this model and causing infinite recursion.voidremoveBudget(Budget budget) Remove budget from user
-
Constructor Details
-
User
public User()
-
-
Method Details
-
addBudgets
Attach budget to user- Parameters:
budget- Budget model
-
removeBudget
Remove budget from user- Parameters:
budget- Budget model
-
hashCode
public int hashCode()Overrided hashcode and equals to prevent stack overflow error due to Budgets model referencing this model and causing infinite recursion. -
equals
-