Class PropertyFieldDefinition.FieldConstraint

  • Enclosing class:
    PropertyFieldDefinition

    public static class PropertyFieldDefinition.FieldConstraint
    extends Object
    Represents a constraint on a property field
    • Constructor Detail

      • FieldConstraint

        public FieldConstraint​(String type,
                               Map<String,​Object> params)
        Constructs a FieldConstraint
        Parameters:
        type - The type of the constraint
        params - Map of parameters for the constraint
    • Method Detail

      • getType

        public String getType()
        Returns the type of the constraint
        Returns:
        The constraint type
      • getParameters

        public Map<String,​Object> getParameters()
        Returns the parameters for the constraint
        Returns:
        Map of parameters for the constraint or null if there are no parameters
      • getParametersAsJSON

        public org.json.JSONObject getParametersAsJSON()
        Returns the paramters for the constraint as a JSONObject
        Returns:
        JSONObject representation of the parameters