KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > store > access > heap > OpenHeap


1 /*
2
3    Derby - Class org.apache.derby.impl.store.access.heap.OpenHeap
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.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     /**************************************************************************
39      * Fields of the class
40      **************************************************************************
41      */

42
43     /**************************************************************************
44      * Constructors for This class:
45      **************************************************************************
46      */

47
48     /**************************************************************************
49      * Private/Protected methods of This class:
50      **************************************************************************
51      */

52
53     /**************************************************************************
54      * Public Methods of This class:
55      **************************************************************************
56      */

57     public int[] getFormatIds()
58     {
59         return(((Heap) getConglomerate()).format_ids);
60     }
61
62     /**
63      * Return an "empty" row location object of the correct type.
64      * <p>
65      *
66      * @return The empty Rowlocation.
67      *
68      * @exception StandardException Standard exception policy.
69      **/

70     public RowLocation newRowLocationTemplate()
71         throws StandardException
72     {
73         if (getContainer() == null)
74         {
75             throw StandardException.newException(
76                     SQLState.HEAP_IS_CLOSED,
77                     getConglomerate().getId());
78         }
79
80         return new HeapRowLocation();
81     }
82 }
83
Popular Tags