portal web service

PaperDao.java 1.2KB

    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.OrderBy; 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.Paper; @DAO public interface PaperDao { @Insert int insert(Connection con,Paper paper)throws SQLException; @Update int update(Connection con,Paper paper) throws SQLException; @SelectList @OrderBy(" ORDER BY YEAR DESC ") List<Paper> query(Connection con,String professorId) throws SQLException; @Nullable @SelectOne Paper queryOne(Connection con,String id)throws SQLException; @DeleteWith @From(Paper.class) int deleteWithProfessorId(Connection con,String professorId) throws SQLException; @DeleteWith @From(Paper.class) int delete(Connection con,String id)throws SQLException; }