001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee.oejb2;
017:
018: import javax.xml.bind.annotation.XmlAccessType;
019: import javax.xml.bind.annotation.XmlAccessorType;
020: import javax.xml.bind.annotation.XmlElement;
021: import javax.xml.bind.annotation.XmlType;
022:
023: /**
024: *
025: * Handles the case where an arbitrary SQL statement is executed,
026: * and the JDBC driver returns a new automatically generated ID.
027: * This should not be used when the destination table itself
028: * generates the ID (see database-generatedType), but it could be
029: * used for a web session ID or something where there is no
030: * naturally matching database table (but you could create one
031: * with an AUTO_INCREMENT key, specify an insert statement here,
032: * and then capture the newly returned ID and use it as your
033: * web session ID).
034: *
035: *
036: * <p>Java class for auto-increment-tableType complex type.
037: *
038: * <p>The following schema fragment specifies the expected content contained within this class.
039: *
040: * <pre>
041: * <complexType name="auto-increment-tableType">
042: * <complexContent>
043: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
044: * <sequence>
045: * <element name="sql" type="{http://www.w3.org/2001/XMLSchema}string"/>
046: * <element name="return-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
047: * </sequence>
048: * </restriction>
049: * </complexContent>
050: * </complexType>
051: * </pre>
052: *
053: *
054: */
055: @XmlAccessorType(XmlAccessType.FIELD)
056: @XmlType(name="auto-increment-tableType",namespace="http://openejb.apache.org/xml/ns/pkgen-2.1",propOrder={"sql","returnType"})
057: public class AutoIncrementTableType {
058:
059: @XmlElement(name="sql",namespace="http://openejb.apache.org/xml/ns/pkgen-2.1",required=true)
060: protected String sql;
061: @XmlElement(name="return-type",namespace="http://openejb.apache.org/xml/ns/pkgen-2.1",required=true)
062: protected String returnType;
063:
064: /**
065: * Gets the value of the sql property.
066: *
067: * @return
068: * possible object is
069: * {@link String }
070: *
071: */
072: public String getSql() {
073: return sql;
074: }
075:
076: /**
077: * Sets the value of the sql property.
078: *
079: * @param value
080: * allowed object is
081: * {@link String }
082: *
083: */
084: public void setSql(String value) {
085: this .sql = value;
086: }
087:
088: /**
089: * Gets the value of the returnType property.
090: *
091: * @return
092: * possible object is
093: * {@link String }
094: *
095: */
096: public String getReturnType() {
097: return returnType;
098: }
099:
100: /**
101: * Sets the value of the returnType property.
102: *
103: * @param value
104: * allowed object is
105: * {@link String }
106: *
107: */
108: public void setReturnType(String value) {
109: this.returnType = value;
110: }
111:
112: }
|