KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > sql > compile > RoutineDesignator


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

21
22 package org.apache.derby.impl.sql.compile;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 import org.apache.derby.impl.sql.execute.PrivilegeInfo;
27 import org.apache.derby.impl.sql.execute.RoutinePrivilegeInfo;
28 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
29
30 import java.util.List JavaDoc;
31
32 /**
33  * This node represents a routine signature.
34  */

35 public class RoutineDesignator
36 {
37     boolean isSpecific;
38     TableName name; // TableName is a misnomer it is really just a schema qualified name
39
boolean isFunction; // else a procedure
40
/**
41      * A list of DataTypeDescriptors
42      * if null then the signature is not specified and this designator is ambiguous if there is
43      * more than one function (procedure) with this name.
44      */

45     List JavaDoc paramTypeList;
46     AliasDescriptor aliasDescriptor;
47
48     public RoutineDesignator( boolean isSpecific,
49                               TableName name,
50                               boolean isFunction,
51                               List JavaDoc paramTypeList)
52     {
53         this.isSpecific = isSpecific;
54         this.name = name;
55         this.isFunction = isFunction;
56         this.paramTypeList = paramTypeList;
57     }
58
59     void setAliasDescriptor( AliasDescriptor aliasDescriptor)
60     {
61         this.aliasDescriptor = aliasDescriptor;
62     }
63     
64     /**
65      * @return PrivilegeInfo for this node
66      */

67     PrivilegeInfo makePrivilegeInfo()
68     {
69         return new RoutinePrivilegeInfo( aliasDescriptor);
70     }
71 }
72
Popular Tags