/src/main/java/com/google/ie/business/domain/IdeaComment.java

http://thoughtsite.googlecode.com/ · Java · 112 lines · 48 code · 20 blank · 44 comment · 0 complexity · d79447ea5bda944b44f46d86f82fbb39 MD5 · raw file

  1. /* Copyright 2010 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS.
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License
  14. */
  15. package com.google.ie.business.domain;
  16. import org.compass.annotations.Searchable;
  17. import org.compass.annotations.SearchableProperty;
  18. import java.io.Serializable;
  19. import javax.jdo.annotations.IdentityType;
  20. import javax.jdo.annotations.PersistenceCapable;
  21. import javax.jdo.annotations.Persistent;
  22. /**
  23. *
  24. * @author asirohi
  25. *
  26. */
  27. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
  28. @Searchable(alias = "IdeaComment")
  29. public class IdeaComment extends Comment implements Serializable {
  30. public static final String STATUS_SAVED = "Saved";
  31. /** A unique identifier for the class */
  32. private static final long serialVersionUID = 8728151976934031986L;
  33. @Persistent
  34. private long totalNegativeVotes;
  35. @Persistent
  36. private long totalVotes;
  37. @Persistent
  38. private long totalPositiveVotes;
  39. @Persistent
  40. @SearchableProperty
  41. private String ideaKey;
  42. public IdeaComment() {
  43. }
  44. /**
  45. * @return the totalNegativeVotes
  46. */
  47. public long getTotalNegativeVotes() {
  48. return totalNegativeVotes;
  49. }
  50. /**
  51. * @param totalNegativeVotes the totalNegativeVotes to set
  52. */
  53. public void setTotalNegativeVotes(long totalNegativeVotes) {
  54. this.totalNegativeVotes = totalNegativeVotes;
  55. }
  56. /**
  57. * @return the totalPositiveVotes
  58. */
  59. public long getTotalPositiveVotes() {
  60. return totalPositiveVotes;
  61. }
  62. /**
  63. * @param totalPositiveVotes the totalPositiveVotes to set
  64. */
  65. public void setTotalPositiveVotes(long totalPositiveVotes) {
  66. this.totalPositiveVotes = totalPositiveVotes;
  67. }
  68. /**
  69. * @param totalVotes the totalVotes to set
  70. */
  71. public void setTotalVotes(long totalVotes) {
  72. this.totalVotes = totalVotes;
  73. }
  74. /**
  75. * @return the totalVotes
  76. */
  77. public long getTotalVotes() {
  78. return totalVotes;
  79. }
  80. /**
  81. * @return the ideaKey
  82. */
  83. public String getIdeaKey() {
  84. return ideaKey;
  85. }
  86. /**
  87. * @param ideaKey the ideaKey to set
  88. */
  89. public void setIdeaKey(String ideaKey) {
  90. this.ideaKey = ideaKey;
  91. }
  92. }