cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1401256 - in /cxf/trunk/rt/rs/extensions/search/src: main/java/org/apache/cxf/jaxrs/ext/search/ main/java/org/apache/cxf/jaxrs/ext/search/client/ main/java/org/apache/cxf/jaxrs/ext/search/fiql/ test/java/org/apache/cxf/jaxrs/ext/search/cli...
Date Tue, 23 Oct 2012 11:50:08 GMT
Author: sergeyb
Date: Tue Oct 23 11:50:07 2012
New Revision: 1401256

URL: http://svn.apache.org/viewvc?rev=1401256&view=rev
Log:
Making it simpler to use the dates in queries

Added:
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerInfo.java
      - copied, changed from r1400936, cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerName.java
Removed:
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerName.java
Modified:
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
    cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchUtils.java
Tue Oct 23 11:50:07 2012
@@ -25,7 +25,8 @@ import java.util.Map;
 import org.apache.cxf.jaxrs.ext.search.sql.SQLPrinterVisitor;
 
 public final class SearchUtils {
-    
+    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
+    //public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
     public static final String DATE_FORMAT_PROPERTY = "search.date-format";
     public static final String TIMEZONE_SUPPORT_PROPERTY = "search.timezone.support";
     public static final String LAX_PROPERTY_MATCH = "search.lax.property.match";
@@ -35,9 +36,9 @@ public final class SearchUtils {
         
     }
     
-    public static SimpleDateFormat getDateFormat(Map<String, String> properties, String
defaultFormat) {
+    public static SimpleDateFormat getDateFormat(Map<String, String> properties) {
         String dfProperty = properties.get(DATE_FORMAT_PROPERTY);
-        return new SimpleDateFormat(dfProperty == null ? defaultFormat : dfProperty);   

+        return new SimpleDateFormat(dfProperty == null ? DEFAULT_DATE_FORMAT : dfProperty);
   
     }
     
     public static boolean isTimeZoneSupported(Map<String, String> properties, Boolean
defaultValue) {

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilder.java
Tue Oct 23 11:50:07 2012
@@ -89,8 +89,8 @@ public class FiqlSearchConditionBuilder 
 
         public Builder(Map<String, String> properties) {
             parent = null;
-            df = SearchUtils.getDateFormat(properties, FiqlParser.DEFAULT_DATE_FORMAT);
-            timeZoneSupported = SearchUtils.isTimeZoneSupported(properties, Boolean.TRUE);
+            df = SearchUtils.getDateFormat(properties);
+            timeZoneSupported = SearchUtils.isTimeZoneSupported(properties, Boolean.FALSE);
         }
 
         public Builder(Builder parent) {

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
Tue Oct 23 11:50:07 2012
@@ -67,8 +67,6 @@ public class FiqlParser<T> implements Se
     public static final String EQ = "==";
     public static final String NEQ = "!=";
     
-    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
-    
     private static final Pattern COMPARATORS_PATTERN; 
     private static final Map<String, ConditionType> OPERATORS_MAP;
 
@@ -317,12 +315,20 @@ public class FiqlParser<T> implements Se
                 String nextPart = getMethodNameSuffix(names[1]);
                 Method getterM = valueType.getMethod("get" + nextPart, new Class[]{});  

                 Class<?> returnType = getterM.getReturnType();
-                boolean lastTry = names.length == 2 
-                    && (InjectionUtils.isPrimitive(returnType) || returnType == Date.class);
+                
+                boolean isPrimitive = InjectionUtils.isPrimitive(returnType);
+                boolean lastTry = names.length == 2 && (isPrimitive || returnType
== Date.class);
                 
                 Object valueObject = lastTry && ownerBean != null ? ownerBean : valueType.newInstance();
-                Object nextObject = lastTry ? InjectionUtils.convertStringToPrimitive(value,
returnType) 
-                    : returnType.newInstance();
+                Object nextObject;
+                
+                if (lastTry) {
+                    nextObject = isPrimitive ? InjectionUtils.convertStringToPrimitive(value,
returnType) 
+                        : convertToDate(value); 
+                } else {
+                    nextObject = returnType.newInstance();
+                }
+                
                 Method setterM = valueType.getMethod("set" + nextPart, new Class[]{getterM.getReturnType()});
                 setterM.invoke(valueObject, new Object[]{nextObject});
                 
@@ -342,9 +348,9 @@ public class FiqlParser<T> implements Se
     
     private Object convertToDate(String value) throws SearchParseException {
         try {
-            DateFormat df = SearchUtils.getDateFormat(contextProperties, DEFAULT_DATE_FORMAT);
+            DateFormat df = SearchUtils.getDateFormat(contextProperties);
             String dateValue = value;
-            if (SearchUtils.isTimeZoneSupported(contextProperties, Boolean.TRUE)) {
+            if (SearchUtils.isTimeZoneSupported(contextProperties, Boolean.FALSE)) {
                 // zone in XML is "+01:00" in Java is "+0100"; stripping semicolon
                 int idx = value.lastIndexOf(':');
                 if (idx != -1) {

Modified: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/client/FiqlSearchConditionBuilderTest.java
Tue Oct 23 11:50:07 2012
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.jaxrs.ext.search.client;
 
-import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -30,18 +29,16 @@ import javax.xml.datatype.DatatypeConfig
 import javax.xml.datatype.DatatypeFactory;
 import javax.xml.datatype.Duration;
 
-import static junit.framework.Assert.assertEquals;
-
 import org.apache.cxf.jaxrs.ext.search.SearchUtils;
 
 import org.junit.AfterClass;
+import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-public class FiqlSearchConditionBuilderTest {
+public class FiqlSearchConditionBuilderTest extends Assert {
     private static FiqlSearchConditionBuilder b = new FiqlSearchConditionBuilder();
     private static TimeZone tz;
-    private DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm Z");
     
     @BeforeClass
     public static void beforeClass() {
@@ -73,11 +70,15 @@ public class FiqlSearchConditionBuilderT
         assertEquals("foo==123.5", ret);
     }
 
+    private Date parseDate(String format, String value) throws ParseException {
+        return new SimpleDateFormat(format).parse(value);
+    }
+    
     @Test
-    public void testEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-01 12:34 +0000");
+    public void testEqualToDateDefault() throws ParseException {
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-01");
         String ret = b.is("foo").equalTo(d).query();
-        assertEquals("foo==2011-03-01T12:34:00.000+00:00", ret);
+        assertEquals("foo==2011-03-01", ret);
     }
     
     @Test
@@ -87,7 +88,7 @@ public class FiqlSearchConditionBuilderT
         props.put(SearchUtils.DATE_FORMAT_PROPERTY, "yyyy-MM-dd'T'HH:mm:ss");
         props.put(SearchUtils.TIMEZONE_SUPPORT_PROPERTY, "false");
         
-        Date d = df.parse("2011-03-01 12:34 +0000");
+        Date d = parseDate("yyyy-MM-dd HH:mm Z", "2011-03-01 12:34 +0000");
         
         FiqlSearchConditionBuilder bCustom = new FiqlSearchConditionBuilder(props);
         
@@ -115,10 +116,10 @@ public class FiqlSearchConditionBuilderT
     }
 
     @Test
-    public void testNotEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-01 12:34 +0000");
+    public void testNotEqualToDateDefault() throws ParseException {
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-01");
         String ret = b.is("foo").notEqualTo(d).query();
-        assertEquals("foo!=2011-03-01T12:34:00.000+00:00", ret);
+        assertEquals("foo!=2011-03-01", ret);
     }
 
     @Test
@@ -196,30 +197,30 @@ public class FiqlSearchConditionBuilderT
 
     @Test
     public void testGreaterThanDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-02");
         String ret = b.is("foo").after(d).query();
-        assertEquals("foo=gt=2011-03-02T22:33:00.000+00:00", ret);
+        assertEquals("foo=gt=2011-03-02", ret);
     }
 
     @Test
     public void testLessThanDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-02");
         String ret = b.is("foo").before(d).query();
-        assertEquals("foo=lt=2011-03-02T22:33:00.000+00:00", ret);
+        assertEquals("foo=lt=2011-03-02", ret);
     }
 
     @Test
     public void testLessOrEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-02");
         String ret = b.is("foo").notAfter(d).query();
-        assertEquals("foo=le=2011-03-02T22:33:00.000+00:00", ret);
+        assertEquals("foo=le=2011-03-02", ret);
     }
 
     @Test
     public void testGreaterOrEqualToDate() throws ParseException {
-        Date d = df.parse("2011-03-02 22:33 +0000");
+        Date d = parseDate(SearchUtils.DEFAULT_DATE_FORMAT, "2011-03-02");
         String ret = b.is("foo").notBefore(d).query();
-        assertEquals("foo=ge=2011-03-02T22:33:00.000+00:00", ret);
+        assertEquals("foo=ge=2011-03-02", ret);
     }
 
     @Test

Modified: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParserTest.java
Tue Oct 23 11:50:07 2012
@@ -147,7 +147,7 @@ public class FiqlParserTest extends Asse
     @Test
     public void testParseDateWithDefaultFormat() throws SearchParseException, ParseException
{
         SearchCondition<Condition> filter = parser.parse("time=le=2010-03-11T18:00:00.000+00:00");
-        DateFormat df = new SimpleDateFormat(FiqlParser.DEFAULT_DATE_FORMAT);
+        DateFormat df = new SimpleDateFormat(SearchUtils.DEFAULT_DATE_FORMAT);
         assertTrue(filter.isMet(new Condition("whatever", 15, df.parse("2010-03-11T18:00:00.000+0000"))));
         assertTrue(filter.isMet(new Condition(null, null, df.parse("2010-03-10T22:22:00.000+0000"))));
         assertFalse(filter.isMet(new Condition("blah", null, df.parse("2010-03-12T00:00:00.000+0000"))));

Modified: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/Book.java
Tue Oct 23 11:50:07 2012
@@ -28,7 +28,7 @@ public class Book {
     private int id;
     private String title;
     private OwnerAddress address;
-    private OwnerName ownerName;
+    private OwnerInfo ownerInfo;
     
     public int getId() {
         return id;
@@ -55,11 +55,11 @@ public class Book {
         this.address = address;
     }
 
-    public OwnerName getOwnerName() {
-        return ownerName;
+    public OwnerInfo getOwnerInfo() {
+        return ownerInfo;
     }
 
-    public void setOwnerName(OwnerName ownerName) {
-        this.ownerName = ownerName;
+    public void setOwnerInfo(OwnerInfo ownerInfo) {
+        this.ownerInfo = ownerInfo;
     }
 }

Modified: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java?rev=1401256&r1=1401255&r2=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorTest.java
Tue Oct 23 11:50:07 2012
@@ -20,7 +20,9 @@ package org.apache.cxf.jaxrs.ext.search.
 
 import java.sql.Connection;
 import java.sql.DriverManager;
+import java.text.SimpleDateFormat;
 import java.util.Collections;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -32,6 +34,7 @@ import javax.persistence.TypedQuery;
 
 import org.apache.cxf.jaxrs.ext.search.SearchCondition;
 import org.apache.cxf.jaxrs.ext.search.SearchConditionVisitor;
+import org.apache.cxf.jaxrs.ext.search.SearchUtils;
 import org.apache.cxf.jaxrs.ext.search.fiql.FiqlParser;
 
 import org.junit.After;
@@ -65,21 +68,30 @@ public class JPATypedQueryVisitorTest ex
             b1.setId(9);
             b1.setTitle("num9");
             b1.setAddress(new OwnerAddress("Street1"));
-            b1.setOwnerName(new OwnerName(new Name("Fred")));
+            OwnerInfo info1 = new OwnerInfo();
+            info1.setName(new Name("Fred"));
+            info1.setDateOfBirth(parseDate("2000-01-01"));
+            b1.setOwnerInfo(info1);
             em.persist(b1);
             assertTrue(em.contains(b1));
             Book b2 = new Book();
             b2.setId(10);
             b2.setTitle("num10");
             b2.setAddress(new OwnerAddress("Street2"));
-            b2.setOwnerName(new OwnerName(new Name("Barry")));
+            OwnerInfo info2 = new OwnerInfo();
+            info2.setName(new Name("Barry"));
+            info2.setDateOfBirth(parseDate("2001-01-01"));
+            b2.setOwnerInfo(info2);
             em.persist(b2);
             assertTrue(em.contains(b2));
             Book b3 = new Book();
             b3.setId(11);
             b3.setTitle("num11");
             b3.setAddress(new OwnerAddress("Street3"));
-            b3.setOwnerName(new OwnerName(new Name("Bill")));
+            OwnerInfo info3 = new OwnerInfo();
+            info3.setName(new Name("Bill"));
+            info3.setDateOfBirth(parseDate("2002-01-01"));
+            b3.setOwnerInfo(info3);
             em.persist(b3);
             assertTrue(em.contains(b3));
             
@@ -197,27 +209,45 @@ public class JPATypedQueryVisitorTest ex
 
     @Test
     public void testEqualsOwnerNameQuery() throws Exception {
-        List<Book> books = queryBooks("ownerName.name.name==Fred");
+        List<Book> books = queryBooks("ownerInfo.name.name==Fred");
         assertEquals(1, books.size());
         Book book = books.get(0);
-        assertEquals("Fred", book.getOwnerName().getName().getName());
+        assertEquals("Fred", book.getOwnerInfo().getName().getName());
     }
     
     @Test
     public void testEqualsOwnerNameQuery2() throws Exception {
-        List<Book> books = queryBooks("ownerName.name==Fred");
+        List<Book> books = queryBooks("ownerInfo.name==Fred");
         assertEquals(1, books.size());
         Book book = books.get(0);
-        assertEquals("Fred", book.getOwnerName().getName().getName());
+        assertEquals("Fred", book.getOwnerInfo().getName().getName());
     }
     
     @Test
     public void testEqualsOwnerNameQuery3() throws Exception {
         List<Book> books = queryBooks("ownerName==Fred", null,
-            Collections.singletonMap("ownerName", "ownerName.name.name"));
+            Collections.singletonMap("ownerName", "ownerInfo.name.name"));
         assertEquals(1, books.size());
         Book book = books.get(0);
-        assertEquals("Fred", book.getOwnerName().getName().getName());
+        assertEquals("Fred", book.getOwnerInfo().getName().getName());
+    }
+    
+    @Test
+    public void testEqualsOwnerBirthDate() throws Exception {
+        List<Book> books = queryBooks("ownerbdate==2000-01-01", null,
+            Collections.singletonMap("ownerbdate", "ownerInfo.dateOfBirth"));
+        assertEquals(1, books.size());
+        Book book = books.get(0);
+        assertEquals("Fred", book.getOwnerInfo().getName().getName());
+        
+        Date d = parseDate("2000-01-01");
+        
+        assertEquals("Fred", book.getOwnerInfo().getName().getName());
+        assertEquals(d, book.getOwnerInfo().getDateOfBirth());
+    }
+    
+    private Date parseDate(String value) throws Exception {
+        return new SimpleDateFormat(SearchUtils.DEFAULT_DATE_FORMAT).parse(value);
     }
     
     @Test

Copied: cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerInfo.java
(from r1400936, cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerName.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerInfo.java?p2=cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerInfo.java&p1=cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerName.java&r1=1400936&r2=1401256&rev=1401256&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerName.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/OwnerInfo.java
Tue Oct 23 11:50:07 2012
@@ -18,19 +18,22 @@
  */
 package org.apache.cxf.jaxrs.ext.search.jpa;
 
+import java.util.Date;
+
 import javax.persistence.Embeddable;
 import javax.persistence.Embedded;
 
 @Embeddable
-public class OwnerName {
+public class OwnerInfo {
 
     private Name name;
+    private Date dateOfBirth;
 
-    public OwnerName() {
+    public OwnerInfo() {
         
     }
     
-    public OwnerName(Name name) {
+    public OwnerInfo(Name name) {
         this.name = name;
     }
     
@@ -42,4 +45,12 @@ public class OwnerName {
     public void setName(Name name) {
         this.name = name;
     }
+
+    public Date getDateOfBirth() {
+        return dateOfBirth;
+    }
+
+    public void setDateOfBirth(Date dateOfBirth) {
+        this.dateOfBirth = dateOfBirth;
+    }
 }



Mime
View raw message