package com.namazustudios.test.server; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import org.compass.annotations.Searchable; import org.compass.annotations.SearchableId; import org.compass.annotations.SearchableProperty; import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.KeyFactory; @Searchable @PersistenceCapable(identityType = IdentityType.APPLICATION) public class TestDataObject { TestDataObject(String name) { this.id = KeyFactory.createKey(TestDataObject.class.getSimpleName(),name); } @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @SearchableId public Key id; @Persistent @SearchableProperty public String foo = "Hello"; @Persistent @SearchableProperty public String bar = "World"; }