Record Class Customer
java.lang.Object
java.lang.Record
ch.martinelli.mite4java.domain.Customer
public record Customer(int id, String name, String note, String activeHourlyRate, Integer hourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCustomer(int id, String name, String note, String activeHourlyRate, Integer hourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aCustomerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveHourlyRaterecord component.booleanarchived()Returns the value of thearchivedrecord component.Returns the value of thecreatedAtrecord 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
-
Customer
public Customer(int id, String name, String note, String activeHourlyRate, Integer hourlyRate, List<HourlyRatePerService> hourlyRatesPerService, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aCustomerrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentnote- the value for thenoterecord componentactiveHourlyRate- the value for theactiveHourlyRaterecord componenthourlyRate- the value for thehourlyRaterecord 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
-
activeHourlyRate
Returns the value of theactiveHourlyRaterecord component.- Returns:
- the value of the
activeHourlyRaterecord component
-
hourlyRate
Returns the value of thehourlyRaterecord component.- Returns:
- the value of the
hourlyRaterecord 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
-