package me.chyxion.tigon.service;

import me.chyxion.tigon.mybatis.Search;
import javax.validation.constraints.NotNull;
import org.springframework.validation.annotation.Validated;
import me.chyxion.tigon.validation.annotation.NotNullOrBlank;

/**
 * @version 0.0.1
 * @since 0.0.1
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Nov 7, 2016 4:20:42 PM
 */
@Validated
public interface BaseDeleteService<PrimaryKey> {

    /**
     * delete by search
     * @param search search
     */
    int delete(@NotNull Search search);
    
    /**
     * delete by primaryKey
     * @param primaryKey primaryKey
     */
    int delete(@NotNullOrBlank PrimaryKey primaryKey);
}
