org.compass.spring.aop
Class AbstractCompassInterceptor

java.lang.Object
  extended by org.compass.spring.aop.AbstractCompassInterceptor
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
AbstractCompassCreateInterceptor, AbstractCompassDeleteInterceptor, AbstractCompassSaveInterceptor

public abstract class AbstractCompassInterceptor
extends Object
implements org.springframework.beans.factory.InitializingBean

A base class for all Compass Aop interceptors. Holds a reference to a Compass instance.

It also holds information regarding the "location" of the data object (the one that will be saved/created/deleted). It can be the return value if the flag useReturnValue is set (it is not set bt default), or one of the method parameters (defaults to the first one - 0).

Author:
kimchy

Field Summary
protected  CompassTemplate compassTemplate
           
 
Constructor Summary
AbstractCompassInterceptor()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  Object findObject(Object returnValue, Object[] args)
          A helper method that based on the configuration, returns the actual data object.
 Compass getCompass()
           
 int getParameterIndex()
           
 boolean isUseReturnValue()
           
 void setCompass(Compass compass)
           
 void setParameterIndex(int parameterIndex)
           
 void setUseReturnValue(boolean useReturnValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compassTemplate

protected CompassTemplate compassTemplate
Constructor Detail

AbstractCompassInterceptor

public AbstractCompassInterceptor()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

findObject

protected Object findObject(Object returnValue,
                            Object[] args)
A helper method that based on the configuration, returns the actual data object.


getCompass

public Compass getCompass()

setCompass

public void setCompass(Compass compass)

getParameterIndex

public int getParameterIndex()

setParameterIndex

public void setParameterIndex(int parameterIndex)

isUseReturnValue

public boolean isUseReturnValue()

setUseReturnValue

public void setUseReturnValue(boolean useReturnValue)


Copyright (c) 2004-2009 The Compass Project.