PageRenderTime 38ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jba/cmp/EjbRelation.java

https://github.com/stratwine/openejb
Java | 120 lines | 31 code | 7 blank | 82 comment | 2 complexity | f4ad7b81d348fc89c8af2464ad5e81e3 MD5 | raw file
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package org.apache.openejb.jee.jba.cmp;
  18. import java.util.ArrayList;
  19. import java.util.List;
  20. import javax.xml.bind.annotation.XmlAccessType;
  21. import javax.xml.bind.annotation.XmlAccessorType;
  22. import javax.xml.bind.annotation.XmlElementRef;
  23. import javax.xml.bind.annotation.XmlElementRefs;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. /**
  27. * <p>Java class for anonymous complex type.
  28. *
  29. * <p>The following schema fragment specifies the expected content contained within this class.
  30. *
  31. * <pre>
  32. * &lt;complexType>
  33. * &lt;complexContent>
  34. * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  35. * &lt;sequence>
  36. * &lt;element ref="{http://jboss.org}ejb-relation-name"/>
  37. * &lt;element ref="{http://jboss.org}read-only" minOccurs="0"/>
  38. * &lt;element ref="{http://jboss.org}read-time-out" minOccurs="0"/>
  39. * &lt;choice minOccurs="0">
  40. * &lt;element ref="{http://jboss.org}foreign-key-mapping"/>
  41. * &lt;element ref="{http://jboss.org}relation-table-mapping"/>
  42. * &lt;/choice>
  43. * &lt;sequence minOccurs="0">
  44. * &lt;element ref="{http://jboss.org}ejb-relationship-role"/>
  45. * &lt;element ref="{http://jboss.org}ejb-relationship-role"/>
  46. * &lt;/sequence>
  47. * &lt;/sequence>
  48. * &lt;/restriction>
  49. * &lt;/complexContent>
  50. * &lt;/complexType>
  51. * </pre>
  52. *
  53. *
  54. */
  55. @XmlAccessorType(XmlAccessType.FIELD)
  56. @XmlType(name = "", propOrder = {
  57. "content"
  58. })
  59. @XmlRootElement(name = "ejb-relation")
  60. public class EjbRelation {
  61. @XmlElementRefs({
  62. @XmlElementRef(name = "relation-table-mapping", namespace = "http://jboss.org", type = RelationTableMapping.class),
  63. @XmlElementRef(name = "ejb-relationship-role", namespace = "http://jboss.org", type = EjbRelationshipRole.class),
  64. @XmlElementRef(name = "ejb-relation-name", namespace = "http://jboss.org", type = EjbRelationName.class),
  65. @XmlElementRef(name = "foreign-key-mapping", namespace = "http://jboss.org", type = ForeignKeyMapping.class),
  66. @XmlElementRef(name = "read-only", namespace = "http://jboss.org", type = ReadOnly.class),
  67. @XmlElementRef(name = "read-time-out", namespace = "http://jboss.org", type = ReadTimeOut.class)
  68. })
  69. protected List<Object> content;
  70. /**
  71. * Gets the rest of the content model.
  72. *
  73. * <p>
  74. * You are getting this "catch-all" property because of the following reason:
  75. * The field name "EjbRelationshipRole" is used by two different parts of a schema. See:
  76. * line 476 of file:/Users/dblevins/work/openejb3/jbosscmp-jdbc_4_0.xsd
  77. * line 475 of file:/Users/dblevins/work/openejb3/jbosscmp-jdbc_4_0.xsd
  78. * <p>
  79. * To get rid of this property, apply a property customization to one
  80. * of both of the following declarations to change their names:
  81. * Gets the value of the content property.
  82. *
  83. * <p>
  84. * This accessor method returns a reference to the live list,
  85. * not a snapshot. Therefore any modification you make to the
  86. * returned list will be present inside the JAXB object.
  87. * This is why there is not a <CODE>set</CODE> method for the content property.
  88. *
  89. * <p>
  90. * For example, to add a new item, do as follows:
  91. * <pre>
  92. * getContent().add(newItem);
  93. * </pre>
  94. *
  95. *
  96. * <p>
  97. * Objects of the following type(s) are allowed in the list
  98. * {@link EjbRelationshipRole }
  99. * {@link EjbRelationName }
  100. * {@link RelationTableMapping }
  101. * {@link ForeignKeyMapping }
  102. * {@link ReadOnly }
  103. * {@link ReadTimeOut }
  104. *
  105. *
  106. */
  107. public List<Object> getContent() {
  108. if (content == null) {
  109. content = new ArrayList<Object>();
  110. }
  111. return this.content;
  112. }
  113. }