Package cz.o2.proxima.scheme.proto
Class ProtoMessageValueAccessor<T extends com.google.protobuf.Message>
- java.lang.Object
-
- cz.o2.proxima.scheme.proto.ProtoMessageValueAccessor<T>
-
- Type Parameters:
T
- Protobuf message type
- All Implemented Interfaces:
AttributeValueAccessor<T,AttributeValueAccessors.StructureValue>
,AttributeValueAccessors.StructureValueAccessor<T>
,java.io.Serializable
public class ProtoMessageValueAccessor<T extends com.google.protobuf.Message> extends java.lang.Object implements AttributeValueAccessors.StructureValueAccessor<T>
Implementation ofAttributeValueAccessors.StructureValueAccessor
for ProtoBufsWrapper types are mapped to scalar equivalents as we can manage null values. See
createFieldAccessor(FieldDescriptor, Builder)
for details.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.core.scheme.AttributeValueAccessor
AttributeValueAccessor.Type
-
-
Constructor Summary
Constructors Constructor Description ProtoMessageValueAccessor(Factory<T> defaultValueFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
createFrom(AttributeValueAccessors.StructureValue input)
Create value from input object.AttributeValueAccessors.StructureValue
valueOf(T object)
Get value of attribute.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.core.scheme.AttributeValueAccessors.StructureValueAccessor
getType
-
-
-
-
Method Detail
-
valueOf
public AttributeValueAccessors.StructureValue valueOf(T object)
Description copied from interface:AttributeValueAccessor
Get value of attribute.- Specified by:
valueOf
in interfaceAttributeValueAccessor<T extends com.google.protobuf.Message,AttributeValueAccessors.StructureValue>
- Parameters:
object
- input object- Returns:
- specific value of attribute
-
createFrom
public T createFrom(AttributeValueAccessors.StructureValue input)
Description copied from interface:AttributeValueAccessor
Create value from input object.- Specified by:
createFrom
in interfaceAttributeValueAccessor<T extends com.google.protobuf.Message,AttributeValueAccessors.StructureValue>
- Parameters:
input
- input object- Returns:
- attribute value
-
-