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 * <complexType> 020 * <complexContent> 021 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 022 * <sequence> 023 * <element ref="{http://ebean-orm.github.io/xml/ns/ebean}named-query" maxOccurs="unbounded"/> 024 * <element ref="{http://ebean-orm.github.io/xml/ns/ebean}raw-sql" maxOccurs="unbounded"/> 025 * </sequence> 026 * <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 027 * </restriction> 028 * </complexContent> 029 * </complexType> 030 * </pre> 031 */ 032@XmlAccessorType(XmlAccessType.FIELD) 033@XmlType(name = "", propOrder = { 034 "namedQuery", 035 "rawSql" 036}) 037@XmlRootElement(name = "dto") 038public class XmDto { 039 040 @XmlElement(name = "named-query", required = true) 041 protected List<XmNamedQuery> namedQuery; 042 @XmlElement(name = "raw-sql", required = true) 043 protected List<XmRawSql> rawSql; 044 @XmlAttribute(name = "class", required = true) 045 protected String clazz; 046 047 /** 048 * Gets the value of the namedQuery property. 049 * <p> 050 * <p> 051 * This accessor method returns a reference to the live list, 052 * not a snapshot. Therefore any modification you make to the 053 * returned list will be present inside the JAXB object. 054 * This is why there is not a <CODE>set</CODE> method for the namedQuery property. 055 * <p> 056 * <p> 057 * For example, to add a new item, do as follows: 058 * <pre> 059 * getNamedQuery().add(newItem); 060 * </pre> 061 * <p> 062 * <p> 063 * <p> 064 * Objects of the following type(s) are allowed in the list 065 * {@link XmNamedQuery } 066 */ 067 public List<XmNamedQuery> getNamedQuery() { 068 if (namedQuery == null) { 069 namedQuery = new ArrayList<>(); 070 } 071 return this.namedQuery; 072 } 073 074 /** 075 * Gets the value of the rawSql property. 076 * <p> 077 * <p> 078 * This accessor method returns a reference to the live list, 079 * not a snapshot. Therefore any modification you make to the 080 * returned list will be present inside the JAXB object. 081 * This is why there is not a <CODE>set</CODE> method for the rawSql property. 082 * <p> 083 * <p> 084 * For example, to add a new item, do as follows: 085 * <pre> 086 * getRawSql().add(newItem); 087 * </pre> 088 * <p> 089 * <p> 090 * <p> 091 * Objects of the following type(s) are allowed in the list 092 * {@link XmRawSql } 093 */ 094 public List<XmRawSql> getRawSql() { 095 if (rawSql == null) { 096 rawSql = new ArrayList<>(); 097 } 098 return this.rawSql; 099 } 100 101 /** 102 * Gets the value of the clazz property. 103 * 104 * @return possible object is 105 * {@link String } 106 */ 107 public String getClazz() { 108 return clazz; 109 } 110 111 /** 112 * Sets the value of the clazz property. 113 * 114 * @param value allowed object is 115 * {@link String } 116 */ 117 public void setClazz(String value) { 118 this.clazz = value; 119 } 120 121}