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

org.jleopard.session.SqlSession Maven / Gradle / Ivy

Go to download

This is a lightweight complete ORM framework, which encapsulates a large number of commonly used SQL and implements multi-table Association query and paging query.

There is a newer version: 2.2.2
Show newest version
package org.jleopard.session;


import java.sql.ResultSet;
import java.util.List;

import org.jleopard.exception.SqlSessionException;
import org.jleopard.pageHelper.PageInfo;

/**
 * Copyright (c) 2018, Chen_9g 陈刚 ([email protected]).
 * 

* DateTime 2018/4/8 *

* Find a way for success and not make excuses for failure. * * @see com.leopardframework.core.session.sessionFactory.SessionDirectImpl * 管理与数据库操作的方法接口 */ public interface SqlSession { /** * -----------------------Save--------------------------------- **/ int Save(T entity) throws SqlSessionException; int SaveMore(List list) throws SqlSessionException; int MySql(String sql, Object... args) throws SqlSessionException; /** * -----------------------Delete--------------------------------- **/ int Delete(T entity) throws SqlSessionException; int Delete(Class cls, Object... primaryKeys) throws SqlSessionException; /** * -----------------------Update--------------------------------- **/ // int Update(Object entity) throws SQLException; int Update(T entity, Object primaryKey) throws SqlSessionException; /** * -----------------------Get--------------------------------- **/ ResultSet Get(String sql, Object... args) throws SqlSessionException; List Get(Class cls1, Class cls2, String where, Object... args) throws SqlSessionException; List Get(Class cls, String where, Object... args) throws SqlSessionException; T Get(T entity) throws SqlSessionException; List Get(Class cls, Object... primaryKeys) throws SqlSessionException; List Get(Class cls) throws SqlSessionException; PageInfo Get(Class cls, int page, int pageSize) throws SqlSessionException; PageInfo Get(Class cls1,Classcls2 ,int page, int pageSize) throws SqlSessionException; // List Get(String sql,Object... args); /** * -----------------------Commit and rollback--------------------------------- **/ void Commit()throws SqlSessionException; void Rollback() throws SqlSessionException; /** * -----------------------Close--------------------------------- **/ void Stop() throws SqlSessionException; void Close() throws SqlSessionException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy