Project

General

Profile

« Previous | Next » 

Revision fdf9eec2

Added by Andreas Müller almost 10 years ago

better use of generics in service layer and persistence list methods

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IdentifiableServiceBase.java
222 222
	}
223 223
	
224 224
	@Transactional(readOnly = false)  //TODO check transactional behaviour, e.g. what happens with the session if count is very large 
225
	protected void updateTitleCacheImpl(Class<? extends T> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<T> cacheStrategy, IProgressMonitor monitor) {
225
	protected <S extends T > void updateTitleCacheImpl(Class<S> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<T> cacheStrategy, IProgressMonitor monitor) {
226 226
		if (stepSize == null){
227 227
			stepSize = UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE;
228 228
		}
......
240 240
			
241 241
			
242 242
			Map<Class<? extends CdmBase>, AutoPropertyInitializer<CdmBase>> oldAutoInit = switchOfAutoinitializer();
243
			List<T> list = this.list(clazz, stepSize, i, orderHints, null);
243
			List<S> list = this.list(clazz, stepSize, i, orderHints, null);
244 244
			switchOnOldAutoInitializer(oldAutoInit);
245 245
			
246 246
			List<T> entitiesToUpdate = new ArrayList<T>();

Also available in: Unified diff