1 package org.apache.fulcrum.security.torque.peer;
2 /*
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 */
20 import java.sql.Connection;
21 import java.util.List;
22
23 import org.apache.torque.NoRowsException;
24 import org.apache.torque.TooManyRowsException;
25 import org.apache.torque.TorqueException;
26 import org.apache.torque.criteria.Criteria;
27 import org.apache.torque.map.TableMap;
28
29 /**
30 * This extension to the marker interface {@linkplain Peer} is to allow for swappable Peer implementations
31 * in Turbine Torque Manager Implementations.
32 *
33 * @param <T> The data object type used by the Torque PeerImpl class.
34 *
35 * @author <a href="mailto:gk@apache.org">Georg Kallidis</a>
36 * @version $Id$
37 */
38 public interface TorqueTurbinePeer<T>
39 extends Peer
40 {
41
42 TableMap getTableMap() throws TorqueException;
43
44 List<T> doSelect( Criteria criteria,
45 Connection connection) throws TorqueException;
46
47 T retrieveByPK(Integer pk, Connection con)
48 throws TorqueException, NoRowsException, TooManyRowsException;
49
50 }