File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
78 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
79 |
ZonedDateTime zonedValue = value.atStartOfDay(currentDatabaseZone);
// Instant valueAsInstant = Instant.ofEpochSecond(zonedValue.toEpochSecond());
// int defaultTimezoneOffset = TimeZone.getDefault().getOffset(zonedValue.toEpochSecond() * MILLIS_IN_SECOND);
// int databaseTimezoneOffsetInSeconds = currentDatabaseZone.getRules().getOffset(valueAsInstant).getTotalSeconds();
// int adjustment = defaultTimezoneOffset - databaseTimezoneOffsetInSeconds * MILLIS_IN_SECOND;
final Date date = new Date(zonedValue.toInstant().toEpochMilli());
return date;
}
private static ZoneId getDefault() {
ZoneId zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z");
}
return zone;
}
@Override
public ZoneId parseZone(String zoneString) {
return ZoneId.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
83 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
75 |
timestamp.setNanos(value.getNano());
return timestamp;
}
private static ZoneId getDefault() {
ZoneId zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z");
}
return zone;
}
@Override
public ZoneId parseZone(String zoneString) {
return ZoneId.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
35 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new LongColumnLocalTimeMapper(), new StringColumnZoneOffsetMapper() };
private static final String[] PROPERTY_NAMES = new String[]{ "time", "offset" };
@Override
protected OffsetTime fromConvertedColumns(Object[] convertedColumns) {
LocalTime datePart = (LocalTime) convertedColumns[0];
ZoneOffset offset = (ZoneOffset) convertedColumns[1];
return OffsetTime.of(datePart, offset);
}
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Object[] toConvertedColumns(OffsetTime value) {
return new Object[] { value.toLocalTime(), value.getOffset() };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
87 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
88 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
85 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
77 |
}
private static ZoneId getDefault() {
ZoneId zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z");
}
return zone;
}
@Override
public ZoneId parseZone(String zoneString) {
return ZoneId.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
77 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
78 |
}
private static ZoneOffset getDefault() {
ZoneOffset zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneOffset.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of("Z");
}
return zone;
}
@Override
public void setDatabaseZone(ZoneOffset databaseZone) {
this.databaseZone = databaseZone;
}
@Override
public ZoneOffset parseZone(String zoneString) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
77 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
78 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
75 |
}
private static ZoneOffset getDefault() {
ZoneOffset zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneOffset.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of("Z");
}
return zone;
}
@Override
public void setDatabaseZone(ZoneOffset databaseZone) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
89 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
90 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
88 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
79 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
52 |
private static ZoneId getDefault() {
ZoneId zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z");
}
return zone;
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
43 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
48 |
return MonetaryUtil.majorPart().apply(value).getNumber().longValue();
}
@Override
public FastMoney fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1);
return FastMoney.of(Long.parseLong(value), Monetary.getCurrency(currency));
}
@Override
public String toNonNullString(MonetaryAmount value) {
return value.toString();
}
@Override
public void setCurrencyUnit(CurrencyUnit currencyUnit) {
this.currencyUnit = currencyUnit;
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
44 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
43 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
48 |
return value.getNumber().numberValue(BigDecimal.class);
}
@Override
public FastMoney fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1);
return FastMoney.of(Long.parseLong(value), Monetary.getCurrency(currency));
}
@Override
public String toNonNullString(MonetaryAmount value) {
return value.toString();
}
@Override
public void setCurrencyUnit(CurrencyUnit currencyUnit) {
this.currencyUnit = currencyUnit;
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
44 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
49 |
return value.getNumber().numberValue(BigDecimal.class);
}
@Override
public Money fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1);
return Money.of(Long.parseLong(value), Monetary.getCurrency(currency));
}
@Override
public String toNonNullString(MonetaryAmount value) {
return value.toString();
}
@Override
public void setCurrencyUnit(CurrencyUnit currencyUnit) {
this.currencyUnit = currencyUnit;
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
38 |
return FastMoney.of(minorVal, currencyUnit);
}
@Override
public Long toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
}
BigDecimal val = value.getNumber().numberValue(BigDecimal.class);
return val.movePointRight(currencyUnit.getDefaultFractionDigits()).longValue();
}
@Override
public FastMoney fromNonNullString(String s) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
31 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
31 |
public class PersistentFastMoneyMajorAmountAndCurrency extends AbstractMultiColumnUserType<MonetaryAmount> {
private static final long serialVersionUID = -3990523657883978202L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnCurrencyUnitMapper(), new LongLongColumnMapper<Long>() };
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amountMajor" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected FastMoney fromConvertedColumns(Object[] convertedColumns) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
32 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
32 |
public class PersistentFastMoneyMinorAmountAndCurrency extends AbstractMultiColumnUserType<MonetaryAmount> {
private static final long serialVersionUID = -3990523657883978202L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] {
new StringColumnCurrencyUnitMapper(), new LongLongColumnMapper<Long>() };
private static final String[] PROPERTY_NAMES = new String[] { "currencyUnit", "amountMinor" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected FastMoney fromConvertedColumns(Object[] convertedColumns) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
32 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
32 |
public class PersistentFastMoneyAmountAndCurrency extends AbstractMultiColumnUserType<MonetaryAmount> {
private static final long serialVersionUID = 3735995469031558183L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnCurrencyUnitMapper(), new BigDecimalBigDecimalColumnMapper() };
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amount" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected FastMoney fromConvertedColumns(Object[] convertedColumns) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
54 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
54 |
return FastMoney.of(majorVal, currencyUnitPart);
}
@Override
protected Object[] toConvertedColumns(MonetaryAmount value) {
BigDecimal minorVal = value.getNumber().numberValue(BigDecimal.class);
minorVal = minorVal.movePointRight(value.getCurrency().getDefaultFractionDigits());
return new Object[] { value.getCurrency(), minorVal.longValue() };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
33 |
return FastMoney.of(val, currencyUnit);
}
@Override
public Long toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
}
return MonetaryUtil.majorPart().apply(value).getNumber().longValue();
}
@Override
public FastMoney fromNonNullString(String s) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
36 |
return FastMoney.of(val, currencyUnit);
}
@Override
public BigDecimal toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
}
return value.getNumber().numberValue(BigDecimal.class);
}
@Override
public FastMoney fromNonNullString(String s) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
78 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
76 |
public Timestamp toNonNullValue(OffsetDateTime value) {
final Timestamp timestamp = new Timestamp((value.toEpochSecond() * MILLIS_IN_SECOND));
timestamp.setNanos(value.getNano());
return timestamp;
}
@Override
public void setJavaZone(ZoneId javaZone) {
this.javaZone = javaZone;
}
@Override
public ZoneId parseZone(String zoneString) {
return ZoneId.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
49 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
49 |
FastMoney money = FastMoney.of(amountMajorPart, currencyUnitPart);
return money;
}
@Override
protected Object[] toConvertedColumns(MonetaryAmount value) {
return new Object[] { value.getCurrency(), MonetaryUtil.majorPart().apply(value).getNumber().longValue() };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
30 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
30 |
public class TimestampColumnInstantMapper extends AbstractTimestampThreeTenColumnMapper<Instant> implements DatabaseZoneConfigured<ZoneId> {
private static final long serialVersionUID = -7670411089210984705L;
public static final DateTimeFormatter LOCAL_DATETIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss").appendOptional(new DateTimeFormatterBuilder().appendLiteral('.').appendFraction(ChronoField.NANO_OF_SECOND, 1, 9, false).toFormatter()).toFormatter();
public TimestampColumnInstantMapper() { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
35 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
34 |
public class TimestampColumnOffsetDateTimeMapper extends AbstractTimestampThreeTenColumnMapper<OffsetDateTime> implements DatabaseZoneConfigured<ZoneId>, JavaZoneConfigured<ZoneId> {
private static final long serialVersionUID = -7670411089210984705L;
public static final DateTimeFormatter DATETIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss").appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, false).toFormatter();
private static final int MILLIS_IN_SECOND = 1000;
private ZoneId javaZone = null;
public TimestampColumnOffsetDateTimeMapper() { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
31 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
32 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
31 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
32 |
public class PersistentFastMoneyMajorAmountAndCurrency extends AbstractMultiColumnUserType<MonetaryAmount> {
private static final long serialVersionUID = -3990523657883978202L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnCurrencyUnitMapper(), new LongLongColumnMapper<Long>() };
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amountMajor" }; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
50 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
50 |
FastMoney money = FastMoney.of(amountPart, currencyUnitPart);
return money;
}
@Override
protected Object[] toConvertedColumns(MonetaryAmount value) {
return new Object[] { value.getCurrency(), value.getNumber().numberValue(BigDecimal.class) };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractDateThreeTenColumnMapper.java |
63 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimestampThreeTenColumnMapper.java |
63 |
return new DstSafeDateType(cal);
}
private Calendar resolveCalendar(ZoneId databaseZone) {
String id = databaseZone.getId();
if (Arrays.binarySearch(TimeZone.getAvailableIDs(), id) != -1) {
return Calendar.getInstance(TimeZone.getTimeZone(id));
} else {
return null;
}
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
79 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
80 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
77 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
28 |
private static ZoneOffset getDefault() {
ZoneOffset zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneOffset.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
53 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
52 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
58 |
String value = s.substring(separator + 1);
return Money.of(Long.parseLong(value), Monetary.getCurrency(currency));
}
@Override
public String toNonNullString(MonetaryAmount value) {
return value.toString();
}
@Override
public void setCurrencyUnit(CurrencyUnit currencyUnit) {
this.currencyUnit = currencyUnit;
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
55 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
55 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
54 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
59 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
53 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
60 |
return FastMoney.of(Long.parseLong(value), Monetary.getCurrency(currency));
}
@Override
public String toNonNullString(MonetaryAmount value) {
return value.toString();
}
@Override
public void setCurrencyUnit(CurrencyUnit currencyUnit) {
this.currencyUnit = currencyUnit;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
50 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
50 |
public LocalDateTime fromNonNullValue(Timestamp value) {
ZoneId currentDatabaseZone = getDatabaseZone() == null ? getDefault() : getDatabaseZone();
Instant instant = Instant.ofEpochMilli(value.getTime());
instant = instant.with(ChronoField.NANO_OF_SECOND, value.getNanos()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractDateThreeTenColumnMapper.java |
66 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimestampThreeTenColumnMapper.java |
66 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimeThreeTenColumnMapper.java |
65 |
private Calendar resolveCalendar(ZoneId databaseZone) {
String id = databaseZone.getId();
if (Arrays.binarySearch(TimeZone.getAvailableIDs(), id) != -1) {
return Calendar.getInstance(TimeZone.getTimeZone(id));
} else {
return null;
}
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
33 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
38 |
return FastMoney.of(val, currencyUnit);
}
@Override
public Long toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
54 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
53 |
return LocalDate.parse(value.toString(), LOCAL_DATE_FORMATTER);
}
ZoneId currentDatabaseZone = getDatabaseZone() == null ? getDefault() : getDatabaseZone();
ZonedDateTime dateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(value.getTime()), currentDatabaseZone); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
41 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
49 |
return MonetaryUtil.majorPart().apply(value).getNumber().longValue();
}
@Override
public Money fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
47 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
47 |
protected FastMoney fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0];
Long amountMinorPart = (Long) convertedColumns[1];
BigDecimal majorVal = BigDecimal.valueOf(amountMinorPart, currencyUnitPart.getDefaultFractionDigits());
return FastMoney.of(majorVal, currencyUnitPart); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
40 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
40 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
39 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
37 |
public BigDecimal toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
}
return value.getNumber().numberValue(BigDecimal.class); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
44 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
41 |
return value.getNumber().numberValue(BigDecimal.class);
}
@Override
public Money fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
40 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
40 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
42 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
42 |
public BigDecimal toNonNullValue(MonetaryAmount value) {
if (!currencyUnit.equals(value.getCurrency())) {
throw new IllegalStateException("Expected currency " + currencyUnit.getCurrencyCode() + " but was " + value.getCurrency());
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
39 |
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amountMajor" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected FastMoney fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0];
Long amountMajorPart = (Long) convertedColumns[1]; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
39 |
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amountMajor" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Money fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0];
Long amountMajorPart = (Long) convertedColumns[1]; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\StringColumnInstantMapper.java |
29 |
org\jadira\usertype\dateandtime\threeten\columnmapper\StringColumnLocalDateTimeMapper.java |
27 |
public static final DateTimeFormatter INSTANT_FORMATTER = new DateTimeFormatterBuilder()
.appendPattern("yyyy-MM-dd'T'HH:mm:ss").appendOptional(new DateTimeFormatterBuilder().appendLiteral('.').appendFraction(ChronoField.NANO_OF_SECOND, 1, 9, false).toFormatter()).appendLiteral('Z').toFormatter(); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
39 |
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amount" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected FastMoney fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0]; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
39 |
private static final String[] PROPERTY_NAMES = new String[]{ "currencyUnit", "amount" };
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Money fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0]; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractDateThreeTenColumnMapper.java |
37 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimestampThreeTenColumnMapper.java |
37 |
public AbstractDateThreeTenColumnMapper(ZoneId databaseZone) {
this.databaseZone = databaseZone;
}
@Override
public void setDatabaseZone(ZoneId databaseZone) {
this.databaseZone = databaseZone;
}
protected ZoneId getDatabaseZone() {
return databaseZone;
}
@Override
public final DstSafeDateType getHibernateType() { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
39 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
42 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
38 |
public static final DateTimeFormatter DATETIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss").appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, false).toFormatter();
private static final int MILLIS_IN_SECOND = 1000;
private ZoneId javaZone = null;
public TimestampColumnOffsetDateTimeMapper() { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
80 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
85 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
78 |
final Timestamp timestamp = new Timestamp((value.toEpochSecond() * MILLIS_IN_SECOND));
timestamp.setNanos(value.getNano());
return timestamp;
}
@Override
public void setJavaZone(ZoneId javaZone) {
this.javaZone = javaZone;
}
@Override
public ZoneId parseZone(String zoneString) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
102 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
103 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
93 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
90 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
101 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
65 |
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z"); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
48 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
48 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
47 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
52 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
53 |
public FastMoney fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1);
return FastMoney.of(Long.parseLong(value), Monetary.getCurrency(currency)); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
31 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
31 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
31 |
public class PersistentOffsetTimeAsLongAndStringOffset extends AbstractMultiColumnUserType<OffsetTime> {
private static final long serialVersionUID = 1364221029392346011L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new LongColumnLocalTimeMapper(), new StringColumnZoneOffsetMapper() }; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
48 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
47 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
52 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
45 |
public FastMoney fromNonNullString(String s) {
int separator = s.indexOf(' ');
String currency = s.substring(0, separator);
String value = s.substring(separator + 1); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\StringColumnLocalDateTimeMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
31 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
34 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
34 |
public static final DateTimeFormatter DATETIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd'T'HH:mm:ss").appendOptional(new DateTimeFormatterBuilder().appendLiteral('.').appendFraction(ChronoField.NANO_OF_SECOND, 1, 9, false).toFormatter()).toFormatter(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
30 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
29 |
public class DateColumnLocalDateMapper extends AbstractDateThreeTenColumnMapper<LocalDate> implements DatabaseZoneConfigured<ZoneId> {
private static final long serialVersionUID = 6734385103313158326L;
public static final DateTimeFormatter LOCAL_DATE_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd").toFormatter();
// private static final int MILLIS_IN_SECOND = 1000;
public DateColumnLocalDateMapper() { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
40 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
40 |
public DateColumnMonthDayMapper(ZoneId databaseZone) {
super(databaseZone);
}
@Override
public MonthDay fromNonNullString(String s) {
return MonthDay.parse(s);
}
@Override
public MonthDay fromNonNullValue(Date value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
60 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
59 |
public OffsetDateTime fromNonNullValue(Timestamp value) {
ZoneId currentDatabaseZone = getDatabaseZone() == null ? getDefaultZoneId() : getDatabaseZone();
ZoneId currentJavaZone = javaZone == null ? getDefaultZoneId() : javaZone; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
44 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
45 |
return OffsetDateTime.of(datePart, offset);
}
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Object[] toConvertedColumns(OffsetDateTime value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
68 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
64 |
OffsetDateTime dateTime = OffsetDateTime.ofInstant(Instant.ofEpochMilli(value.getTime()), currentDatabaseZone);
dateTime = dateTime.with(ChronoField.NANO_OF_SECOND, value.getNanos()).atZoneSameInstant(currentJavaZone).toOffsetDateTime(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
30 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
31 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
31 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
31 |
public class PersistentOffsetDateTimeAsStringAndStringOffset extends AbstractMultiColumnUserType<OffsetDateTime> {
private static final long serialVersionUID = 1364221029392346011L;
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnLocalDateTimeMapper(), new StringColumnZoneOffsetMapper() }; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\StringColumnInstantMapper.java |
30 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
31 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
34 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
34 |
.appendPattern("yyyy-MM-dd'T'HH:mm:ss").appendOptional(new DateTimeFormatterBuilder().appendLiteral('.').appendFraction(ChronoField.NANO_OF_SECOND, 1, 9, false).toFormatter()).appendLiteral('Z').toFormatter(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractDateThreeTenColumnMapper.java |
55 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimestampThreeTenColumnMapper.java |
55 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimeThreeTenColumnMapper.java |
54 |
return DstSafeDateType.INSTANCE;
}
Calendar cal = resolveCalendar(databaseZone);
if (cal == null) {
throw new IllegalStateException("Could not map Zone " + databaseZone + " to Calendar");
}
return new DstSafeDateType(cal); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
46 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
54 |
this.javaZone = javaZone;
}
@Override
public OffsetTime fromNonNullString(String s) {
return OffsetTime.parse(s);
}
@Override
public OffsetTime fromNonNullValue(Time value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
49 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
54 |
Instant instant = Instant.ofEpochMilli(value.getTime());
instant = instant.with(ChronoField.NANO_OF_SECOND, value.getNanos());
return instant; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentInstantAsMillisLong.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentInstantAsNanosBigInteger.java |
34 |
org\jadira\usertype\dateandtime\threeten\PersistentInstantAsTimestamp.java |
38 |
@Override
public int compare(Object o1, Object o2) {
return ((Instant) o1).compareTo((Instant) o2);
}
} |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
50 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
49 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
50 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
49 |
FastMoney money = FastMoney.of(amountPart, currencyUnitPart);
return money;
}
@Override
protected Object[] toConvertedColumns(MonetaryAmount value) {
return new Object[] { value.getCurrency(), value.getNumber().numberValue(BigDecimal.class) }; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigDecimalColumnDurationMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnDurationMapper.java |
27 |
private static final BigDecimal NANOS_IN_SECOND = BigDecimal.valueOf(1_000_000_000L);
@Override
public Duration fromNonNullString(String s) {
return Duration.parse(s);
}
@Override
public Duration fromNonNullValue(BigDecimal value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
49 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
54 |
Instant instant = Instant.ofEpochMilli(value.getTime());
instant = instant.with(ChronoField.NANO_OF_SECOND, value.getNanos()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
34 |
org\jadira\usertype\dateandtime\threeten\PersistentZonedDateTimeAsStringAndStringZone.java |
34 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnLocalDateTimeMapper(), new StringColumnZoneOffsetMapper() }; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
36 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnCurrencyUnitMapper(), new BigDecimalBigDecimalColumnMapper() }; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
110 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
91 |
public void setJavaZone(ZoneOffset javaZone) {
this.javaZone = javaZone;
}
@Override
public ZoneOffset parseZone(String zoneString) {
return ZoneOffset.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\integrator\UserTypeThreeTenHibernateIntegrator.java |
82 |
org\jadira\usertype\moneyandcurrency\moneta\integrator\UserTypeMonetaMoneyHibernateIntegrator.java |
60 |
private static final CompositeUserType[] COMPOSITE_USER_TYPES = new CompositeUserType[]{};
/**
* {@inheritDoc}
*/
@Override
protected CompositeUserType[] getCompositeUserTypes() {
return COMPOSITE_USER_TYPES;
}
/**
* {@inheritDoc}
*/
@Override
protected UserType[] getUserTypes() {
return userTypes;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
44 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentZonedDateTimeAsStringAndStringZone.java |
44 |
return OffsetDateTime.of(datePart, offset);
}
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Object[] toConvertedColumns(OffsetDateTime value) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
27 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
28 |
public class LongColumnFastMoneyMajorMapper extends AbstractLongColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public FastMoney fromNonNullValue(Long val) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
25 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
28 |
public class LongColumnMoneyMajorMapper extends AbstractLongColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public Money fromNonNullValue(Long val) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
46 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
46 |
protected FastMoney fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0];
BigDecimal amountPart = (BigDecimal) convertedColumns[1]; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
45 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
45 |
protected FastMoney fromConvertedColumns(Object[] convertedColumns) {
CurrencyUnit currencyUnitPart = (CurrencyUnit) convertedColumns[0];
Long amountMajorPart = (Long) convertedColumns[1]; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
72 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
75 |
1970, 1, 1, value.getHour(), value.getMinute(), value.getSecond(), value.getNano()
).atOffset(currentDatabaseZone); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
96 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
97 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
87 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
84 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
95 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
35 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
59 |
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
96 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
102 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
97 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
103 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
95 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
101 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
59 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
65 |
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
87 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
93 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
84 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
90 |
zone = ZoneOffset.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigDecimalColumnDurationMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnDurationMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnDurationMapper.java |
29 |
private static final BigDecimal NANOS_IN_SECOND = BigDecimal.valueOf(1_000_000_000L);
@Override
public Duration fromNonNullString(String s) {
return Duration.parse(s);
}
@Override
public Duration fromNonNullValue(BigDecimal value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
91 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
81 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
82 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
79 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
90 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
81 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
30 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
54 |
ZoneId zone = null;
try {
try {
String id = System.getProperty("user.timezone");
if (id != null) {
zone = ZoneId.of(id); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
43 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
48 |
}
@Override
public LocalTime fromNonNullString(String s) {
return LocalTime.parse(s);
}
@Override
public LocalTime fromNonNullValue(Time value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigDecimalColumnDurationMapper.java |
29 |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnDurationMapper.java |
29 |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnDurationMapper.java |
26 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnDurationMapper.java |
31 |
@Override
public Duration fromNonNullString(String s) {
return Duration.parse(s);
}
@Override
public Duration fromNonNullValue(BigDecimal value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigDecimalColumnDurationMapper.java |
45 |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnDurationMapper.java |
36 |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnDurationMapper.java |
33 |
return Duration.parse(durationPattern.toString());
}
@Override
public String toNonNullString(Duration value) {
return value.toString();
}
@Override
public BigDecimal toNonNullValue(Duration value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnInstantMapper.java |
31 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnInstantMapper.java |
26 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
41 |
@Override
public Instant fromNonNullString(String s) {
return Instant.parse(s);
}
@Override
public Instant fromNonNullValue(BigInteger value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnLocalTimeMapper.java |
26 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnLocalTimeMapper.java |
26 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
45 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
50 |
@Override
public LocalTime fromNonNullString(String s) {
return LocalTime.parse(s);
}
@Override
public LocalTime fromNonNullValue(Integer value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
87 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
84 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
41 |
zone = ZoneOffset.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
93 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
90 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
35 |
zone = ZoneOffset.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneOffset.of("Z"); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
35 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
37 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
34 |
public class TimestampColumnOffsetDateTimeMapper extends AbstractTimestampThreeTenColumnMapper<OffsetDateTime> implements DatabaseZoneConfigured<ZoneId>, JavaZoneConfigured<ZoneId> {
private static final long serialVersionUID = -7670411089210984705L;
public static final DateTimeFormatter DATETIME_FORMATTER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss").appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, false).toFormatter(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
63 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
66 |
ZoneId currentJavaZone = javaZone == null ? getDefaultZoneId() : javaZone;
OffsetDateTime dateTime = OffsetDateTime.ofInstant(Instant.ofEpochMilli(value.getTime()), currentDatabaseZone); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
34 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
36 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
36 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnLocalDateTimeMapper(), new StringColumnZoneOffsetMapper() }; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
56 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
57 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
57 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
55 |
return new Object[] { value.toLocalDateTime(), value.getOffset() };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentZonedDateTimeAsStringAndStringZone.java |
34 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new LongColumnLocalTimeMapper(), new StringColumnZoneOffsetMapper() }; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigDecimalColumnDurationMapper.java |
45 |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnDurationMapper.java |
36 |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnDurationMapper.java |
33 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnDurationMapper.java |
38 |
return Duration.parse(durationPattern.toString());
}
@Override
public String toNonNullString(Duration value) {
return value.toString();
}
@Override
public BigDecimal toNonNullValue(Duration value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnInstantMapper.java |
41 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnInstantMapper.java |
33 |
return result.plusNanos(milliAndNanoPart[1].longValue());
}
@Override
public String toNonNullString(Instant value) {
return value.toString();
}
@Override
public BigInteger toNonNullValue(Instant value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
71 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
70 |
public Date toNonNullValue(LocalDate value) {
if (getDatabaseZone() == null) {
return Date.valueOf(LOCAL_DATE_FORMATTER.format((LocalDate) value)); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
96 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
97 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
93 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
90 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
95 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
41 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
59 |
zone = ZoneId.of(id);
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of(java.util.TimeZone.getDefault().getID()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
102 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
103 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
86 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
87 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
84 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
101 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
92 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
35 |
org\jadira\usertype\dateandtime\threeten\utils\ZoneHelper.java |
65 |
zone = ZoneId.of(java.util.TimeZone.getDefault().getID());
}
} catch (RuntimeException ex) {
zone = null;
}
if (zone == null) {
zone = ZoneId.of("Z"); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnLocalTimeMapper.java |
34 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnLocalTimeMapper.java |
33 |
return LocalTime.ofNanoOfDay(nanos);
}
@Override
public String toNonNullString(LocalTime value) {
return value.toString();
}
@Override
public Integer toNonNullValue(LocalTime value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
70 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
73 |
ZonedDateTime zdt = value.atZone(currentDatabaseZone);
final Timestamp timestamp = new Timestamp(zdt.toInstant().toEpochMilli()); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
45 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
46 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
46 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
46 |
org\jadira\usertype\dateandtime\threeten\PersistentZonedDateTimeAsStringAndStringZone.java |
45 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyAmountAndCurrency.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
39 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyAmountAndCurrency.java |
38 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
37 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
39 |
}
@Override
protected ColumnMapper<?, ?>[] getColumnMappers() {
return COLUMN_MAPPERS;
}
@Override
protected Object[] toConvertedColumns(OffsetDateTime value) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
28 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
27 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
28 |
public class BigDecimalColumnFastMoneyMapper extends AbstractBigDecimalColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public FastMoney fromNonNullValue(BigDecimal val) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
28 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
25 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
28 |
public class BigDecimalColumnMoneyMapper extends AbstractBigDecimalColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public Money fromNonNullValue(BigDecimal val) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
35 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
36 |
public FastMoney fromNonNullValue(Long val) {
BigDecimal minorVal = BigDecimal.valueOf(val, currencyUnit.getDefaultFractionDigits());
return FastMoney.of(minorVal, currencyUnit); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractDateThreeTenColumnMapper.java |
27 |
org\jadira\usertype\dateandtime\threeten\columnmapper\AbstractTimestampThreeTenColumnMapper.java |
28 |
public abstract class AbstractDateThreeTenColumnMapper<T> extends AbstractDateColumnMapper<T> implements DatabaseZoneConfigured<ZoneId> {
private static final long serialVersionUID = -7670411089210984705L;
/* Explicitly set this to null for preferred default behaviour. See https://jadira.atlassian.net/browse/JDF-26 */
private ZoneId databaseZone = null; |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\BigIntegerColumnInstantMapper.java |
42 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnInstantMapper.java |
34 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
53 |
}
@Override
public String toNonNullString(Instant value) {
return value.toString();
}
@Override
public BigInteger toNonNullValue(Instant value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
62 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
59 |
}
@Override
public String toNonNullString(MonthDay value) {
return value.toString();
}
@Override
public Date toNonNullValue(MonthDay value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\IntegerColumnLocalTimeMapper.java |
35 |
org\jadira\usertype\dateandtime\threeten\columnmapper\LongColumnLocalTimeMapper.java |
34 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
59 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
63 |
}
@Override
public String toNonNullString(LocalTime value) {
return value.toString();
}
@Override
public Integer toNonNullValue(LocalTime value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
63 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
73 |
}
@Override
public String toNonNullString(OffsetTime value) {
return value.toString();
}
@Override
public Time toNonNullValue(OffsetTime value) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
37 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
41 |
public static final DateTimeFormatter LOCAL_DATETIME_PRINTER = new DateTimeFormatterBuilder().appendPattern("0001-01-01 HH:mm:ss").appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).toFormatter(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
38 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
39 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
42 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
38 |
public static final DateTimeFormatter LOCAL_DATETIME_PARSER = new DateTimeFormatterBuilder().appendPattern("yyyy-MM-dd HH:mm:ss").appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).toFormatter(); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
49 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
48 |
public TimestampColumnOffsetDateTimeMapper(ZoneId databaseZone, ZoneId javaZone) {
super(databaseZone);
this.javaZone = javaZone;
}
@Override
public OffsetDateTime fromNonNullString(String s) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetDateTimeAsStringAndStringOffset.java |
34 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsLongAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsStringAndStringOffset.java |
35 |
org\jadira\usertype\dateandtime\threeten\PersistentOffsetTimeAsTimeAndStringOffset.java |
35 |
private static final ColumnMapper<?, ?>[] COLUMN_MAPPERS = new ColumnMapper<?, ?>[] { new StringColumnLocalDateTimeMapper(), new StringColumnZoneOffsetMapper() };
private static final String[] PROPERTY_NAMES = new String[]{ "datetime", "offset" }; |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnFastMoneyMapper.java |
28 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\BigDecimalColumnMoneyMapper.java |
28 |
public class BigDecimalColumnFastMoneyMapper extends AbstractBigDecimalColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public FastMoney fromNonNullValue(BigDecimal val) { |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMajorMapper.java |
27 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnFastMoneyMinorMapper.java |
28 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMajorMapper.java |
25 |
org\jadira\usertype\moneyandcurrency\moneta\columnmapper\LongColumnMoneyMinorMapper.java |
28 |
public class LongColumnFastMoneyMajorMapper extends AbstractLongColumnMapper<MonetaryAmount> implements CurrencyUnitConfigured {
private static final long serialVersionUID = 4205713919952452881L;
private CurrencyUnit currencyUnit;
@Override
public FastMoney fromNonNullValue(Long val) { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
59 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
58 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
64 |
ZonedDateTime dateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(value.getTime()), currentDatabaseZone); |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnLocalDateMapper.java |
111 |
org\jadira\usertype\dateandtime\threeten\columnmapper\DateColumnMonthDayMapper.java |
112 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnInstantMapper.java |
66 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
110 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnMonthDayMapper.java |
101 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
88 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnZonedDateTimeMapper.java |
86 |
}
@Override
public ZoneId parseZone(String zoneString) {
return ZoneId.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnLocalTimeMapper.java |
106 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimeColumnOffsetTimeMapper.java |
112 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
99 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
93 |
}
@Override
public ZoneOffset parseZone(String zoneString) {
return ZoneOffset.of(zoneString);
}
} |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalDateTimeMapper.java |
72 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnLocalTimeMapper.java |
82 |
final Timestamp timestamp = new Timestamp(zdt.toInstant().toEpochMilli());
timestamp.setNanos(value.getNano());
return timestamp;
}
private static ZoneOffset getDefault() { |
File |
Line |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetDateTimeMapper.java |
66 |
org\jadira\usertype\dateandtime\threeten\columnmapper\TimestampColumnOffsetTimeMapper.java |
69 |
ZonedDateTime zonedDateTime = dateTime.with(ChronoField.NANO_OF_SECOND, value.getNanos()).atZoneSameInstant(currentJavaZone); |
File |
Line |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMajorAmountAndCurrency.java |
57 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentFastMoneyMinorAmountAndCurrency.java |
63 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMajorAmountAndCurrency.java |
57 |
org\jadira\usertype\moneyandcurrency\moneta\PersistentMoneyMinorAmountAndCurrency.java |
63 |
return new Object[] { value.getCurrency(), MonetaryUtil.majorPart().apply(value).getNumber().longValue() };
}
@Override
public String[] getPropertyNames() {
return PROPERTY_NAMES;
}
} |