001    /*
002     * ItemDAO.java
003     *
004     * Version: $Revision: 3761 $
005     *
006     * Date: $Date: 2009-05-07 04:18:02 +0000 (Thu, 07 May 2009) $
007     *
008     * Copyright (c) 2002-2009, The DSpace Foundation.  All rights reserved.
009     *
010     * Redistribution and use in source and binary forms, with or without
011     * modification, are permitted provided that the following conditions are
012     * met:
013     *
014     * - Redistributions of source code must retain the above copyright
015     * notice, this list of conditions and the following disclaimer.
016     *
017     * - Redistributions in binary form must reproduce the above copyright
018     * notice, this list of conditions and the following disclaimer in the
019     * documentation and/or other materials provided with the distribution.
020     *
021     * - Neither the name of the DSpace Foundation nor the names of its
022     * contributors may be used to endorse or promote products derived from
023     * this software without specific prior written permission.
024     *
025     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
026     * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
027     * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
028     * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
029     * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
030     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
031     * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
032     * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
033     * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
034     * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
035     * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
036     * DAMAGE.
037     */
038    
039    package org.dspace.content.dao;
040    
041    import org.dspace.core.Context;
042    import org.dspace.content.Bitstream;
043    
044    import java.sql.SQLException;
045    
046    public abstract class ItemDAO
047    {
048        protected Context context;
049    
050        protected ItemDAO(Context ctx)
051        {
052            context = ctx;
053        }
054    
055        public abstract Bitstream getPrimaryBitstream(int itemId, String bundleName) throws SQLException;
056    
057        public abstract Bitstream getFirstBitstream(int itemId, String bundleName) throws SQLException;
058    
059        public abstract Bitstream getNamedBitstream(int itemId, String bundleName, String fileName) throws SQLException;
060    }