All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.discursive.dao.generic.spring.LifecycleCallbackAdvisor Maven / Gradle / Ivy

The newest version!
package com.discursive.dao.generic.spring;

import org.springframework.aop.ClassFilter;
import org.springframework.aop.support.DefaultIntroductionAdvisor;

import com.discursive.dao.generic.GenericDao;

public class LifecycleCallbackAdvisor extends DefaultIntroductionAdvisor {

    private static final long serialVersionUID = -3761487756824571846L;

    public LifecycleCallbackAdvisor() {
        super(new LifecycleCallbackInterceptor());
    }

    @Override
    public ClassFilter getClassFilter() {
        return new ClassFilter() {
            @SuppressWarnings("unchecked")
            public boolean matches(Class clazz) {
                boolean isGenericDao = GenericDao.class.isAssignableFrom( clazz );                
                return isGenericDao;
            }            
        };
    }
    
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy