예제 #1
0
 @Override
 public final void addBinary(Binary value) {
   try {
     ProtobufDatumFactory factory = ProtobufDatumFactory.get(dataType.getCode());
     Message.Builder builder = factory.newBuilder();
     builder.mergeFrom(value.getBytes());
     parent.add(factory.createDatum(builder));
   } catch (InvalidProtocolBufferException e) {
     throw new RuntimeException(e);
   }
 }
예제 #2
0
 @Override
 public final void addBinary(Binary value) {
   parent.add(new BlobDatum(ByteBuffer.wrap(value.getBytes())));
 }
예제 #3
0
 @Override
 public final void addDouble(double value) {
   parent.add(DatumFactory.createFloat8(value));
 }
예제 #4
0
 @Override
 public final void addBinary(Binary value) {
   parent.add(DatumFactory.createText(value.getBytes()));
 }
예제 #5
0
 @Override
 public final void addLong(long value) {
   parent.add(DatumFactory.createFloat4(Float.valueOf(value)));
 }
예제 #6
0
 @Override
 public final void addFloat(float value) {
   parent.add(DatumFactory.createFloat8(Double.valueOf(value)));
 }
예제 #7
0
 @Override
 public final void addInt(int value) {
   parent.add(DatumFactory.createInt8(Long.valueOf(value)));
 }
예제 #8
0
 @Override
 public final void addLong(long value) {
   parent.add(DatumFactory.createInt8(value));
 }
예제 #9
0
 @Override
 public final void addInt(int value) {
   parent.add(DatumFactory.createInt2((short) value));
 }
예제 #10
0
 @Override
 public final void addInt(int value) {
   parent.add(DatumFactory.createBit((byte) (value & 0xff)));
 }
예제 #11
0
 @Override
 public final void addBoolean(boolean value) {
   parent.add(DatumFactory.createBool(value));
 }