Class ValidatingLifecycleEventManager

  • All Implemented Interfaces:
    java.io.Serializable, CallbackModes, org.apache.openjpa.lib.conf.Configurable

    public class ValidatingLifecycleEventManager
    extends LifecycleEventManager
    implements org.apache.openjpa.lib.conf.Configurable
    An extension of LifecycleEventManager which adds validation capabilities for specific lifecycle events. Validation occurs after firing all lifecycle events and callbacks.
    See Also:
    Serialized Form
    • Field Detail

      • _validationEnabled

        protected boolean _validationEnabled
    • Constructor Detail

      • ValidatingLifecycleEventManager

        public ValidatingLifecycleEventManager()
        Constructor which accepts a reference to the validator to use. If null, no validation will occur.
    • Method Detail

      • endConfiguration

        public void endConfiguration()
        Specified by:
        endConfiguration in interface org.apache.openjpa.lib.conf.Configurable
      • setConfiguration

        public void setConfiguration​(org.apache.openjpa.lib.conf.Configuration conf)
        Specified by:
        setConfiguration in interface org.apache.openjpa.lib.conf.Configurable
      • startConfiguration

        public void startConfiguration()
        Specified by:
        startConfiguration in interface org.apache.openjpa.lib.conf.Configurable
      • isActive

        public boolean isActive​(ClassMetaData meta)
        Whether this LifeCycleEventManager has had at least one listener or callback registered. Used for a quick test when firing events.
        Overrides:
        isActive in class LifecycleEventManager
        Returns:
        boolean
      • isValidationEnabled

        public boolean isValidationEnabled()
      • setValidationEnabled

        public boolean setValidationEnabled​(boolean enabled)