/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+ * Copyright (C) 2007-2012 Argeo GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.argeo.server.dao;
import java.beans.PropertyEditor;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.generic.GenericBeanFactoryAccessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.io.Resource;
return res;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public <T> List<T> list(Class<T> clss, Object filter) {
List<T> res = new ArrayList<T>();
res.addAll((Collection<T>) model.get(classToUse).values());
if (applicationContext != null)
- res.addAll(new GenericBeanFactoryAccessor(applicationContext)
- .getBeansOfType(clss).values());
+ res.addAll(applicationContext.getBeansOfType(clss).values());
return res;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
protected Class findClass(Class parent) {
if (model.containsKey(parent))
return parent;