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

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

"put updated body" is implemented and tested. Big refactring: simplifying DAO's and pushing their composition to rest methods. add-methods in DAO return now not the classes but internalID-s of the added resources. Still 2 test errors and 2 test failures.

File size: 2.2 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.CachedRepresentationIdentifier;
21import eu.dasish.annotation.schema.CachedRepresentationInfo;
22import java.util.List;
23
24/**
25 *
26 * @author olhsha
27 */
28public interface CachedRepresentationDao {
29   
30    /**
31     *
32     * @param internalID
33     * @return extrnalID identifier of the resource with internalID
34     */
35    public CachedRepresentationIdentifier getExternalID(Number internalID);
36 
37    /**
38     *
39     * @param internalID
40     * @return the object "cached representation info"  with the internal id "internalID"
41     */
42    public CachedRepresentationInfo getCachedRepresentationInfo(Number internalID);
43   
44    /**
45     *
46     * @param versionID
47     * @return The list list of cached representation internal id-s of all the cached representations of the version with versionID
48     */
49    public List<Number> retrieveCachedRepresentationList(Number versionID);
50   
51     
52    /**
53     *
54     * @param internalID
55     * removes the cached representation with internalId from the DB if there is no reference to it in the table "versions_cached_representations"
56     * @return the amount of removed rows in the table "cached_representation"
57     */
58    public int deleteCachedRepresentationInfo(Number internalID);
59   
60    /**
61     *
62     * @param cached
63     * @return the internal Id of the just added "cached"
64     */
65    public Number addCachedRepresentationInfo(CachedRepresentationInfo cached);
66   
67   
68 
69}
Note: See TracBrowser for help on using the repository browser.