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

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

refactored DAO-s: resource dao do not call each-other methods any more. Only the new Dispatcher method can do it. Not tested.

File size: 2.5 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.backend.identifiers.VersionIdentifier;
21import eu.dasish.annotation.schema.CachedRepresentationInfo;
22import eu.dasish.annotation.schema.Version;
23import java.util.List;
24
25/**
26 *
27 * @author olhsha
28 */
29public interface VersionDao {
30   
31      /**
32     *
33     * @param internalID
34     * @return extrnalID identifier of the resource with internalID
35     */
36   
37    public VersionIdentifier getExternalID(Number internalID);   
38   
39   /**
40    *
41    * @param externalID
42    * @return the internal Id of the Version with the external ID "externalID"
43    */
44    public Number getInternalID(VersionIdentifier externalID);
45   
46   
47    /**
48     *
49     * @param internalID
50     * @return the instance of Version.class  with the internal Id equal to "internalID"
51     *
52     */
53    public Version getVersion(Number internalID);
54   
55   
56     
57    /** @param versionID
58     * @return
59     * result[0] # deleted rows in the joit table "versions_cached_representations"
60     * result[1] # deleted rows in "version" table
61     */
62   
63    public int[] deleteVersion(Number versionID);
64   
65    /**
66     *
67     * @param version
68     * @return the internal Id of the just added version
69     *
70     */
71    public Number addVersion(Version version);
72   
73 
74     /**
75     *
76     * @param versionID
77     * @return The list of the cached representation internal id-s of all the cached representations of the version with "versionID"
78     */
79    public List<Number> retrieveCachedRepresentationList(Number versionID);
80   
81   
82    public int deleteVersionCachedRepresentation(Number versionID, Number cachedID);
83   
84   
85    public int addVersionCachedRepresentation(Number versionID, Number cachedID);
86   
87}
88   
89
Note: See TracBrowser for help on using the repository browser.