Guest User

customer openxava

a guest
Nov 4th, 2012
245
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.openxava.invoicing.model;
  2.  
  3. import javax.persistence.*;
  4. import org.openxava.annotations.*;
  5.  
  6. @Entity
  7. // This mark Customer class as an entity
  8. public class Customer {
  9.     @Id
  10.     // The number property is the key property. Keys are required by default
  11.     @Column(length = 6)
  12.     // The column length is use at UI level and DB level
  13.     private int number;
  14.     @Column(length = 50)
  15.     // The column length is use at UI level and DB level
  16.     @Required
  17.     // A validation error will be show if name property is left empty
  18.     private String name;
  19.  
  20.     public int getNumber() {
  21.         return number;
  22.     }
  23.  
  24.     public void setNumber(int number) {
  25.         this.number = number;
  26.     }
  27.  
  28.     public String getName() {
  29.         return name;
  30.     }
  31.  
  32.     public void setName(String name) {
  33.         this.name = name;
  34.     }
  35. }
RAW Paste Data