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

http://thoughtsite.googlecode.com/ · Java · 104 lines · 56 code · 21 blank · 27 comment · 0 complexity · ff3bb51b181f48c37319bfa12182e1e0 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 java.io.Serializable;
  17. import java.util.Date;
  18. import javax.jdo.annotations.Extension;
  19. import javax.jdo.annotations.IdGeneratorStrategy;
  20. import javax.jdo.annotations.IdentityType;
  21. import javax.jdo.annotations.PersistenceCapable;
  22. import javax.jdo.annotations.Persistent;
  23. import javax.jdo.annotations.PrimaryKey;
  24. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
  25. public class IdeaCategory implements Serializable {
  26. /** A unique identifier for the class */
  27. private static final long serialVersionUID = -3313468527605676463L;
  28. @PrimaryKey
  29. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  30. @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
  31. private String key;
  32. public String getKey() {
  33. return key;
  34. }
  35. public void setKey(String key) {
  36. this.key = key;
  37. }
  38. @Persistent
  39. private String name;
  40. @Persistent
  41. private String description;
  42. @Persistent
  43. private Date createdOn;
  44. public Date getCreatedOn() {
  45. return createdOn;
  46. }
  47. public void setCreatedOn(Date createdOn) {
  48. this.createdOn = createdOn;
  49. }
  50. public Date getUpdatedOn() {
  51. return updatedOn;
  52. }
  53. public void setUpdatedOn(Date updatedOn) {
  54. this.updatedOn = updatedOn;
  55. }
  56. @Persistent
  57. private Date updatedOn;
  58. public IdeaCategory() {}
  59. /**
  60. * @return the name
  61. */
  62. public String getName() {
  63. return name;
  64. }
  65. /**
  66. * @param name the name to set
  67. */
  68. public void setName(String name) {
  69. this.name = name;
  70. }
  71. /**
  72. * @return the description
  73. */
  74. public String getDescription() {
  75. return description;
  76. }
  77. /**
  78. * @param description the description to set
  79. */
  80. public void setDescription(String description) {
  81. this.description = description;
  82. }
  83. }