KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cayenne > map > event > ProcedureParameterEvent


1 /*****************************************************************
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  ****************************************************************/

19
20 package org.apache.cayenne.map.event;
21
22 import org.apache.cayenne.map.ProcedureParameter;
23
24 /**
25  * @author Andrus Adamchik
26  */

27 public class ProcedureParameterEvent extends MapEvent {
28     protected ProcedureParameter parameter;
29
30     public ProcedureParameterEvent(Object JavaDoc source, ProcedureParameter parameter) {
31         super(source);
32         setParameter(parameter);
33     }
34
35     public ProcedureParameterEvent(
36         Object JavaDoc source,
37         ProcedureParameter parameter,
38         String JavaDoc oldName) {
39         this(source, parameter);
40         setOldName(oldName);
41     }
42
43     public ProcedureParameterEvent(
44         Object JavaDoc source,
45         ProcedureParameter parameter,
46         int type) {
47         this(source, parameter);
48         setId(type);
49     }
50
51     public String JavaDoc getNewName() {
52         return (parameter != null) ? parameter.getName() : null;
53     }
54
55     public ProcedureParameter getParameter() {
56         return parameter;
57     }
58
59     public void setParameter(ProcedureParameter parameter) {
60         this.parameter = parameter;
61     }
62 }
63
Popular Tags