Class EntityTranslator (2.0.0)

public class EntityTranslator

EntityTranslator contains the logic to translate an Entity into the protocol buffers that are used to pass it to the implementation of the API.

Inheritance

java.lang.Object > EntityTranslator

Static Methods

convertToPb(Entity entity)

public static OnestoreEntity.EntityProto convertToPb(Entity entity)
Parameter
NameDescription
entityEntity
Returns
TypeDescription
com.google.storage.onestore.v3.OnestoreEntity.EntityProto

createFromPb(OnestoreEntity.EntityProto proto)

public static Entity createFromPb(OnestoreEntity.EntityProto proto)
Parameter
NameDescription
protocom.google.storage.onestore.v3.OnestoreEntity.EntityProto
Returns
TypeDescription
Entity

createFromPb(OnestoreEntity.EntityProto proto, Collection<Projection> projections)

public static Entity createFromPb(OnestoreEntity.EntityProto proto, Collection<Projection> projections)
Parameters
NameDescription
protocom.google.storage.onestore.v3.OnestoreEntity.EntityProto
projectionsCollection<Projection>
Returns
TypeDescription
Entity

createFromPbBytes(byte[] pbBytes)

public static Entity createFromPbBytes(byte[] pbBytes)
Parameter
NameDescription
pbBytesbyte[]
Returns
TypeDescription
Entity