01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency;
10:
11: /**
12: * Persistency used for inserts only. It is appropriate to store values in files
13: * for example.
14: *
15: * @author Gennady Krizhevsky
16: */
17: public interface InsertPersistency {
18: /**
19: * Insert persistent object
20: *
21: * @param persistentObject
22: * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
23: * @throws DuplicateRecordException
24: * if duplicate record is detected
25: * @throws OdalPersistencyException
26: *
27: */
28: int insert(PersistentObject persistentObject)
29: throws OdalPersistencyException;
30:
31: /**
32: * Insert persistent object
33: *
34: * @param persistentObject
35: * @param controller
36: * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
37: * @throws DuplicateRecordException
38: *
39: * @throws OdalPersistencyException
40: *
41: */
42: int insert(PersistentObject persistentObject,
43: LifeCycleController controller)
44: throws OdalPersistencyException;
45: }
|