1 56 package org.objectstyle.cayenne.dba.db2; 57 58 import org.objectstyle.cayenne.access.jdbc.SQLTemplateAction; 59 import org.objectstyle.cayenne.dba.DbAdapter; 60 import org.objectstyle.cayenne.dba.JdbcActionBuilder; 61 import org.objectstyle.cayenne.map.EntityResolver; 62 import org.objectstyle.cayenne.query.Query; 63 import org.objectstyle.cayenne.query.SQLAction; 64 import org.objectstyle.cayenne.query.SQLTemplate; 65 66 69 public class DB2ActionBuilder extends JdbcActionBuilder { 70 71 public DB2ActionBuilder(DbAdapter adapter, EntityResolver resolver) { 72 super(adapter, resolver); 73 } 74 75 79 protected SQLAction interceptRawSQL(SQLAction action) { 80 81 if (action instanceof SQLTemplateAction) { 83 ((SQLTemplateAction) action).setRemovingLineBreaks(true); 84 } 85 return action; 86 } 87 88 public SQLAction sqlAction(SQLTemplate query) { 89 return interceptRawSQL(super.sqlAction(query)); 90 } 91 92 public SQLAction updateAction(Query query) { 93 return interceptRawSQL(super.updateAction(query)); 96 } 97 } 98 | Popular Tags |