01: /*
02:
03: Derby - Class org.apache.derby.impl.store.access.heap.OpenHeap
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.store.access.heap;
23:
24: import org.apache.derby.iapi.reference.SQLState;
25:
26: import org.apache.derby.iapi.error.StandardException;
27:
28: import org.apache.derby.iapi.types.RowLocation;
29:
30: import org.apache.derby.impl.store.access.conglomerate.OpenConglomerate;
31:
32: /**
33:
34: **/
35:
36: class OpenHeap extends OpenConglomerate {
37: /**************************************************************************
38: * Fields of the class
39: **************************************************************************
40: */
41:
42: /**************************************************************************
43: * Constructors for This class:
44: **************************************************************************
45: */
46:
47: /**************************************************************************
48: * Private/Protected methods of This class:
49: **************************************************************************
50: */
51:
52: /**************************************************************************
53: * Public Methods of This class:
54: **************************************************************************
55: */
56: public int[] getFormatIds() {
57: return (((Heap) getConglomerate()).format_ids);
58: }
59:
60: /**
61: * Return an "empty" row location object of the correct type.
62: * <p>
63: *
64: * @return The empty Rowlocation.
65: *
66: * @exception StandardException Standard exception policy.
67: **/
68: public RowLocation newRowLocationTemplate()
69: throws StandardException {
70: if (getContainer() == null) {
71: throw StandardException.newException(
72: SQLState.HEAP_IS_CLOSED, getConglomerate().getId());
73: }
74:
75: return new HeapRowLocation();
76: }
77: }
|