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

http://datanucleus-appengine.googlecode.com/ · Java · 52 lines · 24 code · 9 blank · 19 comment · 0 complexity · 21706fcbdd5a009e34db46eb2d1966d5 MD5 · raw file

  1. /*
  2. * /**********************************************************************
  3. * Copyright (c) 2009 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. * **********************************************************************/
  17. package com.google.appengine.datanucleus.test;
  18. import java.io.Serializable;
  19. import java.util.List;
  20. import javax.jdo.annotations.IdGeneratorStrategy;
  21. import javax.jdo.annotations.PersistenceCapable;
  22. import javax.jdo.annotations.Persistent;
  23. import javax.jdo.annotations.PrimaryKey;
  24. /**
  25. * @author Max Ross <maxr@google.com>
  26. */
  27. @PersistenceCapable(detachable = "true")
  28. public class DetachableWithMultiValuePropsJDO implements Serializable {
  29. @PrimaryKey
  30. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  31. Long id;
  32. @Persistent
  33. List<String> strList;
  34. public Long getId() {
  35. return id;
  36. }
  37. public List<String> getStrList() {
  38. return strList;
  39. }
  40. public void setStrList(List<String> strList) {
  41. this.strList = strList;
  42. }
  43. }