Skip to content

Instantly share code, notes, and snippets.

@Thomvis
Created May 29, 2011 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thomvis/997880 to your computer and use it in GitHub Desktop.
Save Thomvis/997880 to your computer and use it in GitHub Desktop.
Example to illustrate a use case of key-creation in GWT
interface HasReferences {
// just an interface,
}
@Entity
public class Person implements HasReferences {
// ...
}
@Entity
public class Company implements HasReferences {
// ...
}
// somewhere in GWT:
List<HasReferences> hasReferences = getHasReferences();
for (HasReferences hr : hasReferences) {
Key<? extends HasReferences> k = ???;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment