/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2021 . All rights reserved.
 *
 */
package net.northking.cctp.common.saas.db;


import net.northking.cctp.common.db.PaginationService;

/**
 * 租户模式下设置租户ID
 *
 * @author : xiusong.xie
 * @version : 1.0
 */
public abstract class TenantPaginationService<T> extends PaginationService<T> implements TenantDBService
{

  @Override
  public int deleteByExample(T record)
  {
    initTenantId(record);
    return super.deleteByExample(record);
  }

  @Override
  protected void beforeUpdate(T record)
  {
    initTenantId(record);
  }

  @Override
  protected void beforeInsert(T record)
  {
    initTenantId(record);
  }

  @Override
  protected void beforeQuery(T record)
  {
    initTenantId(record);
    super.beforeQuery(record);
  }
}
