universe@38: /* universe@38: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. universe@38: * universe@38: * Copyright 2018 Mike Becker. All rights reserved. universe@38: * universe@38: * Redistribution and use in source and binary forms, with or without universe@38: * modification, are permitted provided that the following conditions are met: universe@38: * universe@38: * 1. Redistributions of source code must retain the above copyright universe@38: * notice, this list of conditions and the following disclaimer. universe@38: * universe@38: * 2. Redistributions in binary form must reproduce the above copyright universe@38: * notice, this list of conditions and the following disclaimer in the universe@38: * documentation and/or other materials provided with the distribution. universe@38: * universe@38: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@38: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@38: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE universe@38: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE universe@38: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR universe@38: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF universe@38: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS universe@38: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN universe@38: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) universe@38: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE universe@38: * POSSIBILITY OF SUCH DAMAGE. universe@38: * universe@38: */ universe@38: package de.uapcore.lightpit.dao; universe@38: universe@62: import de.uapcore.lightpit.entities.Issue; universe@38: import de.uapcore.lightpit.entities.Project; universe@86: import de.uapcore.lightpit.entities.Version; universe@38: universe@59: import java.sql.SQLException; universe@59: import java.util.List; universe@59: universe@62: public interface IssueDao extends GenericDao { universe@59: universe@59: /** universe@62: * Lists all issues for the specified project. universe@75: * This is not guaranteed to contain version information. universe@75: * Use {@link #joinVersionInformation(Issue)} to obtain this information for a specific issue. universe@72: * universe@59: * @param project the project universe@62: * @return a list of issues universe@59: * @throws SQLException on any kind of SQL error universe@59: */ universe@62: List list(Project project) throws SQLException; universe@75: universe@75: /** universe@86: * Lists all issues that are somehow related to the specified version. universe@86: * universe@86: * @param version the version universe@86: * @return a list of issues universe@86: * @throws SQLException on any kind of SQL error universe@86: */ universe@86: List list(Version version) throws SQLException; universe@86: universe@86: /** universe@75: * Saves an instances to the database. universe@75: * Implementations of this DAO must guarantee that the generated ID is stored in the instance. universe@75: * universe@75: * @param instance the instance to insert universe@75: * @throws SQLException on any kind of SQL error universe@75: * @see Issue#setId(int) universe@75: */ universe@75: @Override universe@75: void save(Issue instance) throws SQLException; universe@75: universe@75: /** universe@75: * Retrieves the affected, scheduled and resolved versions for the specified issue. universe@75: * universe@75: * @param issue the issue to join the information for universe@75: * @throws SQLException on any kind of SQL error universe@75: */ universe@75: void joinVersionInformation(Issue issue) throws SQLException; universe@38: }