com.github.aidensuen.mongo.common.base.delete.DeleteDao Maven / Gradle / Ivy
package com.github.aidensuen.mongo.common.base.delete;
import com.github.aidensuen.mongo.annotation.DeleteProvider;
import com.github.aidensuen.mongo.annotation.RegisterMongoDao;
import com.github.aidensuen.mongo.command.OperationType;
import com.github.aidensuen.mongo.mapping.ExampleStr;
import com.github.aidensuen.mongo.provider.base.BaseDeleteProvider;
import org.springframework.data.mongodb.core.query.Query;
/**
* Generic Dao delete interface
*
* @param Can not be null
* @author aidensuen
*/
@RegisterMongoDao
public interface DeleteDao {
/**
* delete by record's properties
*
* @param record
* @return
*/
@DeleteProvider(type = BaseDeleteProvider.class, operationType = OperationType.DELETE)
int delete(T record);
/**
* delete by query
*
* @param query
* @return
*/
@DeleteProvider(type = BaseDeleteProvider.class, operationType = OperationType.DELETE)
int delete(Query query);
/**
* delete by exampleStr
*
* @param exampleStr
* @return
*/
@DeleteProvider(type = BaseDeleteProvider.class, operationType = OperationType.DELETE)
int delete(ExampleStr exampleStr);
}