Java Utililty Methods SQL LocalDate

List of utility methods to do SQL LocalDate

Description

The list of methods to do SQL LocalDate are organized into topic(s).

Method

LocalDatetoLocalDate(Date date)
to Local Date
if (date instanceof java.sql.Date)
    return ((java.sql.Date) date).toLocalDate();
else
    return date != null ? date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() : null;
LocalDatetoLocalDate(Date date)
to Local Date
if (date == null) {
    return null;
LocalDateTime ldt = LocalDateTime.ofInstant(new java.util.Date(date.getTime()).toInstant(),
        ZoneOffset.systemDefault());
return ldt.toLocalDate();
LocalDatetoLocalDate(final Date d)
to Local Date
if (d == null) {
    return null;
return LocalDateTime.ofInstant(d.toInstant(), ZoneId.systemDefault()).toLocalDate();
LocalDatetoLocalDate(java.sql.Date date)
Converts java.sql.Date to LocalDate (null safety)
return date == null ? null : date.toLocalDate();
LocalDatetoLocalDate(java.util.Date d)
to Local Date
LocalDate ld = (d == null ? null : LocalDate.fromDateFields(d));
return ld;
java.sql.DatetoSqlDate(Date d)
to Sql Date
if (d == null)
    return null;
return new java.sql.Date(d.getTime());
java.sql.DatetoSQLDate(DateMidnight dm)
to SQL Date
java.sql.Date d = (dm == null ? null : new java.sql.Date(dm.getMillis()));
return d;
java.sql.DatetoSqlDate(LocalDate ld)
to Sql Date
return ld == null ? null : java.sql.Date.valueOf(ld);
java.sql.DatetoSqlDateNoInicio(LocalDate data)
to Sql Date No Inicio
return toSqlDate(toDateNoInicio(data));
LocalDateTimetransfer(java.util.Date date)
transfer
return date == null ? null : LocalDateTime.ofInstant(date.toInstant(), defaultZoneId);