Class ZonedToLocalDateTimeModel
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.form.datetime.ZonedToLocalDateTimeModel
-
- All Implemented Interfaces:
Serializable
,IDetachable
,IModel<LocalDateTime>
,IClusterable
public class ZonedToLocalDateTimeModel extends Object implements IModel<LocalDateTime>
- Author:
- svenmeier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ZonedToLocalDateTimeModel(IModel<ZonedDateTime> model)
Map the givenZonedDateTime
to aLocalDateTime
in the client's time zone.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach()
Detaches model after use.protected ZoneId
getClientTimeZone()
What is theZoneId
of the client.LocalDateTime
getObject()
Gets the model object.protected ZoneId
getTargetTimeZone()
What is theZoneId
of createdZonedDateTime
objects.void
setObject(LocalDateTime dateTime)
Sets the model object.
-
-
-
Constructor Detail
-
ZonedToLocalDateTimeModel
public ZonedToLocalDateTimeModel(IModel<ZonedDateTime> model)
Map the givenZonedDateTime
to aLocalDateTime
in the client's time zone.- Parameters:
model
- zoned date time
-
-
Method Detail
-
detach
public void detach()
Description copied from interface:IDetachable
Detaches model after use. This is generally used to null out transient references that can be re-attached later.- Specified by:
detach
in interfaceIDetachable
- Specified by:
detach
in interfaceIModel<LocalDateTime>
-
getClientTimeZone
protected ZoneId getClientTimeZone()
What is theZoneId
of the client.
-
getTargetTimeZone
protected ZoneId getTargetTimeZone()
What is theZoneId
of createdZonedDateTime
objects.
-
getObject
public LocalDateTime getObject()
Description copied from interface:IModel
Gets the model object.- Specified by:
getObject
in interfaceIModel<LocalDateTime>
- Returns:
- The model object
-
setObject
public void setObject(LocalDateTime dateTime)
Description copied from interface:IModel
Sets the model object.- Specified by:
setObject
in interfaceIModel<LocalDateTime>
- Parameters:
dateTime
- The model object
-
-