package com.ekexiu.portal.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import org.jfw.apt.annotation.Nullable;
import org.jfw.apt.orm.annotation.dao.DAO;
import org.jfw.apt.orm.annotation.dao.method.From;
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
import org.jfw.apt.orm.annotation.dao.method.operator.Update;

import com.ekexiu.portal.po.PartTimeJob;

@DAO
public interface PartTimeJobDao {
	@Insert
	int insert(Connection con,PartTimeJob job)throws SQLException;	
	
	@Update
	int update(Connection con,PartTimeJob job) throws SQLException;
	
	@SelectList
	List<PartTimeJob> query(Connection con,String professorId) throws SQLException;
	
	@Nullable
	@SelectOne
	PartTimeJob queryOne(Connection con,String id)throws SQLException;
	
	@DeleteWith
	@From(PartTimeJob.class)
	int deleteWithProfessorId(Connection con,String professorId) throws SQLException;
	
	@DeleteWith
	@From(PartTimeJob.class)
	int delete(Connection con,String id)throws SQLException;	
}
