PageRenderTime 49ms CodeModel.GetById 28ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/jboss-as-7.1.1.Final/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/hibernate/secondlevelcache/Student.java

#
Java | 144 lines | 44 code | 15 blank | 85 comment | 0 complexity | abad57c13eaa80c26268301fb2d67143 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1/*
  2 * JBoss, Home of Professional Open Source.
  3 * Copyright 2012, Red Hat, Inc., and individual contributors
  4 * as indicated by the @author tags. See the copyright.txt file in the
  5 * distribution for a full listing of individual contributors.
  6 *
  7 * This is free software; you can redistribute it and/or modify it
  8 * under the terms of the GNU Lesser General Public License as
  9 * published by the Free Software Foundation; either version 2.1 of
 10 * the License, or (at your option) any later version.
 11 *
 12 * This software is distributed in the hope that it will be useful,
 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 15 * Lesser General Public License for more details.
 16 *
 17 * You should have received a copy of the GNU Lesser General Public
 18 * License along with this software; if not, write to the Free
 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 21 */
 22
 23package org.jboss.as.test.integration.hibernate.secondlevelcache;
 24
 25
 26/**
 27 * Represents a student object.
 28 * 
 29 * @author Madhumita Sadhukhan
 30 */
 31public class Student {
 32    // unique student id
 33    private int studentId;
 34    // first name of the student
 35    private String firstName;
 36    // last name of the student
 37    private String lastName;
 38    // address of the student
 39    private String address;
 40
 41    /**
 42     * Default constructor
 43     */
 44    public Student() {
 45    }
 46
 47    /**
 48     * Creates a new instance of Student.
 49     * 
 50     * @param firstName first name.
 51     * @param lastName last name.
 52     * @param address address.
 53     */
 54    public Student(String firstName, String lastName, String address) {
 55        this.firstName = firstName;
 56        this.lastName = lastName;
 57        this.address = address;
 58    }
 59
 60    /**
 61     * Gets the student id for this student.
 62     * 
 63     * @return student id.
 64     */
 65    public int getStudentId() {
 66        return studentId;
 67    }
 68
 69    /**
 70     * Sets the student id for this student.
 71     * 
 72     * @return student id.
 73     */
 74    public void setStudentId(int studentId) {
 75        this.studentId = studentId;
 76    }
 77
 78    /**
 79     * Gets the first name for this student.
 80     * 
 81     * @return first name.
 82     */
 83    public String getFirstName() {
 84        return firstName;
 85    }
 86
 87    /**
 88     * Sets the first name for this student.
 89     * 
 90     * @param first name.
 91     */
 92    public void setFirstName(String firstName) {
 93        this.firstName = firstName;
 94    }
 95
 96    /**
 97     * Gets the last name for this student.
 98     * 
 99     * @return last name.
100     */
101    public String getLastName() {
102        return lastName;
103    }
104
105    /**
106     * Sets the last name for this student.
107     * 
108     * @param last name.
109     */
110    public void setLastName(String lastName) {
111        this.lastName = lastName;
112    }
113
114    /**
115     * Gets the address for this student.
116     * 
117     * @return address.
118     */
119    public String getAddress() {
120        return address;
121    }
122
123    /**
124     * Sets the address for this student.
125     * 
126     * @param address.
127     */
128    public void setAddress(String address) {
129        this.address = address;
130    }
131
132    /**
133     * Method used by the UI to clear information on the screen.
134     * 
135     * @return String used in the navigation rules.
136     */
137    public String clear() {
138        firstName = "";
139        lastName = "";
140        address = "";
141        return "clear";
142    }
143
144}