org.onetwo.common.db.spi.CrudEntityManager Maven / Gradle / Ivy
package org.onetwo.common.db.spi;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.onetwo.common.db.builder.QueryBuilder;
import org.onetwo.common.utils.Page;
public interface CrudEntityManager {
int batchInsert(Collection entities);
T load(PK id);
T findById(PK id);
Optional findOptionalById(PK id);
/*****
* insert or update
* @param entity
* @return
*/
T save(T entity);
void update(T entity);
void dymanicUpdate(T entity);
void persist(T entity);
// T createNew(T entity);
// T updateAttributes(T entity);
T remove(T entity);
void removes(Collection entities);
T removeById(PK id);
Collection removeByIds(PK[] id);
int removeAll();
List findAll();
Number countRecord(Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy