some refactoring
This commit is contained in:
parent
3216c04a9f
commit
5e73960f71
1 changed files with 3 additions and 6 deletions
|
|
@ -5,14 +5,11 @@ import org.springframework.jdbc.core.JdbcTemplate;
|
|||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.sql.Date;
|
||||
import java.sql.*;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
|
||||
public abstract class ObjectBaseMapStore<T extends SpcexObjectBase> extends SimpleObjectMapStore<T> {
|
||||
|
|
@ -88,7 +85,7 @@ public abstract class ObjectBaseMapStore<T extends SpcexObjectBase> extends Simp
|
|||
|
||||
protected LocalDate getLocalDateFromSqlDate(ResultSet rs, String column) throws SQLException {
|
||||
Date date = rs.getDate(column);
|
||||
return date != null ? Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDate() : null;
|
||||
return date != null ? date.toLocalDate() : null;
|
||||
}
|
||||
|
||||
protected LocalTime getLocalTimeFromSqlTime(ResultSet rs, String column) throws SQLException {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue