Guest User

Untitled

a guest
Jan 9th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @XmlAccessorType(XmlAccessType.FIELD)
  2. @XmlType(name = "SomeType")
  3. public class SomeType {
  4.  
  5. @XmlAttribute(name = "Name")
  6. protected String name;
  7. }
  8.  
  9. public interface SomeTypeRepository extends CrudRepository<SomeType, Long> {
  10.  
  11. SomeOtherType findByName(String name);
  12.  
  13. }
  14.  
  15. @Entity
  16. public class SomeOtherType extends SomeType{
  17. @Id
  18. @GeneratedValue(strategy = GenerationType.AUTO)
  19. private Long id;
  20. }
  21.  
  22. @Entity
  23. public class SomeOtherType extends SomeType{
  24. @Id
  25. @GeneratedValue(strategy = GenerationType.AUTO)
  26. private Long id;
  27.  
  28. protected String name;
  29. }
Add Comment
Please, Sign In to add comment