|
package com.ekexiu.portal.dao;
import java.sql.Connection;
import java.sql.SQLException;
import org.jfw.apt.annotation.DefaultValue;
import org.jfw.apt.annotation.Nullable;
import org.jfw.apt.orm.annotation.dao.Column;
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.QueryVal;
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
import org.jfw.apt.orm.core.defaultImpl.IntHandler;
import com.ekexiu.portal.po.PaperAgree;
@DAO
public interface PaperAgreeDao {
@Insert
int insert(Connection con,PaperAgree pa) throws SQLException;
// @DeleteWith
// @From(PaperAgree.class)
// int delete(Connection con,String opId,String paperId) throws SQLException;
@DeleteWith
@From(PaperAgree.class)
int delete(Connection con,String paperId) throws SQLException;
@Nullable
@SelectOne
PaperAgree query(Connection con,String opId,String paperId) throws SQLException;
@QueryVal
@From(PaperAgree.class)
@Column(handlerClass = IntHandler.class, value = "COUNT(1)")
@DefaultValue("0")
int query(Connection con,String paperId) throws SQLException;
}
|