Record Class Service
java.lang.Object
java.lang.Record
ch.martinelli.mite4java.domain.Service
public record Service(int id, String name, String note, Integer hourlyRate, boolean billable, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionService(int id, String name, String note, Integer hourlyRate, boolean billable, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aServicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanarchived()Returns the value of thearchivedrecord component.booleanbillable()Returns the value of thebillablerecord 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.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
-
Service
public Service(int id, String name, String note, Integer hourlyRate, boolean billable, boolean archived, OffsetDateTime createdAt, OffsetDateTime updatedAt) Creates an instance of aServicerecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentnote- the value for thenoterecord componenthourlyRate- the value for thehourlyRaterecord componentbillable- the value for thebillablerecord 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
-
hourlyRate
Returns the value of thehourlyRaterecord component.- Returns:
- the value of the
hourlyRaterecord component
-
billable
public boolean billable()Returns the value of thebillablerecord component.- Returns:
- the value of the
billablerecord 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
-