Guest User

Untitled

a guest
Jan 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public interface Persistent{
  2. public Key getKey();
  3. public void setKey(Key key);
  4. }
  5. public class PersistentObject implements Persistent{
  6. Key key;
  7. public Key getKey() {
  8. return key;
  9. }
  10. public void setKey(Key key) {
  11. this.key=key;
  12. }
  13. }
  14.  
  15. public @interface Persistent {
  16. }
  17. @Persistent
  18. public class PersistentObject {
  19. Key key; //the coder must create this variable or the system doesn't work
  20. }
Add Comment
Please, Sign In to add comment