camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulli...@apache.org
Subject svn commit: r790157 [3/3] - in /camel/trunk/components/camel-bindy/src: main/java/org/apache/camel/dataformat/bindy/ test/data/ test/data/big/ test/data2/ test/java/org/apache/camel/dataformat/bindy/csv/ test/java/org/apache/camel/dataformat/bindy/mode...
Date Wed, 01 Jul 2009 13:27:04 GMT
Modified: camel/trunk/components/camel-bindy/src/test/data/csv.txt
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/data/csv.txt?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/data/csv.txt (original)
+++ camel/trunk/components/camel-bindy/src/test/data/csv.txt Wed Jul  1 13:27:04 2009
@@ -1,14 +1,14 @@
 
-01,,Albert,Cartier,BE12345678,Belgacom Ventage 10/10,1500,EUR,08-01-2009
-02,B,,Preud'Homme,XD12345678,Fortis Dynamic 15/15,2500,USD,08-01-2009
-03,C,Jacques,,BE12345678,Belgacom Ventage 10/10,1500,EUR,08-01-2009
-04,D,Michel,Dupond,,Fortis Dynamic 15/15,2500,USD,08-01-2009
-05,E,Annie,Dutronc,BE12345678,,1500,EUR,08-01-2009
-06,F,André,Rieux,XD12345678,Fortis Dynamic 15/15,,USD,08-01-2009
-07,G,Mylène,Farmer,BE12345678,Belgacom Ventage 10/10,1500,,08-01-2009
-08,H,Eva,Longoria,XD12345678,Fortis Dynamic 15/15,2500,USD,
-,,,D,BE12345678,Belgacom Ventage 10/10,1500,,08-01-2009
-,,,D,BE12345678,,,,08-01-2009
-,,,D,BE12345678,,,,
-10,J,Pauline,M,XD12345678,Fortis Dynamic 15/15,2500,USD,08-01-2009
-10,J,Pauline,M,XD12345678,Fortis Dynamic 15/15,2500.45,USD,08-01-2009
\ No newline at end of file
+01,,Albert,Cartier,ISIN,BE12345678,SELL,,1500,EUR,08-01-2009
+02,A1,,Preud'Homme,ISIN,XD12345678,BUY,,2500,USD,08-01-2009
+03,A2,Jacques,,,BE12345678,SELL,,1500,EUR,08-01-2009
+04,A3,Michel,Dupond,,,BUY,,2500,USD,08-01-2009
+05,A4,Annie,Dutronc,ISIN,BE12345678,,,1500,EUR,08-01-2009
+06,A5,André,Rieux,ISIN,XD12345678,SELL,Share,,USD,08-01-2009
+07,A6,Mylène,Farmer,ISIN,BE12345678,BUY,1500,,,08-01-2009
+08,A7,Eva,Longoria,ISIN,XD12345678,SELL,Share,2500,USD,
+,,,D,,BE12345678,SELL,,,,08-01-2009
+,,,D,ISIN,BE12345678,,,,,08-01-2009
+,,,D,ISIN,LU123456789,,,,,
+10,A8,Pauline,M,ISIN,XD12345678,SELL,Share,2500,USD,08-01-2009
+10,A9,Pauline,M,ISIN,XD12345678,BUY,Share,2500.45,USD,08-01-2009
\ No newline at end of file

