Advertisement
popov-aa

Address

Apr 1st, 2020
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. package com.helan.videoafisha.entitiy;
  2.  
  3. import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
  4. import com.vladmihalcea.hibernate.type.json.JsonStringType;
  5. import lombok.EqualsAndHashCode;
  6. import lombok.Getter;
  7. import lombok.NoArgsConstructor;
  8. import lombok.Setter;
  9. import org.hibernate.annotations.TypeDef;
  10. import org.hibernate.annotations.TypeDefs;
  11.  
  12. import javax.persistence.MappedSuperclass;
  13. import java.util.HashMap;
  14. import java.util.Map;
  15.  
  16. @NoArgsConstructor
  17. @Getter
  18. @Setter
  19. @EqualsAndHashCode(onlyExplicitlyIncluded = true)
  20. @TypeDefs({
  21.         @TypeDef(name = "json", typeClass = JsonStringType.class),
  22.         @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
  23. })
  24. @MappedSuperclass
  25. public class Address {
  26.     private String countryCode;
  27.     private String formatted;
  28.     private String postalCode;
  29.     private Map<String,String> components = new HashMap<>();
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement