⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coursedaojdbc.java

📁 Sample for Spring coding
💻 JAVA
字号:
package com.springinaction.training.dao.jdbc;

import java.util.HashSet;
import java.util.Set;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.springinaction.training.dao.CourseDao;
import com.springinaction.training.model.Course;

public class CourseDaoJdbc extends JdbcDaoSupport
    implements CourseDao {
	
  public void save(Course course) {
    throw new RuntimeException("Method not implemented yet.");
	}

	public Course findById(Integer id) {
    throw new RuntimeException("Method not implemented yet.");
	}

	public void update(Course course) {
    throw new RuntimeException("Method not implemented yet.");
	}

  public Set findAll() {
    String sql = 
        "select id, name, description, startDate, endDate " +
        "from course";
    CourseMappingQuery query = 
        new CourseMappingQuery(getDataSource(), sql);
    return new HashSet(query.execute());
  }

  public int getEnrollment(Course course) {
    throw new RuntimeException("Method not implemented yet.");
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -