01: /*
02:
03: Derby - Class org.apache.derby.impl.sql.compile.RoutineDesignator
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (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;
31:
32: /**
33: * This node represents a routine signature.
34: */
35: public class RoutineDesignator {
36: boolean isSpecific;
37: TableName name; // TableName is a misnomer it is really just a schema qualified name
38: boolean isFunction; // else a procedure
39: /**
40: * A list of DataTypeDescriptors
41: * if null then the signature is not specified and this designator is ambiguous if there is
42: * more than one function (procedure) with this name.
43: */
44: List paramTypeList;
45: AliasDescriptor aliasDescriptor;
46:
47: public RoutineDesignator(boolean isSpecific, TableName name,
48: boolean isFunction, List paramTypeList) {
49: this .isSpecific = isSpecific;
50: this .name = name;
51: this .isFunction = isFunction;
52: this .paramTypeList = paramTypeList;
53: }
54:
55: void setAliasDescriptor(AliasDescriptor aliasDescriptor) {
56: this .aliasDescriptor = aliasDescriptor;
57: }
58:
59: /**
60: * @return PrivilegeInfo for this node
61: */
62: PrivilegeInfo makePrivilegeInfo() {
63: return new RoutinePrivilegeInfo(aliasDescriptor);
64: }
65: }
|