Package com.quickorm.entity

Examples of com.quickorm.entity.SqlAndArgumentsData


        //实体类
        Class entityClass = t.getClass();
        //实体元数据
        EntityMetaData entityMetaData = getEntityMetaData(entityClass);
        //得到SQL语句与参数
        SqlAndArgumentsData sqlAndArgumentsData = entityMetaData.getInsertSqlAndArgumentData(t, dialect);
        int rowCount = this.executeUpdate(sqlAndArgumentsData.getSql(), sqlAndArgumentsData.getArgumentList(), null);
        if (rowCount <= 0) {
            throw new DataAccessException("更改的数据行数为0!");
        }
    }
View Full Code Here


        //实体类
        Class entityClass = tList.get(0).getClass();
        //实体元数据
        EntityMetaData entityMetaData = getEntityMetaData(entityClass);
        //得到SQL语句与参数
        SqlAndArgumentsData sqlAndArgumentsData = entityMetaData.getBatchInsertSqlAndArgumentData(tList, dialect);
        int[] rowCountArray = this.executeBatchUpdate(sqlAndArgumentsData.getSql(), sqlAndArgumentsData.getArgumentListList());
        for (int i = 0; i <= rowCountArray.length - 1; i++) {
            int rowCount = rowCountArray[i];
            if (rowCount <= 0) {
                throw new DataAccessException(String.format("第%s行更改的数据行数为0!", i));
            }
View Full Code Here

TOP

Related Classes of com.quickorm.entity.SqlAndArgumentsData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.