Examples of mergeFrom()


Examples of com.google.protobuf.Message.Builder.mergeFrom()

          // To read the varint, I need an inputstream; might as well be a CIS.
          cis = CodedInputStream.newInstance(buf, offset, buf.length);
          int paramSize = cis.readRawVarint32();
          offset += cis.getTotalBytesRead();
          if (builder != null) {
            param = builder.mergeFrom(buf, offset, paramSize).build();
          }
          offset += paramSize;
        }
        if (header.hasCellBlockMeta()) {
          cellScanner = ipcUtil.createCellScanner(this.codec, this.compressionCodec,
View Full Code Here

Examples of com.google.protobuf.Message.Builder.mergeFrom()

          // To read the varint, I need an inputstream; might as well be a CIS.
          cis = CodedInputStream.newInstance(buf, offset, buf.length);
          int paramSize = cis.readRawVarint32();
          offset += cis.getTotalBytesRead();
          if (builder != null) {
            param = builder.mergeFrom(buf, offset, paramSize).build();
          }
          offset += paramSize;
        }
        if (header.hasCellBlockMeta()) {
          cellScanner = ipcUtil.createCellScanner(this.codec, this.compressionCodec,
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

        if (bytes == null) {
            throw new NullPointerException(
                "The bytes parameter must not be null.");
        }
        EntityProto pb = new EntityProto();
        pb.mergeFrom(bytes);
        return EntityTranslator.createFromPb(pb);
    }

    /**
     * Converts the reference to a key.
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

        if (bytes == null) {
            throw new NullPointerException(
                "The bytes parameter must not be null.");
        }
        EntityProto pb = new EntityProto();
        pb.mergeFrom(bytes);
        return EntityTranslator.createFromPb(pb);
    }

    /**
     * Converts the reference to a key.
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

                (List<Key>) entity.getProperty(DELETE_LIST_PROPERTY);
            List<Entity> putEntities = new ArrayList<Entity>();
            if (putList != null) {
                for (Blob blob : putList) {
                    EntityProto proto = putReq.addEntity();
                    proto.mergeFrom(blob.getBytes());
                    putEntities.add(EntityTranslator.createFromPb(proto));
                }
            }
            if (putEntities.size() > 0) {
                DatastoreUtil.put(ds, null, putEntities);
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

    }

    @Override
    public EmbeddedEntity getValue(PropertyValue propertyValue) {
      EntityProto proto = new EntityProto();
      proto.mergeFrom(propertyValue.getStringValueAsBytes());
      EmbeddedEntity result = new EmbeddedEntity();
      if (proto.hasKey() && !proto.getKey().getApp().isEmpty()) {
        result.setKey(KeyTranslator.createFromPb(proto.getKey()));
      }
      extractPropertiesFromPb(proto, result.getPropertyMap());
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

    return entity;
  }

  public static Entity createFromPbBytes(byte[] pbBytes) {
    EntityProto proto = new EntityProto();
    proto.mergeFrom(pbBytes);
    return createFromPb(proto);
  }

  public static EntityProto convertToPb(Entity entity) {
    Reference reference = KeyTranslator.convertToPb(entity.getKey());
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

    }

    @Override
    public EmbeddedEntity getPropertyValue(PropertyValue propertyValue) {
      EntityProto proto = new EntityProto();
      proto.mergeFrom(propertyValue.getStringValueAsBytes());
      EmbeddedEntity result = new EmbeddedEntity();
      if (proto.hasKey() && !proto.getKey().getApp().isEmpty()) {
        result.setKey(KeyTranslator.createFromPb(proto.getKey()));
      }
      extractPropertiesFromPb(proto, result.getPropertyMap());
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

  public static Entity read(DataInputStream stream) throws IOException {
    int readInt = stream.readInt();
    byte[] arr = new byte[readInt];
    stream.readFully(arr);
    EntityProto pr = new EntityProto();
    pr.mergeFrom(arr);
    return EntityTranslator.createFromPb(pr);
  }
 
  public void toXML(Entity e){
   
View Full Code Here

Examples of com.google.storage.onestore.v3.OnestoreEntity.EntityProto.mergeFrom()

  public static Entity read(DataInputStream stream) throws IOException {
    int readInt = stream.readInt();
    byte[] arr = new byte[readInt];
    stream.readFully(arr);
    EntityProto pr = new EntityProto();
    pr.mergeFrom(arr);
    return EntityTranslator.createFromPb(pr);
  }
 
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.