Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Source code recreated from a .class file by IntelliJ IDEA
- // (powered by Fernflower decompiler)
- //
- package eu.nimble.service.model.ubl.commonaggregatecomponents;
- import eu.nimble.service.model.ubl.commonaggregatecomponents.ClauseTypeNoteItem;
- import eu.nimble.service.model.ubl.commonaggregatecomponents.DataMonitoringClauseType;
- import eu.nimble.service.model.ubl.commonaggregatecomponents.DocumentClauseType;
- import java.io.Serializable;
- import java.util.ArrayList;
- import java.util.List;
- import javax.persistence.Basic;
- import javax.persistence.CascadeType;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.Inheritance;
- import javax.persistence.InheritanceType;
- import javax.persistence.JoinColumn;
- import javax.persistence.OneToMany;
- import javax.persistence.Table;
- import javax.persistence.Transient;
- import javax.xml.bind.annotation.XmlAccessType;
- import javax.xml.bind.annotation.XmlAccessorType;
- import javax.xml.bind.annotation.XmlAttribute;
- import javax.xml.bind.annotation.XmlElement;
- import javax.xml.bind.annotation.XmlSeeAlso;
- import javax.xml.bind.annotation.XmlType;
- import org.jvnet.hyperjaxb3.item.ItemUtils;
- import org.jvnet.jaxb2_commons.lang.Equals;
- import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
- import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
- import org.jvnet.jaxb2_commons.locator.ObjectLocator;
- import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(
- name = "ClauseType",
- propOrder = {"id", "note", "type"}
- )
- @XmlSeeAlso({DataMonitoringClauseType.class, DocumentClauseType.class})
- @Entity(
- name = "ClauseType"
- )
- @Table(
- name = "CLAUSE_TYPE"
- )
- @Inheritance(
- strategy = InheritanceType.JOINED
- )
- public class ClauseType implements Serializable, Equals {
- private static final long serialVersionUID = 1L;
- @XmlElement(
- name = "ID",
- namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
- required = true
- )
- protected String id;
- @XmlElement(
- name = "Note",
- namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
- )
- protected List<String> note;
- @XmlElement(
- name = "Type",
- namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2",
- required = true
- )
- protected String type;
- @XmlAttribute(
- name = "Hjid"
- )
- protected Long hjid;
- protected transient List<ClauseTypeNoteItem> noteItems;
- public ClauseType() {
- }
- @Basic
- @Column(
- name = "ID",
- length = 255
- )
- public String getID() {
- return this.id;
- }
- public void setID(String value) {
- this.id = value;
- }
- @Transient
- public List<String> getNote() {
- if(this.note == null) {
- this.note = new ArrayList();
- }
- return this.note;
- }
- public void setNote(List<String> note) {
- this.note = note;
- }
- @Basic
- @Column(
- name = "TYPE_",
- length = 255
- )
- public String getType() {
- return this.type;
- }
- public void setType(String value) {
- this.type = value;
- }
- public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
- if(object != null && this.getClass() == object.getClass()) {
- if(this == object) {
- return true;
- } else {
- ClauseType that = (ClauseType)object;
- String lhsType = this.getID();
- String rhsType = that.getID();
- if(!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsType), LocatorUtils.property(thatLocator, "id", rhsType), lhsType, rhsType)) {
- return false;
- } else {
- List lhsType1 = this.note != null && !this.note.isEmpty()?this.getNote():null;
- List rhsType1 = that.note != null && !that.note.isEmpty()?that.getNote():null;
- if(!strategy.equals(LocatorUtils.property(thisLocator, "note", lhsType1), LocatorUtils.property(thatLocator, "note", rhsType1), lhsType1, rhsType1)) {
- return false;
- } else {
- lhsType = this.getType();
- rhsType = that.getType();
- return strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType);
- }
- }
- }
- } else {
- return false;
- }
- }
- public boolean equals(Object object) {
- EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
- return this.equals((ObjectLocator)null, (ObjectLocator)null, object, strategy);
- }
- @Id
- @Column(
- name = "HJID"
- )
- @GeneratedValue(
- strategy = GenerationType.AUTO
- )
- public Long getHjid() {
- return this.hjid;
- }
- public void setHjid(Long value) {
- this.hjid = value;
- }
- @OneToMany(
- targetEntity = ClauseTypeNoteItem.class,
- cascade = {CascadeType.ALL}
- )
- @JoinColumn(
- name = "NOTE_ITEMS_CLAUSE_TYPE_HJID"
- )
- public List<ClauseTypeNoteItem> getNoteItems() {
- if(this.noteItems == null) {
- this.noteItems = new ArrayList();
- }
- if(ItemUtils.shouldBeWrapped(this.note)) {
- this.note = ItemUtils.wrap(this.note, this.noteItems, ClauseTypeNoteItem.class);
- }
- return this.noteItems;
- }
- public void setNoteItems(List<ClauseTypeNoteItem> value) {
- this.note = null;
- this.noteItems = null;
- this.noteItems = value;
- if(this.noteItems == null) {
- this.noteItems = new ArrayList();
- }
- if(ItemUtils.shouldBeWrapped(this.note)) {
- this.note = ItemUtils.wrap(this.note, this.noteItems, ClauseTypeNoteItem.class);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement