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
@Immutable public abstract class InMemoryJobEvent extends java.lang.Object implements JobEvent
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
Fields Modifier and Type Field Description protected java.lang.Stringdescriptionprotected it.tidalwave.util.Ididprotected java.lang.Stringname
-
Constructor Summary
Constructors Modifier Constructor Description protectedInMemoryJobEvent(JobEvent.Builder builder)Creates a new instance from a builder.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JobEvent.Builderbuilder()Creates a new builder.abstract java.time.LocalDateTimegetDateTime()Returns the datetime of the event.abstract java.time.DurationgetDuration()Returns the duration of the event.abstract MoneygetEarnings()Returns the earnings for the event.abstract JobEvent.BuildertoBuilder()Returns a builder pre-populated with all the attributes.
-
-
-
Constructor Detail
-
InMemoryJobEvent
protected InMemoryJobEvent(@Nonnull JobEvent.Builder builder)Creates a new instance from a builder.- Parameters:
builder- the builder
-
-
Method Detail
-
builder
@Nonnull public static JobEvent.Builder builder()
Creates a new builder.- Returns:
- the builder
-
getDateTime
@Nonnull public abstract java.time.LocalDateTime getDateTime()
Returns the datetime of the event.- Returns:
- the date
-
getDuration
@Nonnull public abstract java.time.Duration getDuration()
Returns the duration of the event.- Returns:
- the duration
-
getEarnings
@Nonnull public abstract Money getEarnings()
Returns the earnings for the event.- Returns:
- the earnings
-
toBuilder
@Nonnull public abstract JobEvent.Builder toBuilder()
Returns a builder pre-populated with all the attributes.
-
-