View Javadoc
1   /*
2    * Copyright 2012 Olivier Godineau
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5    * use this file except in compliance with the License. You may obtain a copy of
6    * the License at http://www.apache.org/licenses/LICENSE-2.0
7    * 
8    * Unless required by applicable law or agreed to in writing, software
9    * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11   * License for the specific language governing permissions and limitations under
12   * the License.
13   */
14  package olg.csv.bean;
15  
16  import olg.csv.base.Row;
17  import olg.csv.bean.parser.ParseException;
18  
19  /**
20   * In reading process, product beans from rows.
21   * 
22   * 
23   * @author Olivier Godineau
24   * @param <B>
25   *            dedicated bean the processor products
26   * 
27   */
28  public interface IBeanProcessor<B> {
29  
30  	/**
31  	 * Returns a new bean built from the given row.
32  	 * 
33  	 * @param line
34  	 *            list of String
35  	 * @return <code>null</code> if Row Argument is <code>null</code> or this
36  	 *         transformer has no property transformer
37  	 * @throws olg.csv.bean.parser.ParseException
38  	 *             if an error occurs during parsing String into Bean.
39  	 */
40  	B transform(Row line) throws ParseException;
41  
42  }