org.simpleflatmapper.converter.joda.impl.JodaLocalTimeTojuDateConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm-converter-joda-time Show documentation
Show all versions of sfm-converter-joda-time Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.simpleflatmapper.converter.joda.impl;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalTime;
import org.simpleflatmapper.converter.Converter;
import java.util.Date;
public class JodaLocalTimeTojuDateConverter implements Converter {
private final DateTimeZone dateTimeZone;
public JodaLocalTimeTojuDateConverter(DateTimeZone dateTimeZone) {
this.dateTimeZone = dateTimeZone;
}
@Override
public Date convert(LocalTime in) throws Exception {
if (in == null) return null;
return in.toDateTimeToday(dateTimeZone).toDate();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy