Class InMemoryJobEvent
java.lang.Object
it.tidalwave.accounting.model.impl.InMemoryJobEvent
- All Implemented Interfaces:
JobEvent,it.tidalwave.role.Identifiable,it.tidalwave.util.As
- Direct Known Subclasses:
InMemoryFlatJobEvent,InMemoryJobEventGroup,InMemoryTimedJobEvent
This class models a single job event.
- Author:
- Fabrizio Giudici
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.tidalwave.accounting.model.JobEvent
JobEvent.Builder, JobEvent.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final it.tidalwave.util.Idprotected final StringFields inherited from interface it.tidalwave.role.Identifiable
_Identifiable_ -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInMemoryJobEvent(JobEvent.Builder builder) Creates a new instance from a builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic JobEvent.Builderbuilder()Creates a new builder.abstract LocalDateTimeReturns the datetime of the event.abstract DurationReturns the duration of the event.abstract MoneyReturns the earnings for the event.abstract JobEvent.BuilderReturns a builder pre-populated with all the attributes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.tidalwave.util.As
as, as, asMany, asMany, maybeAs, maybeAsMethods inherited from interface it.tidalwave.role.Identifiable
getId
-
Field Details
-
id
@Nonnull protected final it.tidalwave.util.Id id -
name
-
description
-
-
Constructor Details
-
InMemoryJobEvent
Creates a new instance from a builder.- Parameters:
builder- the builder
-
-
Method Details
-
builder
Creates a new builder.- Returns:
- the builder
-
getDateTime
Returns the datetime of the event.- Returns:
- the date
-
getDuration
Returns the duration of the event.- Returns:
- the duration
-
getEarnings
Returns the earnings for the event.- Returns:
- the earnings
-
toBuilder
Returns a builder pre-populated with all the attributes.
-