/tests/com/google/appengine/datanucleus/test/HasExtraTypes1JDO.java

http://datanucleus-appengine.googlecode.com/ · Java · 84 lines · 50 code · 16 blank · 18 comment · 0 complexity · 02bb2cdd19e397c43cb77b24a0a2d360 MD5 · raw file

  1. /**********************************************************************
  2. Copyright (c) 2009 Google Inc.
  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. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. **********************************************************************/
  13. package com.google.appengine.datanucleus.test;
  14. import java.util.Currency;
  15. import java.util.Locale;
  16. import java.util.TimeZone;
  17. import javax.jdo.annotations.IdGeneratorStrategy;
  18. import javax.jdo.annotations.IdentityType;
  19. import javax.jdo.annotations.PersistenceCapable;
  20. import javax.jdo.annotations.Persistent;
  21. import javax.jdo.annotations.PrimaryKey;
  22. /**
  23. * @author Max Ross <maxr@google.com>
  24. */
  25. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  26. public class HasExtraTypes1JDO {
  27. @PrimaryKey
  28. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  29. private Long key;
  30. @Persistent(defaultFetchGroup="true")
  31. private Currency currency;
  32. @Persistent(defaultFetchGroup="true")
  33. private Locale locale;
  34. @Persistent(defaultFetchGroup="true")
  35. private StringBuffer stringBuffer;
  36. @Persistent(defaultFetchGroup="true")
  37. private TimeZone timezone;
  38. public TimeZone getTimezone() {
  39. return timezone;
  40. }
  41. public void setTimezone(TimeZone timezone) {
  42. this.timezone = timezone;
  43. }
  44. public StringBuffer getStringBuffer() {
  45. return stringBuffer;
  46. }
  47. public void setStringBuffer(StringBuffer stringBuffer) {
  48. this.stringBuffer = stringBuffer;
  49. }
  50. public Currency getCurrency() {
  51. return currency;
  52. }
  53. public void setCurrency(Currency currency) {
  54. this.currency = currency;
  55. }
  56. public Locale getLocale() {
  57. return locale;
  58. }
  59. public void setLocale(Locale locale) {
  60. this.locale = locale;
  61. }
  62. public Long getKey() {
  63. return key;
  64. }
  65. }