01: /*
02: * Copyright 2004-2006 Fouad HAMDI.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.csvbeans.builders;
17:
18: import org.csvbeans.specs.BeanSpecification;
19:
20: /**
21: * Define the ability to build a CSV line.
22: *
23: * @author Fouad Hamdi
24: * @since 0.5
25: */
26: public interface LineBuilder {
27: /**
28: * Return the build CSV line according to the record specifications.
29: *
30: * @param obj
31: * the object to build in CSV format.
32: * @return the CSV line.
33: * @throws GenerationException
34: * when there is a problem to build the CSV line.
35: */
36: String build(Object obj) throws GenerationException;
37:
38: /**
39: * @param beanSpecification
40: * The beanSpecification to set.
41: */
42: void setBeanSpecification(BeanSpecification beanSpecification);
43:
44: void setFieldSeparator(String separator);
45: }
|