All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.craftsman.creator.OffsetDateTimeCreator Maven / Gradle / Ivy

Go to download

A library that provides the missing Java 8 type mappers for the Dozer Java Bean Mapper.

The newest version!
package io.craftsman.creator;

import java.time.OffsetDateTime;

public class OffsetDateTimeCreator implements Creator {

    @Override
    public OffsetDateTime create(Object source) {
      OffsetDateTime srcObject = (OffsetDateTime) source;
        return OffsetDateTime.of(
                srcObject.getYear(),
                srcObject.getMonthValue(),
                srcObject.getDayOfMonth(),
                srcObject.getHour(),
                srcObject.getMinute(),
                srcObject.getSecond(),
                srcObject.getNano(),
                srcObject.getOffset()
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy