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

com.flyfish.oauth.configuration.sync.SyncDomainService Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package com.flyfish.oauth.configuration.sync;

import java.util.List;

/**
 * 同步对象的服务
 *
 * @author wangyu
 */
public interface SyncDomainService {

    /**
     * 通过唯一标识查询单个实体
     *
     * @return 结果
     */
    T getOne(Object identifier);

    /**
     * 查询列表
     *
     * @return 结果
     */
    List getList(List identifiers);

    /**
     * 新增若干实体
     *
     * @param list 列表
     * @return 结果
     */
    List saveAll(List list);

    /**
     * 更新所有实体
     *
     * @param list 列表
     * @return 结果
     */
    List updateAll(List list);

    /**
     * 删除所有指定实体
     *
     * @param list 要删除的列表
     * @return 结果
     */
    List deleteAll(List list);

    /**
     * 获取目标对象的唯一标识,由系统间协商
     *
     * @param item 数据
     * @return 结果
     * 当结果为空时,返回null
     */
    Object identifier(T item);
}