01: /*
02: Copyright (C) 2007 Mobixess Inc. http://www.java-objects-database.com
03:
04: This file is part of the JODB (Java Objects Database) open source project.
05:
06: JODB is free software; you can redistribute it and/or modify it under
07: the terms of version 2 of the GNU General Public License as published
08: by the Free Software Foundation.
09:
10: JODB is distributed in the hope that it will be useful, but WITHOUT ANY
11: WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: for more details.
14:
15: You should have received a copy of the GNU General Public License along
16: with this program; if not, write to the Free Software Foundation, Inc.,
17: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18: */
19: package com.mobixess.jodb.core.plugin;
20:
21: import java.io.IOException;
22: import java.lang.reflect.Field;
23:
24: import com.mobixess.jodb.core.JodbIOException;
25: import com.mobixess.jodb.core.JODBConstants.COMPARE_RESULT;
26: import com.mobixess.jodb.core.io.JODBOperationContext;
27: import com.mobixess.jodb.core.io.ObjectDataContainer;
28: import com.mobixess.jodb.core.transaction.JODBSession;
29:
30: public interface IClassProcessor<OriginalClazz, TranslatedClazz>
31: extends IPugin<OriginalClazz> {
32: TranslatedClazz translate(OriginalClazz objectToTranslate)
33: throws JodbIOException;
34:
35: OriginalClazz composeInstance(Class type,
36: ObjectDataContainer persistentDataContainer,
37: JODBSession session) throws IOException;
38:
39: void activate(OriginalClazz incompleteInstance,
40: ObjectDataContainer persistentDataContainer,
41: JODBSession session, int activationDepth,
42: boolean delayedActivation) throws IOException;
43:
44: COMPARE_RESULT compare(OriginalClazz value1, OriginalClazz value2,
45: JODBOperationContext context, Field[] fieldsToIgnore);
46:
47: boolean equals(OriginalClazz value1, OriginalClazz value2,
48: JODBOperationContext context, Field[] fieldsToIgnore);
49:
50: COMPARE_RESULT compare(TranslatedClazz translatedValue1,
51: ObjectDataContainer value2, JODBOperationContext context,
52: Field[] fieldsToIgnore) throws IOException;
53:
54: boolean equals(TranslatedClazz translatedValue1,
55: ObjectDataContainer value2, JODBOperationContext context,
56: Field[] fieldsToIgnore) throws IOException;
57: }
|