All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ajaxjs.cms.app.attachment.Attachment_pictureDao Maven / Gradle / Ivy

The newest version!
package com.ajaxjs.cms.app.attachment;

import java.util.List;

import com.ajaxjs.framework.DataDict;
import com.ajaxjs.framework.IBaseDao;
import com.ajaxjs.orm.annotation.Delete;
import com.ajaxjs.orm.annotation.Select;
import com.ajaxjs.orm.annotation.TableName;
import com.ajaxjs.orm.annotation.Update;

@TableName(value = "attachment_picture", beanClass = Attachment_picture.class)
public interface Attachment_pictureDao extends IBaseDao {
	@Select("SElECT * FROM ${tableName} WHERE owner = ?")
	public List findByOwner(Long owner);

	@Delete("DELETE FROM ${tableName} WHERE `owner` = ?")
	boolean deleteByOwnerId(Long ownerUid);

	@Update("UPDATE ${tableName} SET `index` = ? WHERE id = ?")
	public int saveImgIndex(int index, Long imgId);

	@Select("SElECT * FROM ${tableName} WHERE owner = ? AND catelog = " + DataDict.PIC_in_GALLERY)
	public List findAttachmentPictureByOwner(Long owner);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy