Announcement Announcement Module
Collapse
No announcement yet.
Different @DeclareParents for beans of the same class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Different @DeclareParents for beans of the same class

    Hi
    I am trying to have an introduction for objects that are different instances of the same class. But each instance has to implement a different interface. I know how to do this with XML:
    Code:
    <bean id="deletedStatementDao" parent="abstractDao">
    	    <property name="proxyInterfaces">
    	      <value>com.wellsfargo.blackjack.model.user.DeletedStatementDAO</value>
    	    </property>
    	    <property name="target">
    	       <bean parent="abstractDaoTarget">
    	       </bean>
    	    </property>
    	</bean>
        
        <bean id="accountDao" parent="abstractDao">
    	    <property name="proxyInterfaces">
    	      <value>com.wellsfargo.blackjack.model.user.AccountDao</value>
    	    </property>
    	    <property name="target">
    	       <bean parent="abstractDaoTarget">
    	       </bean>
    	    </property>
    	</bean>
    How do I do the same with @AspectJ annotations?
    Code:
    @Aspect
    public class Dynamic1 {
    	@DeclareParents(value="com.xzy.myapp.MyGenericDao",
    	defaultImpl=DataAccessFinder.class)
    	public static AccountDao mixin;
    
    }
    
    @Aspect
    public class Dynamic2 {
    	@DeclareParents(value="com.xzy.myapp.MyGenericDao",
    	defaultImpl=DataAccessFinder.class)
    	public static StatementDao mixin;
    }
Working...
X