01: package sample.dms;
02:
03: /**
04: *
05: * @author Ben Alex
06: * @version $Id: DocumentDao.java 1784 2007-02-24 21:00:24Z luke_t $
07: *
08: */
09: public interface DocumentDao {
10: /**
11: * Creates an entry in the database for the element.
12: *
13: * @param element an unsaved element (the "id" will be updated after method is invoked)
14: */
15: public void create(AbstractElement element);
16:
17: /**
18: * Removes a file from the database for the specified element.
19: *
20: * @param file the file to remove (cannot be null)
21: */
22: public void delete(File file);
23:
24: /**
25: * Modifies a file in the database.
26: *
27: * @param file the file to update (cannot be null)
28: */
29: public void update(File file);
30:
31: /**
32: * Locates elements in the database which appear under the presented directory
33: *
34: * @param directory the directory (cannot be null - use {@link Directory#ROOT_DIRECTORY} for root)
35: * @return zero or more elements in the directory (an empty array may be returned - never null)
36: */
37: public AbstractElement[] findElements(Directory directory);
38: }
|