public void serialize(Date object, byte[] stream, int startPosition, Object... hints) { Calendar calendar = Calendar.getInstance(); calendar.setTime(object); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); ODateTimeSerializer dateTimeSerializer = ODateTimeSerializer.INSTANCE; dateTimeSerializer.serialize(calendar.getTime(), stream, startPosition); }
/** {@inheritDoc} */ @Override public void serializeInByteBufferObject(Date object, ByteBuffer buffer, Object... hints) { final Calendar calendar = Calendar.getInstance(); calendar.setTime(object); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); final ODateTimeSerializer dateTimeSerializer = ODateTimeSerializer.INSTANCE; dateTimeSerializer.serializeInByteBufferObject(calendar.getTime(), buffer); }
public Date deserializeNativeObject(byte[] stream, int startPosition) { ODateTimeSerializer dateTimeSerializer = ODateTimeSerializer.INSTANCE; return dateTimeSerializer.deserializeNativeObject(stream, startPosition); }
/** {@inheritDoc} */ @Override public Date deserializeFromByteBufferObject( ByteBuffer buffer, OWALChanges walChanges, int offset) { final ODateTimeSerializer dateTimeSerializer = ODateTimeSerializer.INSTANCE; return dateTimeSerializer.deserializeFromByteBufferObject(buffer, walChanges, offset); }
/** {@inheritDoc} */ @Override public Date deserializeFromByteBufferObject(ByteBuffer buffer) { final ODateTimeSerializer dateTimeSerializer = ODateTimeSerializer.INSTANCE; return dateTimeSerializer.deserializeFromByteBufferObject(buffer); }