camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulli...@apache.org
Subject svn commit: r794556 - /camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java
Date Thu, 16 Jul 2009 07:00:43 GMT
Author: cmoulliard
Date: Thu Jul 16 07:00:43 2009
New Revision: 794556

URL: http://svn.apache.org/viewvc?rev=794556&view=rev
Log:
Add a new property in annotation DataField.java to define mandatory fields, generate exceptions
in BindyCsvDataFormat when record is empty in case of missing mandatory fields.

Modified:
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java?rev=794556&r1=794555&r2=794556&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclass/Order.java
Thu Jul 16 07:00:43 2009
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.dataformat.bindy.model.simple.oneclass;
+package org.apache.camel.dataformat.bindy.model.simple.oneclassmandatory;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -22,19 +22,19 @@
 import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 
-@CsvRecord(separator = ",")
+@CsvRecord(separator = ",", skipFirstLine = true)
 public class Order {
 
     @DataField(pos = 0)
     private int orderNr;
 
-    @DataField(pos = 1)
+    @DataField(pos = 1, required = true)
     private String clientNr;
 
-    @DataField(pos = 2)
+    @DataField(pos = 2, required = true)
     private String firstName;
 
-    @DataField(pos = 3)
+    @DataField(pos = 3, required = true)
     private String lastName;
 
     @DataField(pos = 4)



Mime
View raw message