aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java')
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java46
1 files changed, 26 insertions, 20 deletions
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java
index 5d799b9..c2e2165 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/schemagen/employee/Employee.java
@@ -9,28 +9,34 @@
*
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
- ******************************************************************************/
-package org.eclipse.persistence.testing.jaxb.schemagen.employee;
-
-import javax.xml.bind.annotation.*;
-
-@XmlRootElement(name="employee-data")
+ ******************************************************************************/
+package org.eclipse.persistence.testing.jaxb.schemagen.employee;
+
+import javax.validation.Valid;
+import javax.validation.constraints.DecimalMax;
+import javax.validation.constraints.Size;
+import javax.xml.bind.annotation.*;
+
+@XmlRootElement(name="employee-data")
@XmlType(name = "employee-type", propOrder = {"firstName", "birthday", "id", "age", "lastName", "address", "department",
"startTime", "phoneNumbers", "responsibilities", "peeps"})
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Employee
-{
- @XmlAttribute(name="id", required=true)
- public int id;
-
- @XmlElement(required = true)
- public String firstName;
-
- public String lastName;
-
- @XmlMixed
- public Address address;
-
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Employee
+{
+ @DecimalMax(value="10")
+ @XmlAttribute(name="id", required=true)
+ public int id;
+
+ @Size(min=2, max=10)
+ @XmlElement(required = true)
+ public String firstName;
+
+ public String lastName;
+
+ @Valid
+ @XmlMixed
+ public Address address;
+
@XmlAttribute
public Department department;