KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > patterns > mappeddata > logic > MappingController


1 /*
2  * Copyright (c) 2006 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: MappingController.java,v 1.4 2007/01/07 06:14:25 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.patterns.mappeddata.logic;
23
24 import java.rmi.RemoteException JavaDoc;
25
26 import org.opensubsystems.core.error.OSSException;
27 import org.opensubsystems.core.logic.ModifiableDataController;
28 import org.opensubsystems.core.util.ThreeIntStruct;
29
30 /**
31  * Business logic related to managing mapped data.
32  *
33  * @version $Id: MappingController.java,v 1.4 2007/01/07 06:14:25 bastafidli Exp $
34  * @author Julian Legeny
35  * @code.reviewer Miro Halas
36  * @code.reviewed 1.2 2006/07/14 16:37:22 bastafidli
37  */

38 public interface MappingController extends ModifiableDataController
39 {
40    /**
41     * Delete mapped data
42     *
43     * @param iId - mapped data ID to be deleted. This is neither id1 nor id2 but
44     * the id of the record representing the relation.
45     * @throws OSSException - an error has occured
46     * @throws RemoteException - required since this method can be called remotely
47     */

48    void delete(
49       int iId
50    ) throws OSSException,
51             RemoteException JavaDoc;
52
53    /**
54     * Get array of mapped records for particular ID.
55     *
56     * @param iId - Id of the first data object in relation for which we want to
57     * retrieve Ids of the second objects in relation. This is id1
58     * specified during creation.
59     * @param iMappingType - mapping type the retrieved data belongs to
60     * @return int[] - array of ids of mapped data objects, these are id2 specified
61     * during creation.
62     * @throws OSSException - error during getting mapped data
63     * @throws RemoteException - required since this method can be called remotely
64     */

65    int[] getMappedData(
66       int iId,
67       int iMappingType
68    ) throws OSSException,
69             RemoteException JavaDoc;
70
71    /**
72     * Create mapped data.
73     *
74     * @param tisValues - IDs and mapping type that has to be added into mapping table
75     * 1st value = mapped ID from first table
76     * 2nd value = mapped ID from second table
77     * 3rd value = mapping type
78     * @throws OSSException - an error has occured creating mapped data
79     * @throws RemoteException - required since this method can be called remotely
80     */

81    void create(
82       ThreeIntStruct tisValues
83    ) throws OSSException,
84             RemoteException JavaDoc;
85
86    /**
87     * Delete mapped data
88     *
89     * @param tisValues - IDs and mapping type that has to be added into mapping table
90     * 1st value = mapped ID from first table
91     * 2nd value = mapped ID from second table
92     * 3rd value = mapping type
93     * @throws OSSException - an error has occured
94     * @throws RemoteException - required since this method can be called remotely
95     */

96    void delete(
97       ThreeIntStruct tisValues
98    ) throws OSSException,
99             RemoteException JavaDoc;
100 }
101
Popular Tags