Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. package fr.canalplus.myIncentiveComModel.info;
  2.  
  3. import javax.persistence.*;
  4. import java.io.Serializable;
  5.  
  6.  
  7. @Entity
  8. @Table(name = "transaction_info")
  9. public class TransactionInfo implements Serializable {
  10.  
  11. @Id
  12. private Integer id;
  13.  
  14. @Enumerated(EnumType.STRING)
  15. @Column(name = "type")
  16. private Type type;
  17.  
  18. @Enumerated(EnumType.STRING)
  19. @Column(name = "status")
  20. private Status status;
  21.  
  22. public enum Type {
  23.  
  24. PRISE_OPTION("PO", "Souscription Abo"),
  25. PRISE_PACK("PK", "Souscription Abo"),
  26. TRANSFO_OFFRE("TO", "Souscription Abo"),
  27. PRISE_ABONNEMENT("PA", "Souscription Abo"),
  28. ANNUL_ABO("AA", "Souscription Abo"),
  29. ECHANGE("EC", "SAV"),
  30. BRIS_VOL("BV", "SAV"),
  31. TEST_DECODEUR("TE", "SAV"),
  32. SECOND_ECRAN("SE", "Remise matériel"),
  33. GRPARA_CHQKDO("IN", "Rôle installateur"),
  34. ACOMPTE("ACO", "Remise matériel"),
  35. TRANSFO_CONF("TC", "Transfo Config"),
  36. CLICKCOL("CC", "Remise matériel");
  37.  
  38. private final String name;
  39. private final String libelle;
  40.  
  41. /**
  42. * @param name
  43. */
  44. Type(final String name, final String libelle) {
  45. this.libelle = libelle;
  46. this.name = name;
  47. }
  48.  
  49. public String getLibelle() {
  50. return libelle;
  51. }
  52.  
  53. public String getValue() {
  54. return name;
  55. }
  56. }
  57.  
  58. public enum Status {
  59. NC("NC"),
  60. CB("CB"),
  61. AC("AC");
  62.  
  63. private final String name;
  64.  
  65. /**
  66. * @param name
  67. */
  68. private Status(final String name) {
  69. this.name = name;
  70. }
  71.  
  72. public String getValue() {
  73. return name;
  74. }
  75. }
  76. }
Add Comment
Please, Sign In to add comment