io.github.icodegarden.nutrient.lang.repository.Repository Maven / Gradle / Ivy
The newest version!
package io.github.icodegarden.nutrient.lang.repository;
import java.util.Collection;
import java.util.List;
import io.github.icodegarden.nutrient.lang.query.BaseQuery;
/**
*
* @author Fangfang.Xu
*
*/
public interface Repository {
void add(PO po);
default void addBatch(Collection pos) {
pos.forEach(this::add);
}
int update(U update);
int updateBatch(Collection updates);
int updateByQuery(U update, Q query);
List findAll(Q query);
DO findOne(ID id, W with);
List findByIds(List ids, W with);
long count(Q query);
int delete(ID id);
int deleteBatch(Collection ids);
int deleteByQuery(Q query);
void increment(ID id, String fieldName, long value);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy