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

com.discursive.dao.generic.spring.TimestampingAdvisor 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 TimestampingAdvisor extends DefaultIntroductionAdvisor {

    private static final long serialVersionUID = -3761487756824571846L;

    public TimestampingAdvisor() {
        super(new TimestampingInterceptor());
    }

    @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