source: DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/VersionDao.java @ 3475

Last change on this file since 3475 was 3475, checked in by olhsha, 11 years ago

making javadoc comments for signatures in all dao-s (except dispatcher)

File size: 3.0 KB
Line 
1/*
2 * Copyright (C) 2013 DASISH
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17 */
18package eu.dasish.annotation.backend.dao;
19
20import eu.dasish.annotation.schema.Version;
21import java.util.List;
22
23/**
24 *
25 * @author olhsha
26 */
27public interface VersionDao extends ResourceDao{
28   
29   /**
30     * GETTERS
31     **/
32   
33    /**
34     *
35     * @param internalID
36     * @return the Version-object build from the version  with the "internalID".
37     *
38     */
39    public Version getVersion(Number internalID);
40   
41   
42       /**
43     *
44     * @param versionID
45     * @return The list of the cached-representation internal ID-s of all the cached representations of the version with "versionID".
46     */
47    public List<Number> retrieveCachedRepresentationList(Number versionID);
48   
49     
50    /**
51     *
52     * @param versionsID
53     * @return true if "versionID" occurs in the table "versions_cached_representations".
54     */
55    public boolean versionIsInUse(Number versionID);
56   
57   
58    /**
59     * ADDERS
60     **/
61   
62    /**
63     *
64     * @param versionID
65     * @param cachedID
66     * @return # rows added to the table "versions_cached_representations", when adding the pair (versionID, sourceID). Should be 1, if it has been added.
67     */
68    public int addVersionCachedRepresentation(Number versionID, Number cachedID);
69   
70   
71    /**
72     *
73     * @param version
74     * @return the internal Id of the just added "version", or null if it has not been added.
75     *
76     */
77    public Number addVersion(Version version);
78   
79 
80   
81    /**
82     * DELETERS 
83     **/
84   
85     
86    /** @param versionID
87     * @return # deleted rows in "version" table after deleting the version with "versionID". Should be "1" if the version has been deleted.
88     */
89   
90    public int deleteVersion(Number versionID);
91   
92    /**
93     *
94     * @param versionID
95     * @param cachedID
96     * @return # deleted rows in the table "versions_cached_representations" after deleting the pair (versionID, cachedID).
97     */
98    public int deleteVersionCachedRepresentation(Number versionID, Number cachedID);
99   
100   
101    /**
102     *
103     * @param versionID
104     * @return # deleted rows in the table "versions_cached_representations" after deleting all the pairs of the form (versionID, *).
105     */
106    public int deleteAllVersionCachedRepresentation(Number versionID);
107   
108}
109   
110
Note: See TracBrowser for help on using the repository browser.