Package net.fp.rp.hibernate

Source Code of net.fp.rp.hibernate.Test

/*
* Copyright (C) 2004-2006 Paul Browne, http://www.firstpartners.net,
*
* released under terms of the GPL license
* http://www.opensource.org/licenses/gpl-license.php
*
*/
package net.fp.rp.hibernate;

import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;




/**
*        @author paul browne
*        @hibernate.class
*         table="TEST"
*    
*/
public class Test implements Serializable {

    /** identifier field */
    private Integer id;

    /** nullable persistent field */
    private String firstname;

    /** nullable persistent field */
    private String name;

    /** nullable persistent field */
    private Integer zip;

    /** full constructor */
    public Test(Integer id, String firstname, String name, Integer zip) {
        this.id = id;
        this.firstname = firstname;
        this.name = name;
        this.zip = zip;
    }

    /** default constructor */
    public Test() {
    }

    /** minimal constructor */
    public Test(Integer id) {
        this.id = id;
    }

    /**
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.Integer"
     *             column="ID"
     *        
     */
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    /**
     *            @hibernate.property
     *             column="FIRSTNAME"
     *             length="20"
     *        
     */
    public String getFirstname() {
        return this.firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    /**
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *        
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     *            @hibernate.property
     *             column="ZIP"
     *        
     */
    public Integer getZip() {
        return this.zip;
    }

    public void setZip(Integer zip) {
        this.zip = zip;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

}
TOP

Related Classes of net.fp.rp.hibernate.Test

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.