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 String
protected final it.tidalwave.util.Id
protected final String
Fields inherited from interface it.tidalwave.role.Identifiable
_Identifiable_
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InMemoryJobEvent
(JobEvent.Builder builder) Creates a new instance from a builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic JobEvent.Builder
builder()
Creates a new builder.abstract LocalDateTime
Returns the datetime of the event.abstract Duration
Returns the duration of the event.abstract Money
Returns the earnings for the event.abstract JobEvent.Builder
Returns 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, wait
Methods inherited from interface it.tidalwave.util.As
as, as, asMany, asMany, maybeAs, maybeAs
Methods 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.
-