001package io.ebeaninternal.xmlmapping.model;
002
003import javax.xml.bind.annotation.XmlAccessType;
004import javax.xml.bind.annotation.XmlAccessorType;
005import javax.xml.bind.annotation.XmlAttribute;
006import javax.xml.bind.annotation.XmlElement;
007import javax.xml.bind.annotation.XmlRootElement;
008import javax.xml.bind.annotation.XmlType;
009import java.util.ArrayList;
010import java.util.List;
011
012
013/**
014 * <p>Java class for anonymous complex type.
015 * <p>
016 * <p>The following schema fragment specifies the expected content contained within this class.
017 * <p>
018 * <pre>
019 * &lt;complexType>
020 *   &lt;complexContent>
021 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
022 *       &lt;sequence>
023 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/ebean}alias-mapping" maxOccurs="unbounded" minOccurs="0"/>
024 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/ebean}column-mapping" maxOccurs="unbounded" minOccurs="0"/>
025 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/ebean}query"/>
026 *       &lt;/sequence>
027 *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
028 *     &lt;/restriction>
029 *   &lt;/complexContent>
030 * &lt;/complexType>
031 * </pre>
032 */
033@XmlAccessorType(XmlAccessType.FIELD)
034@XmlType(name = "", propOrder = {
035  "aliasMapping",
036  "columnMapping",
037  "query"
038})
039@XmlRootElement(name = "raw-sql")
040public class XmRawSql {
041
042  @XmlElement(name = "alias-mapping")
043  protected List<XmAliasMapping> aliasMapping;
044  @XmlElement(name = "column-mapping")
045  protected List<XmColumnMapping> columnMapping;
046  @XmlElement(required = true)
047  protected XmQuery query;
048  @XmlAttribute(name = "name", required = true)
049  protected String name;
050
051  /**
052   * Gets the value of the aliasMapping property.
053   * <p>
054   * <p>
055   * This accessor method returns a reference to the live list,
056   * not a snapshot. Therefore any modification you make to the
057   * returned list will be present inside the JAXB object.
058   * This is why there is not a <CODE>set</CODE> method for the aliasMapping property.
059   * <p>
060   * <p>
061   * For example, to add a new item, do as follows:
062   * <pre>
063   *    getAliasMapping().add(newItem);
064   * </pre>
065   * <p>
066   * <p>
067   * <p>
068   * Objects of the following type(s) are allowed in the list
069   * {@link XmAliasMapping }
070   */
071  public List<XmAliasMapping> getAliasMapping() {
072    if (aliasMapping == null) {
073      aliasMapping = new ArrayList<>();
074    }
075    return this.aliasMapping;
076  }
077
078  /**
079   * Gets the value of the columnMapping property.
080   * <p>
081   * <p>
082   * This accessor method returns a reference to the live list,
083   * not a snapshot. Therefore any modification you make to the
084   * returned list will be present inside the JAXB object.
085   * This is why there is not a <CODE>set</CODE> method for the columnMapping property.
086   * <p>
087   * <p>
088   * For example, to add a new item, do as follows:
089   * <pre>
090   *    getColumnMapping().add(newItem);
091   * </pre>
092   * <p>
093   * <p>
094   * <p>
095   * Objects of the following type(s) are allowed in the list
096   * {@link XmColumnMapping }
097   */
098  public List<XmColumnMapping> getColumnMapping() {
099    if (columnMapping == null) {
100      columnMapping = new ArrayList<>();
101    }
102    return this.columnMapping;
103  }
104
105  /**
106   * Gets the value of the query property.
107   *
108   * @return possible object is
109   * {@link XmQuery }
110   */
111  public XmQuery getQuery() {
112    return query;
113  }
114
115  /**
116   * Sets the value of the query property.
117   *
118   * @param value allowed object is
119   *              {@link XmQuery }
120   */
121  public void setQuery(XmQuery value) {
122    this.query = value;
123  }
124
125  /**
126   * Gets the value of the name property.
127   *
128   * @return possible object is
129   * {@link String }
130   */
131  public String getName() {
132    return name;
133  }
134
135  /**
136   * Sets the value of the name property.
137   *
138   * @param value allowed object is
139   *              {@link String }
140   */
141  public void setName(String value) {
142    this.name = value;
143  }
144
145}