Project

General

Profile

« Previous | Next » 

Revision 51171c9d

Added by Andreas Müller about 13 years ago

last updates for Taxon Excel Import and moving all success variables to state

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelReferenceImport.java
96 96
		super();
97 97
	}
98 98
	
99
	protected boolean initializeMappers(BerlinModelImportState state){
99
	protected void initializeMappers(BerlinModelImportState state){
100 100
		for (CdmAttributeMapperBase mapper: classMappers){
101 101
			if (mapper instanceof DbImportExtensionMapper){
102 102
				((DbImportExtensionMapper)mapper).initialize(state, Reference.class);
103 103
			}
104 104
		}
105
		return true;
105
		return;
106 106
	}
107 107
	
108 108
	protected static CdmAttributeMapperBase[] classMappers = new CdmAttributeMapperBase[]{
......
161 161

  
162 162

  
163 163
	@Override
164
	protected boolean doInvoke(BerlinModelImportState state){
165
		boolean success = true;
164
	protected void doInvoke(BerlinModelImportState state){
166 165
		logger.info("start make " + getPluralString() + " ...");
167 166

  
168
		success &= initializeMappers(state);
167
		boolean success = true;
168
		initializeMappers(state);
169 169
		BerlinModelImportConfigurator config = state.getConfig();
170 170
		Source source = config.getSource();
171 171

  
......
188 188
		try {
189 189
			if (testMaxRecursionResultSet.next() == true){
190 190
				logger.error("Maximum allowed InReference recursions exceeded in Berlin Model. Maximum recursion level is 2.");
191
				return false;
191
				state.setUnsuccessfull();
192
				return;
192 193
			}
193 194
		} catch (SQLException e1) {
194 195
			e1.printStackTrace();
......
239 240

  
240 241
		} catch (SQLException e) {
241 242
			logger.error("SQLException:" +  e);
242
			return false;
243
			state.setUnsuccessfull();
244
			return;
243 245
		}
244 246
		logger.info("end make " + getPluralString() + " ... " + getSuccessString(success));
245
		return success;
247
		if (! success){
248
			state.setUnsuccessfull();
249
		}
250
		return;
246 251
	}
247 252

  
248 253
	

Also available in: Unified diff