Source code: org/roller/business/persistence/PersistenceStrategy.java
1 /*
2 * Created on Aug 13, 2003
3 */
4 package org.roller.business.persistence;
5
6 import org.roller.RollerException;
7 import org.roller.pojos.PersistentObject;
8
9 import java.util.List;
10
11 /**
12 * Persistence strategy masks underlying persistence mechanism.
13 * @author Lance Lavandowska
14 * @author Dave Johnson
15 */
16 public interface PersistenceStrategy
17 {
18 public void release() throws RollerException;
19
20 public PersistentObject retrievePersistentObject(
21 String id, Class cls) throws RollerException;
22
23 public PersistentObject storePersistentObject(PersistentObject data)
24 throws RollerException;
25
26 public void removePersistentObject(String id, Class cls)
27 throws RollerException;
28
29 public List query(String query, Object[] args, Object[] types)
30 throws RollerException;
31
32 public void commit() throws RollerException;
33
34 public void rollback() throws RollerException;
35
36 public QueryFactory getQueryFactory();
37 }