Interface FeatureRule

All Superinterfaces:
org.gvsig.tools.persistence.Persistent
All Known Subinterfaces:
FeatureRuleExpression
All Known Implementing Classes:
AbstractFeatureRule

public interface FeatureRule extends org.gvsig.tools.persistence.Persistent
Represents a Feature validation rule. These rules are used to check Feature state integrity in editing mode. Desde una rule que se ejecuta en el UPDATE podemos ejecutar un update de esta feature en el store. Pero si la rule se ejecuta en el FINISH_EDITING no es posible hacer update de ninguna feature del store.
  • Field Details

    • CHECK_WHEN_FINISH_EDITING

      static final int CHECK_WHEN_FINISH_EDITING
      See Also:
    • CHECK_WHEN_INSERT_OR_UPDATE_FEATURE

      static final int CHECK_WHEN_INSERT_OR_UPDATE_FEATURE
      See Also:
    • CHECK_WHEN_USER_EDIT_FEATURE

      static final int CHECK_WHEN_USER_EDIT_FEATURE
      See Also:
  • Method Details

    • getName

      String getName()
      Returns the rule name
      Returns:
      the rule name
    • getDescription

      String getDescription()
      Returns the rule description
      Returns:
      the rule description
    • validate

      void validate(EditableFeature feature, FeatureStore featureStore) throws DataException
      This is the method that applies this rule to the Feature, given also its associated FeatureStore.
      Parameters:
      feature - Feature to which apply the rule
      featureStore - FeatureStore to which the Feature belongs
      Throws:
      DataException - if an error occurs during validation
    • checkAtUpdate

      boolean checkAtUpdate()
      Indicates whether this rule should be checked at update. Only in this rules can be updated the feature in the store.
      Returns:
      true if this rule should be checked at update, otherwise false.
    • checkAtFinishEditing

      boolean checkAtFinishEditing()
      Returns true if this rule should be applied just when editing is being finished. In this rules, can't be updated any feature in the store.
      Returns:
      true if this rule should be applied when editing is being finished, otherwise false.
    • checkWhen

      boolean checkWhen(int mask)