001// 002// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0 003// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> 004// Any modifications to this file will be lost upon recompilation of the source schema. 005// Generated on: 2018.12.10 at 03:02:30 PM PST 006// 007 008 009package org.microbean.jpa.jaxb; 010 011import java.util.ArrayList; 012import java.util.List; 013import javax.xml.bind.annotation.XmlAccessType; 014import javax.xml.bind.annotation.XmlAccessorType; 015import javax.xml.bind.annotation.XmlAttribute; 016import javax.xml.bind.annotation.XmlElement; 017import javax.xml.bind.annotation.XmlType; 018 019 020/** 021 * 022 * 023 * @Target({METHOD, FIELD}) @Retention(RUNTIME) 024 * public @interface ManyToOne { 025 * Class targetEntity() default void.class; 026 * CascadeType[] cascade() default {}; 027 * FetchType fetch() default EAGER; 028 * boolean optional() default true; 029 * } 030 * 031 * 032 * 033 * <p>Java class for many-to-one complex type. 034 * 035 * <p>The following schema fragment specifies the expected content contained within this class. 036 * 037 * <pre> 038 * <complexType name="many-to-one"> 039 * <complexContent> 040 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 041 * <sequence> 042 * <choice> 043 * <sequence> 044 * <element name="join-column" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/> 045 * <element name="foreign-key" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}foreign-key" minOccurs="0"/> 046 * </sequence> 047 * <element name="join-table" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}join-table" minOccurs="0"/> 048 * </choice> 049 * <element name="cascade" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}cascade-type" minOccurs="0"/> 050 * </sequence> 051 * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> 052 * <attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" /> 053 * <attribute name="fetch" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}fetch-type" /> 054 * <attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" /> 055 * <attribute name="access" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}access-type" /> 056 * <attribute name="maps-id" type="{http://www.w3.org/2001/XMLSchema}string" /> 057 * <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}boolean" /> 058 * </restriction> 059 * </complexContent> 060 * </complexType> 061 * </pre> 062 * 063 * 064 */ 065@XmlAccessorType(XmlAccessType.FIELD) 066@XmlType(name = "many-to-one", propOrder = { 067 "joinColumn", 068 "foreignKey", 069 "joinTable", 070 "cascade" 071}) 072public class ManyToOne { 073 074 @XmlElement(name = "join-column") 075 protected List<JoinColumn> joinColumn; 076 @XmlElement(name = "foreign-key") 077 protected ForeignKey foreignKey; 078 @XmlElement(name = "join-table") 079 protected JoinTable joinTable; 080 protected CascadeType cascade; 081 @XmlAttribute(name = "name", required = true) 082 protected String name; 083 @XmlAttribute(name = "target-entity") 084 protected String targetEntity; 085 @XmlAttribute(name = "fetch") 086 protected FetchType fetch; 087 @XmlAttribute(name = "optional") 088 protected Boolean optional; 089 @XmlAttribute(name = "access") 090 protected AccessType access; 091 @XmlAttribute(name = "maps-id") 092 protected String mapsId; 093 @XmlAttribute(name = "id") 094 protected Boolean id; 095 096 /** 097 * Gets the value of the joinColumn property. 098 * 099 * <p> 100 * This accessor method returns a reference to the live list, 101 * not a snapshot. Therefore any modification you make to the 102 * returned list will be present inside the JAXB object. 103 * This is why there is not a <CODE>set</CODE> method for the joinColumn property. 104 * 105 * <p> 106 * For example, to add a new item, do as follows: 107 * <pre> 108 * getJoinColumn().add(newItem); 109 * </pre> 110 * 111 * 112 * <p> 113 * Objects of the following type(s) are allowed in the list 114 * {@link JoinColumn } 115 * 116 * 117 */ 118 public List<JoinColumn> getJoinColumn() { 119 if (joinColumn == null) { 120 joinColumn = new ArrayList<JoinColumn>(); 121 } 122 return this.joinColumn; 123 } 124 125 /** 126 * Gets the value of the foreignKey property. 127 * 128 * @return 129 * possible object is 130 * {@link ForeignKey } 131 * 132 */ 133 public ForeignKey getForeignKey() { 134 return foreignKey; 135 } 136 137 /** 138 * Sets the value of the foreignKey property. 139 * 140 * @param value 141 * allowed object is 142 * {@link ForeignKey } 143 * 144 */ 145 public void setForeignKey(ForeignKey value) { 146 this.foreignKey = value; 147 } 148 149 /** 150 * Gets the value of the joinTable property. 151 * 152 * @return 153 * possible object is 154 * {@link JoinTable } 155 * 156 */ 157 public JoinTable getJoinTable() { 158 return joinTable; 159 } 160 161 /** 162 * Sets the value of the joinTable property. 163 * 164 * @param value 165 * allowed object is 166 * {@link JoinTable } 167 * 168 */ 169 public void setJoinTable(JoinTable value) { 170 this.joinTable = value; 171 } 172 173 /** 174 * Gets the value of the cascade property. 175 * 176 * @return 177 * possible object is 178 * {@link CascadeType } 179 * 180 */ 181 public CascadeType getCascade() { 182 return cascade; 183 } 184 185 /** 186 * Sets the value of the cascade property. 187 * 188 * @param value 189 * allowed object is 190 * {@link CascadeType } 191 * 192 */ 193 public void setCascade(CascadeType value) { 194 this.cascade = value; 195 } 196 197 /** 198 * Gets the value of the name property. 199 * 200 * @return 201 * possible object is 202 * {@link String } 203 * 204 */ 205 public String getName() { 206 return name; 207 } 208 209 /** 210 * Sets the value of the name property. 211 * 212 * @param value 213 * allowed object is 214 * {@link String } 215 * 216 */ 217 public void setName(String value) { 218 this.name = value; 219 } 220 221 /** 222 * Gets the value of the targetEntity property. 223 * 224 * @return 225 * possible object is 226 * {@link String } 227 * 228 */ 229 public String getTargetEntity() { 230 return targetEntity; 231 } 232 233 /** 234 * Sets the value of the targetEntity property. 235 * 236 * @param value 237 * allowed object is 238 * {@link String } 239 * 240 */ 241 public void setTargetEntity(String value) { 242 this.targetEntity = value; 243 } 244 245 /** 246 * Gets the value of the fetch property. 247 * 248 * @return 249 * possible object is 250 * {@link FetchType } 251 * 252 */ 253 public FetchType getFetch() { 254 return fetch; 255 } 256 257 /** 258 * Sets the value of the fetch property. 259 * 260 * @param value 261 * allowed object is 262 * {@link FetchType } 263 * 264 */ 265 public void setFetch(FetchType value) { 266 this.fetch = value; 267 } 268 269 /** 270 * Gets the value of the optional property. 271 * 272 * @return 273 * possible object is 274 * {@link Boolean } 275 * 276 */ 277 public Boolean isOptional() { 278 return optional; 279 } 280 281 /** 282 * Sets the value of the optional property. 283 * 284 * @param value 285 * allowed object is 286 * {@link Boolean } 287 * 288 */ 289 public void setOptional(Boolean value) { 290 this.optional = value; 291 } 292 293 /** 294 * Gets the value of the access property. 295 * 296 * @return 297 * possible object is 298 * {@link AccessType } 299 * 300 */ 301 public AccessType getAccess() { 302 return access; 303 } 304 305 /** 306 * Sets the value of the access property. 307 * 308 * @param value 309 * allowed object is 310 * {@link AccessType } 311 * 312 */ 313 public void setAccess(AccessType value) { 314 this.access = value; 315 } 316 317 /** 318 * Gets the value of the mapsId property. 319 * 320 * @return 321 * possible object is 322 * {@link String } 323 * 324 */ 325 public String getMapsId() { 326 return mapsId; 327 } 328 329 /** 330 * Sets the value of the mapsId property. 331 * 332 * @param value 333 * allowed object is 334 * {@link String } 335 * 336 */ 337 public void setMapsId(String value) { 338 this.mapsId = value; 339 } 340 341 /** 342 * Gets the value of the id property. 343 * 344 * @return 345 * possible object is 346 * {@link Boolean } 347 * 348 */ 349 public Boolean isId() { 350 return id; 351 } 352 353 /** 354 * Sets the value of the id property. 355 * 356 * @param value 357 * allowed object is 358 * {@link Boolean } 359 * 360 */ 361 public void setId(Boolean value) { 362 this.id = value; 363 } 364 365}