PageRenderTime 39ms CodeModel.GetById 12ms RepoModel.GetById 0ms 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. package org.jboss.as.test.integration.hibernate.secondlevelcache;
  23. /**
  24. * Represents a student object.
  25. *
  26. * @author Madhumita Sadhukhan
  27. */
  28. public class Student {
  29. // unique student id
  30. private int studentId;
  31. // first name of the student
  32. private String firstName;
  33. // last name of the student
  34. private String lastName;
  35. // address of the student
  36. private String address;
  37. /**
  38. * Default constructor
  39. */
  40. public Student() {
  41. }
  42. /**
  43. * Creates a new instance of Student.
  44. *
  45. * @param firstName first name.
  46. * @param lastName last name.
  47. * @param address address.
  48. */
  49. public Student(String firstName, String lastName, String address) {
  50. this.firstName = firstName;
  51. this.lastName = lastName;
  52. this.address = address;
  53. }
  54. /**
  55. * Gets the student id for this student.
  56. *
  57. * @return student id.
  58. */
  59. public int getStudentId() {
  60. return studentId;
  61. }
  62. /**
  63. * Sets the student id for this student.
  64. *
  65. * @return student id.
  66. */
  67. public void setStudentId(int studentId) {
  68. this.studentId = studentId;
  69. }
  70. /**
  71. * Gets the first name for this student.
  72. *
  73. * @return first name.
  74. */
  75. public String getFirstName() {
  76. return firstName;
  77. }
  78. /**
  79. * Sets the first name for this student.
  80. *
  81. * @param first name.
  82. */
  83. public void setFirstName(String firstName) {
  84. this.firstName = firstName;
  85. }
  86. /**
  87. * Gets the last name for this student.
  88. *
  89. * @return last name.
  90. */
  91. public String getLastName() {
  92. return lastName;
  93. }
  94. /**
  95. * Sets the last name for this student.
  96. *
  97. * @param last name.
  98. */
  99. public void setLastName(String lastName) {
  100. this.lastName = lastName;
  101. }
  102. /**
  103. * Gets the address for this student.
  104. *
  105. * @return address.
  106. */
  107. public String getAddress() {
  108. return address;
  109. }
  110. /**
  111. * Sets the address for this student.
  112. *
  113. * @param address.
  114. */
  115. public void setAddress(String address) {
  116. this.address = address;
  117. }
  118. /**
  119. * Method used by the UI to clear information on the screen.
  120. *
  121. * @return String used in the navigation rules.
  122. */
  123. public String clear() {
  124. firstName = "";
  125. lastName = "";
  126. address = "";
  127. return "clear";
  128. }
  129. }