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

tech.codingless.core.plugs.mybaties3.GenericQueryDao Maven / Gradle / Ivy

package tech.codingless.core.plugs.mybaties3;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import tech.codingless.core.plugs.mybaties3.annotation.OrderTypeEnum;
import tech.codingless.core.plugs.mybaties3.condition.ColumnSelector;
import tech.codingless.core.plugs.mybaties3.condition.QueryCondition;
import tech.codingless.core.plugs.mybaties3.condition.QueryConditionWrapper;
import tech.codingless.core.plugs.mybaties3.data.BaseDO;
import tech.codingless.core.plugs.mybaties3.data.PageRollResult;

public interface GenericQueryDao {

	Object selectOneRow(String sqlId, Object param);

	T selectOne(String sqlId, Object param);

	List selectList(String sqlId, Object param);

	T getEntity(Class clazz, String id);

	T getEntity(Class clazz, String id, String companyId);

	List list(Class clazz);

	List list(Class clazz, String companyId);

	List findByExample(Class clazz, ColumnSelector columns, T example, String orderColumn, OrderTypeEnum orderType, Integer size, Integer offset);

	PageRollResult rollPage(String namespace, String sqlId, Map param, Integer size, Integer page);

	List findEntityList(Class clazz, String companyId, Collection idList);

	List findEntityList(Class clazz, String companyId, Collection idList, Collection columns);

	Map selectOneNative(String prepareSql, List param);

	List select(Class clazz, Collection columns, Collection conditions, int offset, int limit);

	int count(Class clazz, Collection columns, Collection conditions);

	List> select(String selectId, Map param, int offset, int limit);

	List select(Class entityClass, ColumnSelector columns, QueryConditionWrapper wrapper, SerializableFunction sortColumn, OrderTypeEnum orderType, int offset, int limit);

	long count(Class entityClass, QueryConditionWrapper wrapper);

}