[jboss-cvs] jboss-seam/examples/contactlist/src/org/jboss/seam/example/crud ...
Gavin King
gavin.king at jboss.com
Wed Sep 27 21:30:28 EDT 2006
User: gavin
Date: 06/09/27 21:30:28
Modified: examples/contactlist/src/org/jboss/seam/example/crud
Contact.java
Log:
validation
Revision Changes Path
1.2 +12 -0 jboss-seam/examples/contactlist/src/org/jboss/seam/example/crud/Contact.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Contact.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/contactlist/src/org/jboss/seam/example/crud/Contact.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Contact.java 28 Sep 2006 00:18:33 -0000 1.1
+++ Contact.java 28 Sep 2006 01:30:28 -0000 1.2
@@ -4,21 +4,33 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
+import org.hibernate.validator.Length;
+
@Entity
public class Contact
{
@Id @GeneratedValue
private Long id;
+ @Length(max=50)
private String firstName;
+ @Length(max=50)
private String lastName;
+ @Length(max=250)
private String address;
+ @Length(max=50)
private String city;
+ @Length(max=50)
private String state;
+ @Length(max=6)
private String zip;
+ @Length(max=50)
private String country;
+ @Length(max=20)
private String homePhone;
+ @Length(max=20)
private String businessPhone;
+ @Length(max=20)
private String cellPhone;
public String getAddress()
More information about the jboss-cvs-commits
mailing list