@SuppressWarnings("deprecation") @Override public void readFields(DataInput in) throws IOException { if (in.readBoolean()) { modify(in.readLong()); } else { setNull(); } }
@SuppressWarnings("deprecation") @Override public int restore(byte[] bytes, int offset, int limit) throws IOException { if (limit - offset == 0) { throw new IOException(MessageFormat.format( "Cannot restore a DateTime field ({0})", "invalid length")); } if (bytes[offset + 0] == 0) { setNull(); return 1; } else if (limit - offset >= 8 + 1) { modify(ByteArrayUtil.readLong(bytes, offset + 1)); return 8 + 1; } else { throw new IOException(MessageFormat.format( "Cannot restore a DateTime field ({0})", "invalid length")); } }
@Override @SuppressWarnings("deprecation") public void reset() { this.fileName.setNull(); this.salesDateTime.setNull(); this.storeCode.setNull(); this.itemCode.setNull(); this.message.setNull(); } @Override
@Override @SuppressWarnings("deprecation") public void reset() { this.salesDateTime.setNull(); this.storeCode.setNull(); this.itemCode.setNull(); this.amount.setNull(); this.unitSellingPrice.setNull(); this.sellingPrice.setNull(); this.fileName.setNull(); } @Override
@SuppressWarnings("deprecation") private void fill0(DateTimeOption option, boolean doRecover) throws CsvFormatException { if (lineBuffer.hasRemaining()) { long value = dateTimeFormat.parse(lineBuffer); if (value < 0) { if (doRecover && trimWhitespaces()) { fill0(option, false); return; } throw new CsvFormatException( createStatusInLine(Reason.INVALID_CELL_FORMAT, dateTimeFormat.getPattern()), null); } option.modify(value); } else { option.setNull(); } }
option.setNull(); } else { long result = DateUtil.getDayFromDate(year, month, day);
emitter.endRecord(); value.setNull(); emitter.emit(value); value.modify(time(1, 1, 1, 0, 0, 0));