document.field("character", 'C');
document.field("alive", true);
document.field("dateTime", new Date());
document.field("bigNumber", new BigDecimal("43989872423376487952454365232141525434.32146432321442534"));
ORidBag bag = new ORidBag();
bag.add(new ORecordId(1, new OClusterPositionLong(1)));
bag.add(new ORecordId(2, new OClusterPositionLong(2)));
// document.field("ridBag", bag);
Calendar c = Calendar.getInstance();
document.field("date", c.getTime(), OType.DATE);
Calendar c1 = Calendar.getInstance();
c1.set(Calendar.MILLISECOND, 0);
c1.set(Calendar.SECOND, 0);
c1.set(Calendar.MINUTE, 0);
c1.set(Calendar.HOUR_OF_DAY, 0);
document.field("date1", c1.getTime(), OType.DATE);
byte[] byteValue = new byte[10];
Arrays.fill(byteValue, (byte) 10);
document.field("bytes", byteValue);
document.field("utf8String", new String("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C"));
document.field("recordId", new ORecordId(10, new OClusterPositionLong(10)));
byte[] res = serializer.toStream(document, false);
ODocument extr = (ODocument) serializer.fromStream(res, new ODocument(), new String[] {});
c.set(Calendar.MILLISECOND, 0);