Record Class Project
java.lang.Object
java.lang.Record
ch.martinelli.mite4java.domain.Project
public record Project(int id, String name, String note, Integer customerId, String customerName, int budget, String budgetType, Integer hourlyRate, String activeHourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProject(int id, String name, String note, Integer customerId, String customerName, int budget, String budgetType, Integer hourlyRate, String activeHourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aProjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveHourlyRaterecord component.booleanarchived()Returns the value of thearchivedrecord component.intbudget()Returns the value of thebudgetrecord component.Returns the value of thebudgetTyperecord component.Returns the value of thecreatedAtrecord component.Returns the value of thecustomerIdrecord component.Returns the value of thecustomerNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehourlyRaterecord component.Returns the value of thehourlyRatesPerServicerecord component.intid()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.note()Returns the value of thenoterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.
-
Constructor Details
-
Project
public Project(int id, String name, String note, Integer customerId, String customerName, int budget, String budgetType, Integer hourlyRate, String activeHourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aProjectrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentnote- the value for thenoterecord componentcustomerId- the value for thecustomerIdrecord componentcustomerName- the value for thecustomerNamerecord componentbudget- the value for thebudgetrecord componentbudgetType- the value for thebudgetTyperecord componenthourlyRate- the value for thehourlyRaterecord componentactiveHourlyRate- the value for theactiveHourlyRaterecord componenthourlyRatesPerService- the value for thehourlyRatesPerServicerecord componentarchived- the value for thearchivedrecord componentcreatedAt- the value for thecreatedAtrecord componentupdatedAt- the value for theupdatedAtrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
note
Returns the value of thenoterecord component.- Returns:
- the value of the
noterecord component
-
customerId
Returns the value of thecustomerIdrecord component.- Returns:
- the value of the
customerIdrecord component
-
customerName
Returns the value of thecustomerNamerecord component.- Returns:
- the value of the
customerNamerecord component
-
budget
public int budget()Returns the value of thebudgetrecord component.- Returns:
- the value of the
budgetrecord component
-
budgetType
Returns the value of thebudgetTyperecord component.- Returns:
- the value of the
budgetTyperecord component
-
hourlyRate
Returns the value of thehourlyRaterecord component.- Returns:
- the value of the
hourlyRaterecord component
-
activeHourlyRate
Returns the value of theactiveHourlyRaterecord component.- Returns:
- the value of the
activeHourlyRaterecord component
-
hourlyRatesPerService
Returns the value of thehourlyRatesPerServicerecord component.- Returns:
- the value of the
hourlyRatesPerServicerecord component
-
archived
public boolean archived()Returns the value of thearchivedrecord component.- Returns:
- the value of the
archivedrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
updatedAt
Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-