Skip to content

Instantly share code, notes, and snippets.

@mrvisser
Created May 29, 2012 13:19
Show Gist options
  • Save mrvisser/2828348 to your computer and use it in GitHub Desktop.
Save mrvisser/2828348 to your computer and use it in GitHub Desktop.
Creating a simple entity for the OAE Infinispan Storage API proto-type
@Indexed @ProvidedId
public class Message implements Entity, DeepCopy<Message>, Serializable {
public String key;
public String from;
@Field
public String to;
public String body;
@Override
public String getKey() {
return this.key;
}
@Override
public Message deepCopy() {
Message m = new Message();
m.key = key;
m.from = from;
m.to = to;
m.body = body;
return m;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment