/** * Decode a DefaultPeriod object. * * @param objValue the obj value */ public void decode(DefaultPeriod objValue) { DefaultPeriod defaultPeriod = objValue; Instant beginning = defaultPeriod.getBeginning(); Duration startDuration = new Duration(); startDuration.setDate( beginning.getPosition().getDate().toInstant().atZone(ZoneId.systemDefault())); setStart(startDuration); Instant localEnd = defaultPeriod.getEnding(); Duration endDuration = new Duration(); endDuration.setDate( localEnd.getPosition().getDate().toInstant().atZone(ZoneId.systemDefault())); setEnd(endDuration); } }