Interface PropertyIdCollector


public interface PropertyIdCollector
Since:
1.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(ReadableProperty<?> property)
    Adds the property as a dynamic mapping with an ID auto-assigned.
    void
    add(ReadableProperty<?> property, int id)
     
    void
    addOffset(int offset)
     
  • Method Details

    • add

      void add(ReadableProperty<?> property, int id)
      Parameters:
      property - the property to 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 from 1 to 15 will only take one byte. Otherwise, if smaller than 2048 it will take two bytes.
    • add

      void add(ReadableProperty<?> property)
      Adds the property as a dynamic mapping with an ID auto-assigned.
      Parameters:
      property - the property to map.
    • addOffset

      void addOffset(int offset)
      Parameters:
      offset - the number of IDs to reserve for auto-assignment. Intended to avoid ID collisions when properties are later added to polymorphic bean type hierarchies.