/** * Constructor that takes care of {@link #setStorageType(Class)}. * * @see #setStorageType(Class) */ public NamedObjectRegistry(Class<T> type) { this(); setStorageType(type); }
/** * Constructor that takes care of {@link #setStorageType(Class)}. * * @see #setStorageType(Class) */ public NamedObjectRegistry(Class<T> type) { this(); setStorageType(type); }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void setUp() throws Exception { // Create the registry namedQueryFactoryRegistry = new NamedObjectRegistry<CannedQueryFactory>(); namedQueryFactoryRegistry.setStorageType(CannedQueryFactory.class); namedQueryFactoryRegistry.setNamePattern("test\\.query\\..*"); // Registry the query factories // ONE TestCannedQueryFactory<String> namedQueryFactoryOne = new TestCannedQueryFactory(RESULTS_ONE); namedQueryFactoryOne.setBeanName(QUERY_TEST_ONE); namedQueryFactoryOne.setRegistry(namedQueryFactoryRegistry); namedQueryFactoryOne.afterPropertiesSet(); // TWO TestCannedQueryFactory<Long> namedQueryFactoryTwo = new TestCannedQueryFactory(RESULTS_TWO); namedQueryFactoryTwo.setBeanName(QUERY_TEST_TWO); namedQueryFactoryTwo.setRegistry(namedQueryFactoryRegistry); namedQueryFactoryTwo.afterPropertiesSet(); }
cannedQueryRegistry.setStorageType(CannedQueryFactory.class);