Class RestrictionDefinitionImpl

    • Constructor Detail

      • RestrictionDefinitionImpl

        public RestrictionDefinitionImpl​(@NotNull
                                         @NotNull String name,
                                         org.apache.jackrabbit.oak.api.Type<?> type,
                                         boolean isMandatory)
        Create a new instance.
        Parameters:
        name - The oak name of the restriction definition.
        type - The required type of this definition. Any valid JCR PropertyType except PropertyType.UNDEFINED is allowed.
        isMandatory - A boolean indicating if the restriction is mandatory.
    • Method Detail

      • getRequiredType

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.api.Type<?> getRequiredType()
        Description copied from interface: RestrictionDefinition
        The required type as defined by this definition.
        Specified by:
        getRequiredType in interface RestrictionDefinition
        Returns:
        The required type which must be a valid PropertyType.
      • isMandatory

        public boolean isMandatory()
        Description copied from interface: RestrictionDefinition
        Indicates if this restriction is mandatory.
        Specified by:
        isMandatory in interface RestrictionDefinition
        Returns:
        true if this restriction is mandatory; false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object