01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: */package org.apache.openejb.jee.oejb2;
17:
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.XmlElement;
23: import javax.xml.bind.annotation.XmlType;
24:
25: /**
26: *
27: * Indicates that the database automatically populates a primary key
28: * ID in the listed column(s). Typically this is used for columns
29: * with an AUTO_INCREMENT flag or the equivalent. This only makes
30: * sense if this key generator is used for an EJB or something else
31: * with a corresponding database table (not if it's meant to generate
32: * unique web session IDs or something like that -- see
33: * auto-increment-tableType for that case).
34: *
35: *
36: * <p>Java class for database-generatedType complex type.
37: *
38: * <p>The following schema fragment specifies the expected content contained within this class.
39: *
40: * <pre>
41: * <complexType name="database-generatedType">
42: * <complexContent>
43: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44: * <sequence>
45: * <element name="identity-column" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
46: * </sequence>
47: * </restriction>
48: * </complexContent>
49: * </complexType>
50: * </pre>
51: *
52: *
53: */
54: @XmlAccessorType(XmlAccessType.FIELD)
55: @XmlType(name="database-generatedType",namespace="http://openejb.apache.org/xml/ns/pkgen-2.1",propOrder={"identityColumn"})
56: public class DatabaseGeneratedType {
57:
58: @XmlElement(name="identity-column",namespace="http://openejb.apache.org/xml/ns/pkgen-2.1",required=true)
59: protected List<String> identityColumn;
60:
61: /**
62: * Gets the value of the identityColumn property.
63: *
64: * <p>
65: * This accessor method returns a reference to the live list,
66: * not a snapshot. Therefore any modification you make to the
67: * returned list will be present inside the JAXB object.
68: * This is why there is not a <CODE>set</CODE> method for the identityColumn property.
69: *
70: * <p>
71: * For example, to add a new item, do as follows:
72: * <pre>
73: * getIdentityColumn().add(newItem);
74: * </pre>
75: *
76: *
77: * <p>
78: * Objects of the following type(s) are allowed in the list
79: * {@link String }
80: *
81: *
82: */
83: public List<String> getIdentityColumn() {
84: if (identityColumn == null) {
85: identityColumn = new ArrayList<String>();
86: }
87: return this.identityColumn;
88: }
89:
90: }
|