1 | /* |
2 | |
3 | Derby - Class org.apache.derby.impl.store.raw.xact.EscalateContainerKey |
4 | |
5 | Copyright 2001, 2004 The Apache Software Foundation or its licensors, as applicable. |
6 | |
7 | Licensed under the Apache License, Version 2.0 (the "License"); |
8 | you may not use this file except in compliance with the License. |
9 | You may obtain a copy of the License at |
10 | |
11 | http://www.apache.org/licenses/LICENSE-2.0 |
12 | |
13 | Unless required by applicable law or agreed to in writing, software |
14 | distributed under the License is distributed on an "AS IS" BASIS, |
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | See the License for the specific language governing permissions and |
17 | limitations under the License. |
18 | |
19 | */ |
20 | |
21 | package org.apache.derby.impl.store.raw.xact; |
22 | |
23 | import org.apache.derby.iapi.store.raw.ContainerKey; |
24 | import org.apache.derby.iapi.store.raw.RecordHandle; |
25 | |
26 | import org.apache.derby.iapi.util.Matchable; |
27 | |
28 | public final class EscalateContainerKey implements Matchable |
29 | { |
30 | |
31 | /************************************************************************** |
32 | * Fields of the class |
33 | ************************************************************************** |
34 | */ |
35 | private ContainerKey container_key; |
36 | |
37 | /************************************************************************** |
38 | * Constructors for This class: |
39 | ************************************************************************** |
40 | */ |
41 | public EscalateContainerKey(ContainerKey key) |
42 | { |
43 | container_key = key; |
44 | } |
45 | |
46 | /************************************************************************** |
47 | * Private/Protected methods of This class: |
48 | ************************************************************************** |
49 | */ |
50 | |
51 | /************************************************************************** |
52 | * Public Methods of This class: |
53 | ************************************************************************** |
54 | */ |
55 | |
56 | /************************************************************************** |
57 | * Public Methods of XXXX class: |
58 | ************************************************************************** |
59 | */ |
60 | public boolean match(Object key) |
61 | { |
62 | if (key instanceof RecordHandle) |
63 | { |
64 | return(container_key.equals(((RecordHandle) key).getContainerId())); |
65 | } |
66 | |
67 | return false; |
68 | } |
69 | } |