Interface IBoundFieldValue

All Superinterfaces:
IBoundModelObject<Object>, IBoundProperty<Object>, IDefaultable, IFeatureJavaField, IFeatureScalarItemValueHandler, IItemValueHandler<Object>, IJsonNamed, IValued, IValuedMutable

public interface IBoundFieldValue extends IFeatureScalarItemValueHandler, IBoundProperty<Object>
Represents the bound value of a field definition.

This interface provides access to the scalar value within a field, including support for JSON value key handling and default values.

  • Method Details

    • getDefaultValue

      @Nullable Object getDefaultValue()
      Description copied from interface: IDefaultable
      Retrieves the default data value for this model construct.

      Child implementations are expected to override this method to provide a more reasonable default value.

      Specified by:
      getDefaultValue in interface IDefaultable
      Returns:
      the default value or null if there is no default
    • getParentFieldDefinition

      @NonNull IBoundDefinitionModelFieldComplex getParentFieldDefinition()
      Get the field definition that contain's the field value.
      Returns:
      the parent field definition
    • getJsonValueKeyFlagName

      @Nullable String getJsonValueKeyFlagName()
      Get the name of the JSON value key flag.

      Note: if a JSON value key flag is specified, then the JSON value key name is expected to be ignored.

      Returns:
      the flag name or null if no JSON value key flag is configured
      See Also:
    • getJsonValueKeyName

      @NonNull String getJsonValueKeyName()
      Get the name of the JSON value key.

      Note: if a JSON value key flag is specified, then this value is expected to be ignored.

      Returns:
      the name
      See Also:
    • getEffectiveDefaultValue

      default Object getEffectiveDefaultValue()
      Description copied from interface: IDefaultable
      Get the effective default value for the model construct.

      This should consider default values in any related referenced definitions or child constructs as needed to determine the default to use.

      Specified by:
      getEffectiveDefaultValue in interface IDefaultable
      Returns:
      the effective default value or null if there is no effective default value
    • readItem

      default Object readItem(IBoundObject parent, IItemReadHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Parse and return an item.
      Specified by:
      readItem in interface IItemValueHandler<Object>
      Parameters:
      parent - the parent Java object to use for serialization callbacks, or null if there is no parent
      handler - the item parsing handler
      Returns:
      the Java object representing the parsed item
      Throws:
      IOException - if an error occurred while parsing
    • writeItem

      default void writeItem(Object item, IItemWriteHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Write the provided item.
      Specified by:
      writeItem in interface IItemValueHandler<Object>
      Parameters:
      item - the data to write
      handler - the item writing handler
      Throws:
      IOException - if an error occurred while writing
    • deepCopy

      default void deepCopy(@NonNull IBoundObject fromInstance, @NonNull IBoundObject toInstance) throws BindingException
      Description copied from interface: IBoundProperty
      Copy this instance from one parent object to another.
      Specified by:
      deepCopy in interface IBoundProperty<Object>
      Parameters:
      fromInstance - the object to copy from
      toInstance - the object to copy to
      Throws:
      BindingException - if an error occurred while processing the object bindings
    • canHandleXmlQName

      default boolean canHandleXmlQName(IEnhancedQName qname)
      Description copied from interface: IBoundModelObject
      Determine if the provided XML qualified name is associated with this property.
      Specified by:
      canHandleXmlQName in interface IBoundModelObject<Object>
      Parameters:
      qname - the XML qualified name of the property being parsed
      Returns:
      true if the instance will handle this name, or false otherwise