Family2.java :  » ERP-CRM-Financial » OpenXava-3.0 » org » openxava » test » model » Java Open Source

Java Open Source » ERP CRM Financial » OpenXava 3.0 
OpenXava 3.0 » org » openxava » test » model » Family2.java
package org.openxava.test.model;

import javax.persistence.*;

import org.hibernate.validator.*;
import org.openxava.annotations.*;

/**
 * Family2 not have oid,
 * like the typical number/description table. <p>
 * 
 * In this class we use Hibernate Validator annotations
 * for defining the size of the properties (@Max and @Length)
 * instead of the JPA one (@Column(length=)).<br>
 * 
 * @author Javier Paniza
 */

@Entity
public class Family2 {

  @Id @Max(999)
  private int number;
  
  @Length(max=40) @Required
  private String description;

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public int getNumber() {
    return number;
  }

  public void setNumber(int number) {
    this.number = number;
  }
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.