Class Transaction
java.lang.Object
no.idata1002.group19.domain.entity.Transaction
This class represent Transaction entity.
- Since:
- 16.04.2023
- Version:
- 16.04.2023
- Author:
- Group19
-
Constructor Summary
ConstructorDescriptionEmpty constructor that is needed for JPATransaction
(String tname, int value, String description, LocalDate date, Budget budget) Default constructor for Transaction. -
Method Summary
Modifier and TypeMethodDescriptiongetDate()
Returns the date of the transaction.Returns the description of the transaction.long
getTid()
Returns the id of transaction.getTname()
Returns the name of the transaction.int
getValue()
Returns the value of the transaction.boolean
isValid()
Checks if the transaction is valid.void
void
Setts the date of the transaction.void
setDescription
(String description) Setts the description of the transaction.void
setTid
(long tid) Setts the id of the transaction.void
Setts the name fo the transaction.void
setValue
(int value) Setts the value of the transaction.
-
Constructor Details
-
Transaction
Default constructor for Transaction.- Parameters:
tname
- the name of the transaction.value
- the value of the transaction.description
- description of the transaction.date
- the date of the transaction.
-
Transaction
public Transaction()Empty constructor that is needed for JPA
-
-
Method Details
-
getTid
public long getTid()Returns the id of transaction.- Returns:
- tid.
-
getTname
Returns the name of the transaction.- Returns:
- tname.
-
getValue
public int getValue()Returns the value of the transaction.- Returns:
- value.
-
getDescription
Returns the description of the transaction.- Returns:
- transaction.
-
getDate
Returns the date of the transaction.- Returns:
- date.
-
setTid
public void setTid(long tid) Setts the id of the transaction.- Parameters:
tid
- the id you want for transaction.
-
setTname
Setts the name fo the transaction.- Parameters:
tname
- the name you want for transaction.
-
setValue
public void setValue(int value) Setts the value of the transaction.- Parameters:
value
- the vale you want for transaction.
-
setDescription
Setts the description of the transaction.- Parameters:
description
- the description you want for transaction.
-
setDate
Setts the date of the transaction.- Parameters:
date
- the date you want for transaction.
-
getBudget
-
setBudget
-
isValid
public boolean isValid()Checks if the transaction is valid.- Returns:
- boolean statement. True if valid, false if not.
-