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

http://datanucleus-appengine.googlecode.com/ · Java · 37 lines · 15 code · 4 blank · 18 comment · 0 complexity · b6360cdc6cb2ea6b4fc7f9a8eed7e326 MD5 · raw file

  1. /**********************************************************************
  2. Copyright (c) 2011 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 javax.jdo.annotations.DatastoreIdentity;
  15. import javax.jdo.annotations.IdGeneratorStrategy;
  16. import javax.jdo.annotations.PersistenceCapable;
  17. /**
  18. * Example of a child class using datastore-identity
  19. */
  20. @PersistenceCapable
  21. @DatastoreIdentity(strategy=IdGeneratorStrategy.IDENTITY)
  22. public class HasDatastoreIdentityChildJDO {
  23. private String name;
  24. public String getName() {
  25. return name;
  26. }
  27. public void setName(String name) {
  28. this.name = name;
  29. }
  30. }