Modified: camel/trunk/components/camel-bindy/src/test/data2/csv.txt
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/data2/csv.txt?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/data2/csv.txt (original)
+++ camel/trunk/components/camel-bindy/src/test/data2/csv.txt Wed Jul  1 13:27:04 2009
@@ -1,14 +1,14 @@
-order nr,client ref,first name, last name, isin code, instrument name, quantity,currency,date
-01,,Albert,Cartier,BE12345678,Belgacom Ventage 10/10,1500,EUR,08-01-2009
-02,B,,Preud'Homme,XD12345678,Fortis Dynamic 15/15,2500,USD,08-01-2009
-03,C,Jacques,,BE12345678,Belgacom Ventage 10/10,1500,EUR,08-01-2009
-04,D,Michel,Dupond,,Fortis Dynamic 15/15,2500,USD,08-01-2009
-05,E,Annie,Dutronc,BE12345678,,1500,EUR,08-01-2009
-06,F,André,Rieux,XD12345678,Fortis Dynamic 15/15,,USD,08-01-2009
-07,G,Mylène,Farmer,BE12345678,Belgacom Ventage 10/10,1500,,08-01-2009
-08,H,Eva,Longoria,XD12345678,Fortis Dynamic 15/15,2500,USD,
-,,,D,BE12345678,Belgacom Ventage 10/10,1500,,08-01-2009
-,,,D,BE12345678,,,,08-01-2009
-,,,D,BE12345678,,,,
-10,J,Pauline,M,XD12345678,Fortis Dynamic 15/15,2500,USD,08-01-2009
-10,J,Pauline,M,XD12345678,Fortis Dynamic 15/15,2500,USD,08-01-2009
\ No newline at end of file
+order nr,client ref,first name, last name,instrument code,instrument name,order type, instrument
type, quantity,currency,date
+01,,Albert,Cartier,ISIN,BE12345678,SELL,,1500,EUR,08-01-2009
+02,A1,,Preud'Homme,ISIN,XD12345678,BUY,,2500,USD,08-01-2009
+03,A2,Jacques,,,BE12345678,SELL,,1500,EUR,08-01-2009
+04,A3,Michel,Dupond,,,BUY,,2500,USD,08-01-2009
+05,A4,Annie,Dutronc,ISIN,BE12345678,,,1500,EUR,08-01-2009
+06,A5,André,Rieux,ISIN,XD12345678,SELL,Share,,USD,08-01-2009
+07,A6,Mylène,Farmer,ISIN,BE12345678,BUY,1500,,,08-01-2009
+08,A7,Eva,Longoria,ISIN,XD12345678,SELL,Share,2500,USD,
+,,,D,,BE12345678,SELL,,,,08-01-2009
+,,,D,ISIN,BE12345678,,,,,08-01-2009
+,,,D,ISIN,LU123456789,,,,,
+10,A8,Pauline,M,ISIN,XD12345678,SELL,Share,2500,USD,08-01-2009
+10,A9,Pauline,M,ISIN,XD12345678,BUY,Share,2500.45,USD,08-01-2009
\ No newline at end of file

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
Wed Jul  1 13:27:04 2009
@@ -31,6 +31,7 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client;
 import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order;
+import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Security;
 import org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration;
 import org.junit.Test;
 import org.springframework.config.java.annotation.Bean;
