1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
5 *
6 * $Id: AbstractInput.java,v 1.1 2008/02/07 17:12:27 mark Exp $
7 */
8
9package com.sleepycat.persist.impl;
10
11/**
12 * Base class for EntityInput implementations.  RecordInput cannot use this
13 * base class because it extends TupleInput, so it repeats the code here.
14 *
15 * @author Mark Hayes
16 */
17abstract class AbstractInput implements EntityInput {
18
19    Catalog catalog;
20    boolean rawAccess;
21
22    AbstractInput(Catalog catalog, boolean rawAccess) {
23        this.catalog = catalog;
24        this.rawAccess = rawAccess;
25    }
26
27    public Catalog getCatalog() {
28        return catalog;
29    }
30
31    public boolean isRawAccess() {
32        return rawAccess;
33    }
34
35    public boolean setRawAccess(boolean rawAccessParam) {
36        boolean original = rawAccess;
37        rawAccess = rawAccessParam;
38        return original;
39    }
40}
41