01: package com.technoetic.xplanner.domain.repository;
02:
03: import com.technoetic.xplanner.domain.DomainObject;
04:
05: public interface ObjectRepository {
06: /**
07: * Delete an object using it's object ID (OID).
08: * @param objectIdentifier
09: */
10: void delete(int objectIdentifier) throws RepositoryException;
11:
12: /**
13: * Load an instance of an object
14: * @param objectIdentifier
15: */
16: Object load(int objectIdentifier) throws RepositoryException;
17:
18: /**
19: * Create a new instance in the repository
20: * @param object the object to insert
21: * @return the object identifier
22: */
23: int insert(DomainObject object) throws RepositoryException;
24:
25: /**
26: * Updates an object in the repository. Note: This is a no-op for Hibernate.
27: * @param object - the object to update
28: */
29: void update(DomainObject object) throws RepositoryException;
30: }
|