⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basedao.java

📁 一个关于tlms的一个小程序 看看能否帮助到别人
💻 JAVA
字号:
package com.szmx.framework.base.dao;

import com.szmx.framework.base.model.Pagination;

import java.io.Serializable;
import java.util.List;
import java.util.Collection;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;


/**
 * Data Access Object (Dao) interface.   This is an interface
 * used to tag our Dao classes and to provide common methods to all DAOs.
 *
 * <p><a href="Dao.java.html"><i>View Source</i></a></p>
 *
 * @author <a href="mailto:matt@raibledesigns.szmx">Matt Raible</a>
 */
public interface BaseDao {
    
    /**
     * Generic method used to get all objects of a particular type. This
     * is the same as lookup up all rows in a table.
     * @param clazz the type of objects (a.k.a. while table) to get data from
     * @return List of populated objects
     */
    public List getAllObject(Class clazz);

    /**
     * Generic method to get an object based on class and identifier.
     * 
     * @param clazz model class to lookup
     * @param id the identifier (primary key) of the class
     * @return a populated object
     */
    public Object getObject(Class clazz, Serializable id);

    /**
     * Generic method to save an object - handles both update and insert.
     * @param o the object to save
     */
    public void saveObject(Object o);

    /**
     * Generic method to delete an object based on class and id
     * @param clazz model class to lookup
     * @param id the identifier (primary key) of the class
     */
    public void removeObject(Class clazz, Serializable id);

    public void removeObject(Object o);

    public void removeAllObject(Collection collection);

//    protected Pagination findPageByCriteria(final DetachedCriteria detachedCriteria, final Pagination pageObj);
//
//    protected Pagination findPageByCombinedHsql(final String sqlId, final Map paraMap, Pagination pagination);

    public Object findBy(Class clazz , String name, Object value);

    public List findLike(Class clazz, String name, String value);

    public List findAllBy(Class clazz , String name, Object value);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -