public static Document marshalRow(Row row){
  if (row == null) {
    return null;
  }
  Document d=new Document();
  d.setUuid(row.getUUID(DocumentRepositoryImpl.Columns.ID));
  ByteBuffer b=row.getBytes(DocumentRepositoryImpl.Columns.OBJECT);
  if (b != null && b.hasArray()) {
    byte[] result=new byte[b.remaining()];
    b.get(result);
    BSONObject o=BSON.decode(result);
    d.setObject(o);
  }
  d.setCreatedAt(row.getDate(DocumentRepositoryImpl.Columns.CREATED_AT));
  d.setUpdatedAt(row.getDate(DocumentRepositoryImpl.Columns.UPDATED_AT));
  return d;
}

public static Document marshalRow ( Row row ) { if ( row == null ) { return null ; } Document d = new Document ( ) ; d . setUuid ( row . getUUID ( DocumentRepositoryImpl . Columns . ID ) ) ; ByteBuffer b = row . getBytes ( DocumentRepositoryImpl . Columns . OBJECT ) ; if ( b != null && b . hasArray ( ) ) { byte [ ] result = new byte [ b . remaining ( ) ] ; b . get ( result ) ; BSONObject o = BSON . decode ( result ) ; d . setObject ( o ) ; } d . setCreatedAt ( row . getDate ( DocumentRepositoryImpl . Columns . CREATED_AT ) ) ; d . setUpdatedAt ( row . getDate ( DocumentRepositoryImpl . Columns . UPDATED_AT ) ) ; return d ; }
marshals a cassandra row into a document object .
