java/sql-dk/src/info/globalcode/sql/dk/SQLCommand.java
branchv_0
changeset 35 b2ff3b2d58b2
parent 34 9335cf31c0f2
child 37 9e6f8e5d5f98
equal deleted inserted replaced
34:9335cf31c0f2 35:b2ff3b2d58b2
    34 	public SQLCommand(COMMAND_TYPE commandType, String query) {
    34 	public SQLCommand(COMMAND_TYPE commandType, String query) {
    35 		this.commandType = commandType;
    35 		this.commandType = commandType;
    36 		this.query = query;
    36 		this.query = query;
    37 	}
    37 	}
    38 
    38 
    39 	public abstract PreparedStatement prepareStatement(Connection c) throws SQLException;
    39 	public PreparedStatement prepareStatement(Connection c) throws SQLException {
       
    40 		return c.prepareStatement(query);
       
    41 	}
    40 
    42 
    41 	public abstract void parametrize(PreparedStatement ps) throws SQLException;
    43 	public abstract void parametrize(PreparedStatement ps) throws SQLException;
    42 
    44 
    43 	public abstract List<? extends Parameter> getParameters();
    45 	public abstract List<? extends Parameter> getParameters();
    44 
    46