java.lang.Object
net.commuty.parking.model.AccessLog
public class AccessLog
extends java.lang.Object
This corresponds to a user that entered or exited a parking site at a point in time.
You can construct this entity using the createInAccessLog(UserId, LocalDateTime) or
createOutAccessLog(UserId, LocalDateTime) methods, depending on the type of access log you want to report.
-
Method Summary
Modifier and Type Method Description static AccessLogcreateInAccessLog(UserId userId, java.time.LocalDateTime at)Create a report for a user that entered the parking site at the specified time.static AccessLogcreateOutAccessLog(UserId userId, java.time.LocalDateTime at)Create a report for a user that exited the parking site at the specified time.java.time.LocalDateTimegetAt()The moment when the user entered/exited the parking site.java.lang.StringgetUserId()The identifier of the user.UserIdTypegetUserIdType()TheUserIdTypeof the identifier of the user.AccessDirectiongetWay()The direction (eitherAccessDirection.INorAccessDirection.OUT) of the user entering/exiting the parking site.
-
Method Details
-
createInAccessLog
Create a report for a user that entered the parking site at the specified time. -
createOutAccessLog
Create a report for a user that exited the parking site at the specified time. -
getUserId
public java.lang.String getUserId()The identifier of the user. This is linked with thegetUserIdType()property. -
getUserIdType
TheUserIdTypeof the identifier of the user. This is linked with thegetUserId()property. -
getWay
The direction (eitherAccessDirection.INorAccessDirection.OUT) of the user entering/exiting the parking site. -
getAt
public java.time.LocalDateTime getAt()The moment when the user entered/exited the parking site.
-