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

group.rober.dataform.handler.DataOneHandler Maven / Gradle / Ivy

There is a newer version: 3.2.2
Show newest version
package group.rober.dataform.handler;

import group.rober.dataform.model.DataForm;
import group.rober.dataform.validator.ValidateResult;

import java.util.Map;

/**
 * 单一记录的查询,保存处理
 * Created by tisir [email protected] on 2017-05-29
 */
public interface DataOneHandler extends DataObjectHandler {

    /**
     * 根据DataForm创建数据对象
     *
     * @param dataForm dataForm
     * @return T
     */
    T createDataObject(DataForm dataForm);

    /**
     * 查询单个数据对象
     *
     * @param dataForm dataForm
     * @param queryParameters queryParameters
     * @return T
     */
    T query(DataForm dataForm, Map queryParameters);

    /**
     * 插入
     *
     * @param dataForm dataForm
     * @param object object
     * @return int
     */
    int insert(DataForm dataForm, T object);

    /**
     * 更新
     *
     * @param dataForm dataForm
     * @param object object
     * @return int
     */
    int update(DataForm dataForm, T object);

    /**
     * 保存列表数据
     *
     * @param dataForm dataForm
     * @param object object
     * @return int
     */
    int save(DataForm dataForm, T object);

    /**
     * 删除列表数据
     *
     * @param dataForm dataForm
     * @param object object
     * @return int
     */
    int delete(DataForm dataForm,T object);

    /**
     * 校验数据
     *
     * @param dataForm dataForm
     * @param object object
     * @return ValidateResult
     */
    ValidateResult validate(DataForm dataForm, T object);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy