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

com.github.aidensuen.mongo.common.base.delete.DeleteDao Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
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);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy