1 package com.ibatis.sqlmap.engine.mapping.sql.raw; 2 3 import com.ibatis.sqlmap.engine.mapping.sql.Sql; 4 import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap; 5 import com.ibatis.sqlmap.engine.mapping.result.ResultMap; 6 import com.ibatis.sqlmap.engine.scope.StatementScope; 7 8 /** 9 * A non-executable SQL container simply for 10 * communicating raw SQL around the framework. 11 */ 12 public class RawSql implements Sql { 13 14 private String sql; 15 16 public RawSql(String sql) { 17 this.sql = sql; 18 } 19 20 public String getSql(StatementScope statementScope, Object parameterObject) { 21 return sql; 22 } 23 24 public ParameterMap getParameterMap(StatementScope statementScope, Object parameterObject) { 25 throw new RuntimeException ("Method not implemented on RawSql."); 26 } 27 28 public ResultMap getResultMap(StatementScope statementScope, Object parameterObject) { 29 throw new RuntimeException ("Method not implemented on RawSql."); 30 } 31 32 public void cleanup(StatementScope statementScope) { 33 throw new RuntimeException ("Method not implemented on RawSql."); 34 } 35 }