@@ -43,7 +44,7 @@
 public class BindyComplexCsvMarshallTest extends AbstractJUnit4SpringContextTests {
 
     private List<Map<String, Object>> models = new ArrayList<Map<String,
Object>>();
-    private String result = "10,A1,Julia,Roberts,BE123456789,Belgium Ventage 10/12,150,USD,14-01-2009\r\n";
+    private String result = "10,A1,Julia,Roberts,ISIN,LU123456789,BUY,Share,150,USD,14-01-2009\r\n";
 
     @Produce(uri = "direct:start")
     private ProducerTemplate template;
@@ -66,8 +67,8 @@
         Order order = new Order();
         order.setOrderNr(10);
         order.setAmount(new BigDecimal("150"));
-        order.setIsinCode("BE123456789");
-        order.setInstrumentName("Belgium Ventage 10/12");
+        order.setOrderType("BUY");
+        order.setInstrumentType("Share");
         order.setCurrency("USD");
 
         Calendar calendar = new GregorianCalendar();
@@ -80,9 +81,16 @@
         client.setLastName("Roberts");
 
         order.setClient(client);
+        
+        Security security = new Security();
+        security.setInstrumentCode("ISIN");
+        security.setInstrumentNumber("LU123456789");
+        
+        order.setSecurity(security);        
 
         model.put(order.getClass().getName(), order);
         model.put(client.getClass().getName(), client);
+        model.put(security.getClass().getName(), security);
 
         models.add(0, model);
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
Wed Jul  1 13:27:04 2009
@@ -42,7 +42,7 @@
 public class BindySimpleCsvMarshallTest extends AbstractJUnit4SpringContextTests {
 
     private List<Map<String, Object>> models = new ArrayList<Map<String,
Object>>();
-    private String result = "1,B2,Keira,Knightley,XX23456789,France OOO,450.45,EUR,14-01-2009\r\n";
+    private String result = "1,B2,Keira,Knightley,ISIN,XX23456789,BUY,Share,450.45,EUR,14-01-2009\r\n";
 
     @Produce(uri = "direct:start")
     private ProducerTemplate template;
@@ -64,12 +64,14 @@
 
         Order order = new Order();
         order.setOrderNr(1);
+        order.setOrderType("BUY");
         order.setClientNr("B2");
         order.setFirstName("Keira");
         order.setLastName("Knightley");
         order.setAmount(new BigDecimal("450.45").setScale(2));
-        order.setIsinCode("XX23456789");
-        order.setInstrumentName("France OOO");
+        order.setInstrumentCode("ISIN");
+        order.setInstrumentNumber("XX23456789");
+        order.setInstrumentType("Share");
         order.setCurrency("EUR");
 
         Calendar calendar = new GregorianCalendar();

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Client.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Client.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Client.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Client.java
Wed Jul  1 13:27:04 2009
@@ -58,9 +58,9 @@
     @Override
     public String toString() {
         return "Model : " + Client.class.getName() + " : "
-            + String.valueOf(this.getClientNr()) + ", "
-            + String.valueOf(this.getFirstName()) + ", "
-            + String.valueOf(this.getLastName());
+            + String.valueOf(this.clientNr) + ", "
+            + String.valueOf(this.firstName) + ", "
+            + String.valueOf(this.lastName);
     }
 
 }

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Order.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Order.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/complex/twoclassesandonelink/Order.java
Wed Jul  1 13:27:04 2009
@@ -31,20 +31,23 @@
 
     @Link
     private Client client;
+    
+    @Link
+    private Security security;
 
-    @DataField(pos = 4)
-    private String isinCode;
+	@DataField(pos = 6)
+    private String orderType;
 
-    @DataField(name = "Name", pos = 5)
-    private String instrumentName;
+	@DataField(name = "Name", pos = 7)
+    private String instrumentType;
 
-    @DataField(pos = 6, precision = 2)
+    @DataField(pos = 8, precision = 2)
     private BigDecimal amount;
 
-    @DataField(pos = 7)
+    @DataField(pos = 9)
     private String currency;
 
-    @DataField(pos = 8, pattern = "dd-MM-yyyy")
+    @DataField(pos = 10, pattern = "dd-MM-yyyy")
     private Date orderDate;
 
     public int getOrderNr() {
@@ -63,22 +66,6 @@
         this.client = client;
     }
 
-    public String getIsinCode() {
-        return isinCode;
-    }
-
-    public void setIsinCode(String code) {
-        isinCode = code;
-    }
-
-    public String getInstrumentName() {
-        return instrumentName;
-    }
-
-    public void setInstrumentName(String instrumentName) {
-        this.instrumentName = instrumentName;
-    }
-
     public BigDecimal getAmount() {
         return amount;
     }
@@ -102,16 +89,40 @@
     public void setOrderDate(Date orderDate) {
         this.orderDate = orderDate;
     }
+    
+    public Security getSecurity() {
+		return security;
+	}
+
+	public void setSecurity(Security security) {
+		this.security = security;
+	}
+	
+    public String getOrderType() {
+		return orderType;
+	}
+
+	public void setOrderType(String orderType) {
+		this.orderType = orderType;
+	}
+
+	public String getInstrumentType() {
+		return instrumentType;
+	}
+
+	public void setInstrumentType(String instrumentType) {
+		this.instrumentType = instrumentType;
+	}
 
     @Override
     public String toString() {
         return "Model : " + Order.class.getName() + " : "
-            + String.valueOf(this.getOrderNr()) + ", " 
-            + String.valueOf(this.getAmount()) + ", "
-            + String.valueOf(this.getIsinCode()) + ", "
-            + String.valueOf(this.getInstrumentName()) + ", "
-            + String.valueOf(this.getCurrency()) + ", "
-            + String.valueOf(this.getClient()) + ","
-            + String.valueOf(this.getOrderDate());
+            + String.valueOf(this.orderNr) + ", " 
+            + String.valueOf(this.amount) + ", "
+            + String.valueOf(this.instrumentType) + ", "
+            + String.valueOf(this.orderType) + ", "
+            + String.valueOf(this.currency) + ", "
+            + String.valueOf(this.client) + ","
+            + String.valueOf(this.orderDate);
     }
 }

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=790157&r1=790156&r2=790157&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
Wed Jul  1 13:27:04 2009
@@ -25,116 +25,132 @@
 @CsvRecord(separator = ",")
 public class Order {
 
-    @DataField(pos = 0)
-    private int orderNr;
+	@DataField(pos = 0)
+	private int orderNr;
 
-    @DataField(pos = 1)
-    private String clientNr;
+	@DataField(pos = 1)
+	private String clientNr;
 
-    @DataField(pos = 2)
-    private String firstName;
+	@DataField(pos = 2)
+	private String firstName;
 
-    @DataField(pos = 3)
-    private String lastName;
-
-    @DataField(pos = 4)
-    private String isinCode;
-
-    @DataField(name = "Name", pos = 5)
-    private String instrumentName;
-
-    @DataField(pos = 6, precision = 2)
-    private BigDecimal amount;
-
-    @DataField(pos = 7)
-    private String currency;
-
-    @DataField(pos = 8, pattern = "dd-MM-yyyy")
-    private Date orderDate;
-
-    public String getClientNr() {
-        return clientNr;
-    }
-
-    public void setClientNr(String clientNr) {
-        this.clientNr = clientNr;
-    }
-
-    public String getFirstName() {
-        return firstName;
-    }
-
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
-
-    public String getLastName() {
-        return lastName;
-    }
-
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
-
-    public int getOrderNr() {
-        return orderNr;
-    }
-
-    public void setOrderNr(int orderNr) {
-        this.orderNr = orderNr;
-    }
-
-    public String getIsinCode() {
-        return isinCode;
-    }
-
-    public void setIsinCode(String code) {
-        isinCode = code;
-    }
-
-    public String getInstrumentName() {
-        return instrumentName;
-    }
-
-    public void setInstrumentName(String instrumentName) {
-        this.instrumentName = instrumentName;
-    }
-
-    public BigDecimal getAmount() {
-        return amount;
-    }
-
-    public void setAmount(BigDecimal amount) {
-        this.amount = amount;
-    }
-
-    public String getCurrency() {
-        return currency;
-    }
-
-    public void setCurrency(String currency) {
-        this.currency = currency;
-    }
-
-    public Date getOrderDate() {
-        return orderDate;
-    }
-
-    public void setOrderDate(Date orderDate) {
-        this.orderDate = orderDate;
-    }
-
-    @Override
-    public String toString() {
-        return "Model : " + Order.class.getName() + " : " 
-               + String.valueOf(this.getOrderNr()) + ", "
-               + String.valueOf(this.getAmount()) + ", "
-               + String.valueOf(this.getIsinCode()) + ", "
-               + String.valueOf(this.getInstrumentName()) + ", "
-               + String.valueOf(this.getCurrency()) + ", "
-               + String.valueOf(this.getClientNr()) + ", "
-               + String.valueOf(this.getFirstName()) + ", "
-               + String.valueOf(this.getLastName()) + ", "
-               + String.valueOf(this.getOrderDate());
-    }
+	@DataField(pos = 3)
+	private String lastName;
+
+	@DataField(pos = 4)
+	private String instrumentCode;
+
+	@DataField(pos = 5)
+	private String instrumentNumber;
+
+	@DataField(pos = 6)
+	private String orderType;
+
+	@DataField(name = "Name", pos = 7)
+	private String instrumentType;
+
+	@DataField(pos = 8, precision = 2)
+	private BigDecimal amount;
+
+	@DataField(pos = 9)
+	private String currency;
+
+	@DataField(pos = 10, pattern = "dd-MM-yyyy")
+	private Date orderDate;
+
+	public int getOrderNr() {
+		return orderNr;
+	}
+
+	public void setOrderNr(int orderNr) {
+		this.orderNr = orderNr;
+	}
+
+	public String getClientNr() {
+		return clientNr;
+	}
+
+	public void setClientNr(String clientNr) {
+		this.clientNr = clientNr;
+	}
+
+	public String getFirstName() {
+		return firstName;
+	}
+
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
+
+	public String getLastName() {
+		return lastName;
+	}
+
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
+
+	public String getInstrumentCode() {
+		return instrumentCode;
+	}
+
+	public void setInstrumentCode(String instrumentCode) {
+		this.instrumentCode = instrumentCode;
+	}
+
+	public String getInstrumentNumber() {
+		return instrumentNumber;
+	}
+
+	public void setInstrumentNumber(String instrumentNumber) {
+		this.instrumentNumber = instrumentNumber;
+	}
+
+	public String getOrderType() {
+		return orderType;
+	}
+
+	public void setOrderType(String orderType) {
+		this.orderType = orderType;
+	}
+
+	public String getInstrumentType() {
+		return instrumentType;
+	}
+
+	public void setInstrumentType(String instrumentType) {
+		this.instrumentType = instrumentType;
+	}
+
+	public BigDecimal getAmount() {
+		return amount;
+	}
+
+	public void setAmount(BigDecimal amount) {
+		this.amount = amount;
+	}
+
+	public String getCurrency() {
+		return currency;
+	}
+
+	public void setCurrency(String currency) {
+		this.currency = currency;
+	}
+
+	public Date getOrderDate() {
+		return orderDate;
+	}
+
+	public void setOrderDate(Date orderDate) {
+		this.orderDate = orderDate;
+	}
+
+	@Override
+	public String toString() {
+		return "Model : " + Order.class.getName() + " : " + this.orderNr + ", " + this.orderType
+ ", "
+				+ String.valueOf(this.amount) + ", " + this.instrumentCode + ", " + this.instrumentNumber
+ ", "
+				+ this.instrumentType + ", " + this.currency + ", " + this.clientNr + ", " + this.firstName
+ ", "
+				+ this.lastName + ", " + String.valueOf(this.orderDate);
+	}
 }

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassandskipfirstline/Order.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassandskipfirstline/Order.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassandskipfirstline/Order.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassandskipfirstline/Order.java
Wed Jul  1 13:27:04 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.dataformat.bindy.model.simple.oneclassandskipfirstline;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
@@ -24,110 +25,132 @@
 @CsvRecord(separator = ",", skipFirstLine = true)
 public class Order {
 
-    @DataField(pos = 0)
-    private int orderNr;
+	@DataField(pos = 0)
+	private int orderNr;
 
-    @DataField(pos = 1)
-    private String clientNr;
+	@DataField(pos = 1)
+	private String clientNr;
 
-    @DataField(pos = 2)
-    private String firstName;
+	@DataField(pos = 2)
+	private String firstName;
 
-    @DataField(pos = 3)
-    private String lastName;
+	@DataField(pos = 3)
+	private String lastName;
 
-    @DataField(pos = 4)
-    private String isinCode;
+	@DataField(pos = 4)
+	private String instrumentCode;
 
-    @DataField(name = "Name", pos = 5)
-    private String instrumentName;
+	@DataField(pos = 5)
+	private String instrumentNumber;
 
-    @DataField(pos = 6)
-    private String amount;
+	@DataField(pos = 6)
+	private String orderType;
 
-    @DataField(pos = 7)
-    private String currency;
+	@DataField(name = "Name", pos = 7)
+	private String instrumentType;
 
-    @DataField(pos = 8, pattern = "dd-MM-yyyy")
-    private Date orderDate;
+	@DataField(pos = 8, precision = 2)
+	private BigDecimal amount;
 
-    public String getClientNr() {
-        return clientNr;
-    }
+	@DataField(pos = 9)
+	private String currency;
 
-    public void setClientNr(String clientNr) {
-        this.clientNr = clientNr;
-    }
+	@DataField(pos = 10, pattern = "dd-MM-yyyy")
+	private Date orderDate;
 
-    public String getFirstName() {
-        return firstName;
-    }
+	public int getOrderNr() {
+		return orderNr;
+	}
 
-    public void setFirstName(String firstName) {
-        this.firstName = firstName;
-    }
+	public void setOrderNr(int orderNr) {
+		this.orderNr = orderNr;
+	}
 
-    public String getLastName() {
-        return lastName;
-    }
+	public String getClientNr() {
+		return clientNr;
+	}
 
-    public void setLastName(String lastName) {
-        this.lastName = lastName;
-    }
+	public void setClientNr(String clientNr) {
+		this.clientNr = clientNr;
+	}
 
-    public int getOrderNr() {
-        return orderNr;
-    }
+	public String getFirstName() {
+		return firstName;
+	}
 
-    public void setOrderNr(int orderNr) {
-        this.orderNr = orderNr;
-    }
+	public void setFirstName(String firstName) {
+		this.firstName = firstName;
+	}
 
-    public String getIsinCode() {
-        return isinCode;
-    }
+	public String getLastName() {
+		return lastName;
+	}
 
-    public void setIsinCode(String code) {
-        isinCode = code;
-    }
+	public void setLastName(String lastName) {
+		this.lastName = lastName;
+	}
 
-    public String getInstrumentName() {
-        return instrumentName;
-    }
+	public String getInstrumentCode() {
+		return instrumentCode;
+	}
 
-    public void setInstrumentName(String instrumentName) {
-        this.instrumentName = instrumentName;
-    }
+	public void setInstrumentCode(String instrumentCode) {
+		this.instrumentCode = instrumentCode;
+	}
 
-    public String getAmount() {
-        return amount;
-    }
+	public String getInstrumentNumber() {
+		return instrumentNumber;
+	}
 
-    public void setAmount(String amount) {
-        this.amount = amount;
-    }
+	public void setInstrumentNumber(String instrumentNumber) {
+		this.instrumentNumber = instrumentNumber;
+	}
 
-    public String getCurrency() {
-        return currency;
-    }
+	public String getOrderType() {
+		return orderType;
+	}
 
-    public void setCurrency(String currency) {
-        this.currency = currency;
-    }
+	public void setOrderType(String orderType) {
+		this.orderType = orderType;
+	}
 
-    public Date getOrderDate() {
-        return orderDate;
-    }
+	public String getInstrumentType() {
+		return instrumentType;
+	}
 
-    public void setOrderDate(Date orderDate) {
-        this.orderDate = orderDate;
-    }
+	public void setInstrumentType(String instrumentType) {
+		this.instrumentType = instrumentType;
+	}
 
-    @Override
-    public String toString() {
-        return ("Model : " + Order.class.getName() + " : " + this.getOrderNr() + ", " + this.getAmount()
+ ", " + this.getIsinCode() + ", " + this.getInstrumentName() + ", " + this
-            .getCurrency())
-               + ", " + this.getClientNr() + ", " + this.getFirstName() + ", " + this.getLastName()
+ ", " + this.getOrderDate();
-    }
+	public BigDecimal getAmount() {
+		return amount;
+	}
 
+	public void setAmount(BigDecimal amount) {
+		this.amount = amount;
+	}
+
+	public String getCurrency() {
+		return currency;
+	}
+
+	public void setCurrency(String currency) {
+		this.currency = currency;
+	}
+
+	public Date getOrderDate() {
+		return orderDate;
+	}
+
+	public void setOrderDate(Date orderDate) {
+		this.orderDate = orderDate;
+	}
+
+	@Override
+	public String toString() {
+		return "Model : " + Order.class.getName() + " : " + this.orderNr + ", " + this.orderType
+ ", "
+				+ String.valueOf(this.amount) + ", " + this.instrumentCode + ", " + this.instrumentNumber
+ ", "
+				+ this.instrumentType + ", " + this.currency + ", " + this.clientNr + ", " + this.firstName
+ ", "
+				+ this.lastName + ", " + String.valueOf(this.orderDate);
+	}
 }

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java?rev=790157&r1=790156&r2=790157&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/util/AnnotationModuleLoaderTest.java
Wed Jul  1 13:27:04 2009
@@ -20,6 +20,7 @@
 
 import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Client;
 import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Order;
+import org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink.Security;
 import org.apache.camel.impl.DefaultPackageScanClassResolver;
 import org.junit.Assert;
 import org.junit.Test;
@@ -31,9 +32,10 @@
         AnnotationModelLoader loader = new AnnotationModelLoader(new DefaultPackageScanClassResolver());
         Set<Class> classes = loader.loadModels("org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink");
         assertNotNull("The find classes should not be null ", classes);
-        assertEquals("There should have 2 classes", 2, classes.size());
+        assertEquals("There should have 3 classes", 3, classes.size());
         assertTrue(classes.contains(Client.class));
         assertTrue(classes.contains(Order.class));
+        assertTrue(classes.contains(Security.class));
     }
     
 }



Mime
View raw message