Interface IRecordValueDescriptorBuilder

    • Method Detail

      • optionalDefaultProperty

        default IRecordValueDescriptorBuilder optionalDefaultProperty​(String key,
                                                                      IValueDescriptor<?,​?> descriptor)
        Adds an optional property to the record value. An optional property may or may not be present. It is usually recommended to use requiredProperty(String, IValueDescriptor) with a suitable default.

        When no value is provided for the record, a record with the default values for each property is created. Use this method when you want to include the optional property in that default value.

        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        descriptor - Descriptor for the property value.
        Returns:
        This builder for chaining method calls.
      • optionalDefaultProperty

        IRecordValueDescriptorBuilder optionalDefaultProperty​(String key,
                                                              IValueDescriptorCreator creator)
        Adds an optional property to the record value. An optional property may or may not be present. It is usually recommended to use requiredProperty(String, IValueDescriptor) with a suitable default.

        When no value is provided for the record, a record with the default values for each property is created. Use this method when you want to include the optional property in that default value.

        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        creator - Method that is given a IValueDescriptorFactory and return the descriptor for the property value.
        Returns:
        This builder for chaining method calls.
      • optionalProperty

        default IRecordValueDescriptorBuilder optionalProperty​(String key,
                                                               IValueDescriptor<?,​?> descriptor)
        Adds an optional property to the record value. An optional property may or may not be present. It is usually recommended to use requiredProperty(String, IValueDescriptor) with a suitable default.

        When no value is provided for the record, a record with the default values for each property is created. Use this method when you want to omit the optional property from that default value.

        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        descriptor - Descriptor for the property value.
        Returns:
        This builder for chaining method calls.
      • optionalProperty

        IRecordValueDescriptorBuilder optionalProperty​(String key,
                                                       IValueDescriptorCreator creator)
        Adds an optional property to the record value. An optional property may or may not be present. It is usually recommended to use requiredProperty(String, IValueDescriptor) with a suitable default.

        When no value is provided for the record, a record with the default values for each property is created. Use this method when you want to omit the optional property from that default value.

        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        creator - Method that is given a IValueDescriptorFactory and return the descriptor for the property value.
        Returns:
        This builder for chaining method calls.
      • requiredProperty

        default IRecordValueDescriptorBuilder requiredProperty​(String key,
                                                               IValueDescriptor<?,​?> descriptor)
        Adds required property to the record value. A required must always be present. When no explicit value is provided, the default value of the value descriptor is used instead.
        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        descriptor - Descriptor for the property value.
        Returns:
        This builder for chaining method calls.
      • requiredProperty

        IRecordValueDescriptorBuilder requiredProperty​(String key,
                                                       IValueDescriptorCreator creator)
        Adds required property to the record value. A required must always be present. When no explicit value is provided, the default value of the value descriptor is used instead.
        Parameters:
        key - Name of the property in the record. This is the name that can be used to access the value.
        creator - Method that is given a IValueDescriptorFactory and return the descriptor for the property value.
        Returns:
        This builder for chaining method calls.