01: /**
02: * Copyright (C) 2001-2005 France Telecom R&D
03: */package org.objectweb.speedo.query.jdo;
04:
05: import org.objectweb.speedo.query.api.CompiledQuery;
06: import org.objectweb.speedo.query.api.QueryDefinition;
07: import org.objectweb.speedo.query.lib.SpeedoQueryManager;
08:
09: /**
10: * Is the JDO personality of the SpeedoQueryManager.
11: *
12: * @author S.Chassande-Barrioz
13: */
14: public class JDOQueryManager extends SpeedoQueryManager {
15:
16: protected CompiledQuery createCompileQuery(QueryDefinition qd) {
17: JDOAbstractCompiledQuery scq;
18: if (qd.getQueryType() == QueryDefinition.TYPE_DELETE) {
19: scq = new JDOCompiledDeleteQuery();
20: } else {
21: scq = new JDOCompiledSelectQuery();
22: }
23: scq.init(cqlogger, cqpvlogger, cqpflogger, mapper,
24: prefetchBufferFactory, jormFactory);
25: scq.defineQuery((JDOQueryDefinitionImpl) qd);
26: return scq;
27: }
28:
29: }
|