ActiveWebSocketUser.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright 2002-2016 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package sample.data;
  17. import java.util.Calendar;
  18. import javax.persistence.Entity;
  19. import javax.persistence.Id;
  20. @Entity
  21. public class ActiveWebSocketUser {
  22. @Id
  23. private String id;
  24. private String username;
  25. private Calendar connectionTime;
  26. public ActiveWebSocketUser() {
  27. }
  28. public ActiveWebSocketUser(String id, String username, Calendar connectionTime) {
  29. super();
  30. this.id = id;
  31. this.username = username;
  32. this.connectionTime = connectionTime;
  33. }
  34. public String getUsername() {
  35. return username;
  36. }
  37. public void setUsername(String username) {
  38. this.username = username;
  39. }
  40. public Calendar getConnectionTime() {
  41. return connectionTime;
  42. }
  43. public void setConnectionTime(Calendar connectionTime) {
  44. this.connectionTime = connectionTime;
  45. }
  46. }