001package io.ebeaninternal.xmlmapping.model; 002 003import javax.xml.bind.annotation.XmlAccessType; 004import javax.xml.bind.annotation.XmlAccessorType; 005import javax.xml.bind.annotation.XmlElement; 006import javax.xml.bind.annotation.XmlRootElement; 007import javax.xml.bind.annotation.XmlType; 008import java.util.ArrayList; 009import java.util.List; 010 011 012/** 013 * <p>Java class for anonymous complex type. 014 * <p> 015 * <p>The following schema fragment specifies the expected content contained within this class. 016 * <p> 017 * <pre> 018 * <complexType> 019 * <complexContent> 020 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 021 * <sequence> 022 * <element ref="{http://ebean-orm.github.io/xml/ns/ebean}entity" maxOccurs="unbounded"/> 023 * </sequence> 024 * </restriction> 025 * </complexContent> 026 * </complexType> 027 * </pre> 028 */ 029@XmlAccessorType(XmlAccessType.FIELD) 030@XmlType(name = "", propOrder = { 031 "entity", 032 "dto" 033}) 034@XmlRootElement(name = "ebean") 035public class XmEbean { 036 037 @XmlElement(required = false) 038 protected List<XmEntity> entity; 039 040 @XmlElement(required = false) 041 protected List<XmDto> dto; 042 043 /** 044 * Gets the value of the entity property. 045 * <p> 046 * <p> 047 * This accessor method returns a reference to the live list, 048 * not a snapshot. Therefore any modification you make to the 049 * returned list will be present inside the JAXB object. 050 * This is why there is not a <CODE>set</CODE> method for the entity property. 051 * <p> 052 * <p> 053 * For example, to add a new item, do as follows: 054 * <pre> 055 * getEntity().add(newItem); 056 * </pre> 057 * <p> 058 * <p> 059 * <p> 060 * Objects of the following type(s) are allowed in the list 061 * {@link XmEntity } 062 */ 063 public List<XmEntity> getEntity() { 064 if (entity == null) { 065 entity = new ArrayList<>(); 066 } 067 return this.entity; 068 } 069 070 /** 071 * Returns the List of XmDto beans. 072 */ 073 public List<XmDto> getDto() { 074 if (dto == null) { 075 dto = new ArrayList<>(); 076 } 077 return this.dto; 078 } 079 080}