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: import com.completex.objective.components.log.Log;
12: import com.completex.objective.components.persistency.core.impl.UpdateQueryBuilderImpl;
13: import com.completex.objective.components.persistency.transact.Transaction;
14:
15: import java.sql.SQLException;
16: import java.util.List;
17:
18: /**
19: * Under construction
20: *
21: * @author Gennady Krizhevsky
22: */
23: public interface UpdateQueryBuilder {
24: StringBuffer getUpdateSqlHeader(String tableName);
25:
26: int addToHeaderUpdateBuffer(
27: Transaction transaction,
28: int countUpdated,
29: StringBuffer update,
30: Record record,
31: int fieldIndex,
32: boolean supportKeyUpdate,
33: UpdateQueryBuilderImpl.AddToUpdateBufferPlugin addToUpdateBufferPlugin,
34: Log log, boolean complexDirty) throws SQLException;
35:
36: Parameters primaryKeyValues(Record record);
37:
38: Parameters optLockKeyValues(Record record);
39:
40: Parameters keyValues(List keys, Record record);
41:
42: boolean considerDirtyForUpdate(Record record, int fieldIndex,
43: boolean supportKeyUpdate, Log log)
44: throws OdalPersistencyException;
45:
46: public static interface AddToUpdateBufferPlugin {
47: void beforeAddToUpdateBuffer(Transaction transaction,
48: Record record, int i, boolean complexDirty)
49: throws SQLException;
50: }
51:
52: }
|