Class QPropertyDefinitionBuilder

    • Constructor Detail

      • QPropertyDefinitionBuilder

        public QPropertyDefinitionBuilder()
    • Method Detail

      • setRequiredType

        public void setRequiredType​(int type)
        Parameters:
        type - the required type of the property definition being built.
        See Also:
        PropertyDefinition.getRequiredType()
      • addValueConstraint

        public void addValueConstraint​(QValueConstraint constraint)
        Adds a value constraint of the property definition being built.
        Parameters:
        constraint - the constraint.
      • addDefaultValue

        public void addDefaultValue​(QValue value)
        Adds a default value of the property definition being built.
        Parameters:
        value - a default value.
      • getDefaultValues

        public QValue[] getDefaultValues()
        Returns:
        array of default values of the property definition being built or null if no default values are defined.
        See Also:
        PropertyDefinition.getDefaultValues()
      • setMultiple

        public void setMultiple​(boolean isMultiple)
        Parameters:
        isMultiple - true if building a 'multiple' property definition.
        See Also:
        PropertyDefinition.isMultiple()
      • setFullTextSearchable

        public void setFullTextSearchable​(boolean fullTextSearchable)
        Parameters:
        fullTextSearchable - true if building a 'fulltext searchable' property definition
        See Also:
        PropertyDefinition.isFullTextSearchable()
      • setQueryOrderable

        public void setQueryOrderable​(boolean queryOrderable)
        Parameters:
        queryOrderable - true if the property is orderable in a query
        See Also:
        PropertyDefinition.isQueryOrderable()
      • build

        public QPropertyDefinition build()
                                  throws java.lang.IllegalStateException
        Creates a new QPropertyDefinition instance based on the state of this builder.
        Returns:
        a new QPropertyDefinition instance.
        Throws:
        java.lang.IllegalStateException - if the instance has not the necessary information to build the QPropertyDefinition instance.