01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.jee;
18:
19: import javax.xml.bind.annotation.XmlAccessType;
20: import javax.xml.bind.annotation.XmlAccessorType;
21: import javax.xml.bind.annotation.XmlAttribute;
22: import javax.xml.bind.annotation.XmlElement;
23: import javax.xml.bind.annotation.XmlID;
24: import javax.xml.bind.annotation.XmlType;
25: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
26: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
27:
28: /**
29: * The query-method specifies the method for a finder or select
30: * query.
31: * <p/>
32: * The method-name element specifies the name of a finder or select
33: * method in the entity bean's implementation class.
34: * <p/>
35: * Each method-param must be defined for a query-method using the
36: * method-params element.
37: * <p/>
38: * It is used by the query-method element.
39: * <p/>
40: * Example:
41: * <p/>
42: * <query>
43: * <description>Method finds large orders</description>
44: * <query-method>
45: * <method-name>findLargeOrders</method-name>
46: * <method-params></method-params>
47: * </query-method>
48: * <ejb-ql>
49: * SELECT OBJECT(o) FROM Order o
50: * WHERE o.amount > 1000
51: * </ejb-ql>
52: * </query>
53: */
54: @XmlAccessorType(XmlAccessType.FIELD)
55: @XmlType(name="query-methodType",propOrder={"methodName","methodParams"})
56: public class QueryMethod {
57:
58: @XmlElement(name="method-name",required=true)
59: protected String methodName;
60: @XmlElement(name="method-params",required=true)
61: protected MethodParams methodParams;
62: @XmlAttribute
63: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
64: @XmlID
65: protected String id;
66:
67: public String getMethodName() {
68: return methodName;
69: }
70:
71: /**
72: * contains a name of an enterprise
73: * bean method or the asterisk (*) character. The asterisk is
74: * used when the element denotes all the methods of an
75: * enterprise bean's client view interfaces.
76: */
77: public void setMethodName(String value) {
78: this .methodName = value;
79: }
80:
81: public MethodParams getMethodParams() {
82: return methodParams;
83: }
84:
85: public void setMethodParams(MethodParams value) {
86: this .methodParams = value;
87: }
88:
89: public String getId() {
90: return id;
91: }
92:
93: public void setId(String value) {
94: this.id = value;
95: }
96:
97: }
|