public interface PropertyIdCollector
Interface to
collect the property to ID mapping.- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ReadableProperty<?> property) Adds the property as a dynamic mapping with an ID auto-assigned.voidadd(ReadableProperty<?> property, int id) voidaddOffset(int offset)
-
Method Details
-
add
- Parameters:
property- thepropertyto map.id- the explicit ID of the property to map. Please try to use stable but also smaller numbers. In case of ProtoBuf (GRPC) numbers from1to15will only take one byte. Otherwise, if smaller than2048it will take two bytes.
-
add
Adds the property as a dynamic mapping with an ID auto-assigned.- Parameters:
property- thepropertyto map.
-
addOffset
void addOffset(int offset) - Parameters:
offset- the number of IDs to reserve forauto-assignment. Intended to avoid ID collisions when properties are later added to polymorphic bean type hierarchies.
-