portal web service

ImageDao.java 2.0KB

    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.UpdateWith; import org.jfw.apt.orm.annotation.dao.param.Set; import com.ekexiu.portal.po.Image; @DAO public abstract class ImageDao { @Insert public abstract int insert(Connection con, Image image) throws SQLException; @UpdateWith @From(Image.class) public abstract int updateSort(Connection con, String imageId, @Set int sort) throws SQLException; @UpdateWith @From(Image.class) public abstract int updateAllSort(Connection con, String resourceId, @Set int sort) throws SQLException; @SelectOne @Nullable public abstract Image query(Connection con, String imageId) throws SQLException; @SelectList public abstract List<Image> query(Connection con) throws SQLException; @SelectOne @Nullable public abstract Image queryOne(Connection con, String resourceId) throws SQLException; @SelectList public abstract List<Image> queryRes(Connection con, String resourceId) throws SQLException; @DeleteWith @From(Image.class) public abstract int deleteId(Connection con, String imageId) throws SQLException; @DeleteWith @From(Image.class) public abstract int deleteSrc(Connection con, String imageSrc) throws SQLException; @DeleteWith @From(Image.class) public abstract int deleteRes(Connection con, String resourceId) throws SQLException; @DeleteWith @From(Image.class) public abstract int deleteBySort(Connection con, String resourceId, int sort) throws SQLException; }