Created
May 29, 2012 13:19
-
-
Save mrvisser/2828348 to your computer and use it in GitHub Desktop.
Creating a simple entity for the OAE Infinispan Storage API proto-type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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