Class MetadataField<T>

    • Constructor Detail

      • MetadataField

        public MetadataField​(java.lang.String type)
    • Method Detail

      • getType

        public MetadataFieldType getType()
        The type of the field.
        Returns:
        String with the name of the type.
      • getExternalId

        public java.lang.String getExternalId()
        Get the id of the field.
        Returns:
        String, field id.
      • setExternalId

        public void setExternalId​(java.lang.String externalId)
        Set the id of the string (auto-generated if this is left blank).
        Parameters:
        externalId - The id to set.
      • getLabel

        public java.lang.String getLabel()
        Get the label of the field
        Returns:
        String, the label of the field.
      • setLabel

        public void setLabel​(java.lang.String label)
        Sets the label of the field
        Parameters:
        label - The label to set.
      • isMandatory

        public boolean isMandatory()
        Cehcks whether the field is mandatory.
        Returns:
        Boolean indicating whether the field is mandatory.
      • setMandatory

        public void setMandatory​(java.lang.Boolean mandatory)
        Sets a boolean indicating whether this fields needs to be mandatory.
        Parameters:
        mandatory - The boolean to set.
      • getDefaultValue

        public T getDefaultValue()
                          throws java.text.ParseException
        Gets the default value of this field.
        Returns:
        The default value
        Throws:
        java.text.ParseException - If the stored value can't be parsed to the correct type.
      • setDefaultValue

        public void setDefaultValue​(T defaultValue)
        Set the default value of the field
        Parameters:
        defaultValue - The value to set.
      • getValidation

        public MetadataValidation getValidation()
        Get the validation rules of this field.
        Returns:
        The validation rules.
      • setValidation

        public void setValidation​(MetadataValidation validation)
        Set the validation rules of this field.
        Parameters:
        validation - The rules to set.
      • getDataSource

        public MetadataDataSource getDataSource()
        Get the data source definition of this field.
        Returns:
        The data source.
      • setDataSource

        public void setDataSource​(MetadataDataSource dataSource)
        Set the datasource for the field.
        Parameters:
        dataSource - The datasource to set.