Class InterceptorContextAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Object model)
      Deprecated.
      since ages
      boolean contains​(java.lang.Object model, PersistenceOperation operation)
      Checks is the given model is already registered in this InterceptorContext with the given operation.
      boolean exists​(java.lang.Object model)  
      java.util.Set<java.lang.Object> getAllRegisteredElements()
      Deprecated.
      since ages
      java.lang.Object getAttribute​(java.lang.String key)  
      java.util.Map<java.lang.String,​java.util.Set<java.util.Locale>> getDirtyAttributes​(java.lang.Object model)
      Returns a map with all modified attribute qualifiers for the given model.
      java.util.Set<java.lang.Object> getElementsRegisteredFor​(PersistenceOperation operation)  
      ModelService getModelService()  
      java.lang.Object getSource​(java.lang.Object model)
      Deprecated.
      since ages
      boolean isModified​(java.lang.Object model)  
      boolean isModified​(java.lang.Object model, java.lang.String attribute)  
      boolean isNew​(java.lang.Object model)
      Tells if the model has been created and has not been saved yet.
      boolean isRemoved​(java.lang.Object model)  
      void registerElement​(java.lang.Object model)
      Register the given model to this InterceptorContext using the InterceptorContext's default operation.
      void registerElement​(java.lang.Object model, java.lang.Object source)
      Deprecated.
      since ages
      void registerElementFor​(java.lang.Object model, PersistenceOperation operation)
      Register the given model to this InterceptorContext using the given operation.
      void setAttribute​(java.lang.String key, java.lang.Object value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InterceptorContextAdapter

        public InterceptorContextAdapter​(InterceptorContext delegate)
    • Method Detail

      • getSource

        @Deprecated
        public java.lang.Object getSource​(java.lang.Object model)
        Deprecated.
        since ages
        Specified by:
        getSource in interface InterceptorContext
        Parameters:
        model - passed in
        Returns:
        source for model 'cached' into context instance, see also DefaultModelService.get(Object)
      • exists

        public boolean exists​(java.lang.Object model)
        Specified by:
        exists in interface InterceptorContext
        Parameters:
        model - model instance to be searched for
        Returns:
        result of the ModelConverter.exists(Object) for registered model converter for passed model
      • getDirtyAttributes

        public java.util.Map<java.lang.String,​java.util.Set<java.util.Locale>> getDirtyAttributes​(java.lang.Object model)
        Description copied from interface: InterceptorContext
        Returns a map with all modified attribute qualifiers for the given model. The keys are all localized and non-localized attribute qualifier which were modified. If the map value is null the key is a non-localized attribute qualifier else the map value contains the locale in which language the localized attribute was modified.
        Specified by:
        getDirtyAttributes in interface InterceptorContext
        Parameters:
        model - the new (not saved) model
        Returns:
        a map with all modified attribute qualifier.
      • registerElementFor

        public void registerElementFor​(java.lang.Object model,
                                       PersistenceOperation operation)
        Description copied from interface: InterceptorContext
        Register the given model to this InterceptorContext using the given operation.
        Specified by:
        registerElementFor in interface InterceptorContext
        Parameters:
        model - the model to be registered.
        operation - the operation to be performed with the given model
      • contains

        @Deprecated
        public boolean contains​(java.lang.Object model)
        Deprecated.
        since ages
        Description copied from interface: InterceptorContext
        Checks is the given model is already registered in this InterceptorContext with the default operation.
        Specified by:
        contains in interface InterceptorContext
        Parameters:
        model - model instance to be searched for
        Returns:
        true if context interceptor contains model
      • registerElement

        @Deprecated
        public void registerElement​(java.lang.Object model,
                                    java.lang.Object source)
        Deprecated.
        since ages
        Description copied from interface: InterceptorContext
        Register the given model to this InterceptorContext using the InterceptorContext's default operation.
        Specified by:
        registerElement in interface InterceptorContext
        Parameters:
        model - the model to be registered.
        source - the source of the model (optional)
      • isModified

        public boolean isModified​(java.lang.Object model,
                                  java.lang.String attribute)
        Specified by:
        isModified in interface InterceptorContext
        Parameters:
        model - model instance to be searched for
        attribute - attribute name to be searched for
        Returns:
        result of the ModelConverter.isModified(Object, String) for registered model converter for passed model , attribute
      • setAttribute

        public void setAttribute​(java.lang.String key,
                                 java.lang.Object value)
        Specified by:
        setAttribute in interface InterceptorContext
        Parameters:
        key - attribute name
        value - attribute passed into context
      • isNew

        public boolean isNew​(java.lang.Object model)
        Description copied from interface: InterceptorContext
        Tells if the model has been created and has not been saved yet.
        Specified by:
        isNew in interface InterceptorContext
        Parameters:
        model - model instance to be searched for
        Returns:
        result of the ModelConverter.isNew(Object) for registered model converter for passed model
      • registerElement

        public void registerElement​(java.lang.Object model)
        Description copied from interface: InterceptorContext
        Register the given model to this InterceptorContext using the InterceptorContext's default operation.
        Specified by:
        registerElement in interface InterceptorContext
        Parameters:
        model - the model to be registered.
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String key)
        Specified by:
        getAttribute in interface InterceptorContext
        Parameters:
        key - attribute name
        Returns:
        attribute for key
      • contains

        public boolean contains​(java.lang.Object model,
                                PersistenceOperation operation)
        Description copied from interface: InterceptorContext
        Checks is the given model is already registered in this InterceptorContext with the given operation.
        Specified by:
        contains in interface InterceptorContext
        Parameters:
        model - model instance to be searched for
        operation - the operation to be searched for
        Returns:
        true if context interceptor contains model
      • getAllRegisteredElements

        @Deprecated
        public java.util.Set<java.lang.Object> getAllRegisteredElements()
        Deprecated.
        since ages
        Specified by:
        getAllRegisteredElements in interface InterceptorContext
        Returns:
        unmodifiable set of models registered using the default operation