Advertisement
DevilingMaster

Untitled

May 9th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. public interface APEObject
  2. {
  3.     public Long getId();
  4.     public void setId(Long id);
  5. }
  6.  
  7. @Entity
  8. public class APEObjectWithSystemProperties implements APEObject
  9. {
  10.     @Id
  11.     private Long id;
  12.  
  13.     public Long getId()
  14.     {
  15.         return this.id;
  16.     }
  17.     public void setId(Long id)
  18.     {
  19.         this.id = id;
  20.     }
  21. }
  22.  
  23. @Entity
  24. public class Article extends APEObjectWithSystemProperties
  25. {
  26.     // Nothing do here
  27. }
  28.  
  29. @Entity
  30. public class EmbeddedObject extends APEObject
  31. {
  32.     public Long getId()
  33.     {
  34.         return null;
  35.     }
  36.     public void setId(Long id)
  37.     {
  38.         // Empty block
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement