当前位置: 首页>>代码示例>>Java>>正文


Java SQLInsertClause.addBatch方法代码示例

本文整理汇总了Java中com.querydsl.sql.dml.SQLInsertClause.addBatch方法的典型用法代码示例。如果您正苦于以下问题:Java SQLInsertClause.addBatch方法的具体用法?Java SQLInsertClause.addBatch怎么用?Java SQLInsertClause.addBatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.querydsl.sql.dml.SQLInsertClause的用法示例。


在下文中一共展示了SQLInsertClause.addBatch方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insertPricing

import com.querydsl.sql.dml.SQLInsertClause; //导入方法依赖的package包/类
private void insertPricing(long facilityId, List<Pricing> pricing) {
    if (pricing != null && !pricing.isEmpty()) {
        SQLInsertClause insert = queryFactory.insert(qPricing);
        for (Pricing price : pricing) {
            insert.set(qPricing.facilityId, facilityId)
                    .set(qPricing.capacityType, price.capacityType)
                    .set(qPricing.usage, price.usage)
                    .set(qPricing.maxCapacity, price.maxCapacity)
                    .set(qPricing.dayType, price.dayType)
                    .set(qPricing.fromTime, price.time.from)
                    .set(qPricing.untilTime, price.time.until);
            pricingPriceMapping.populate(price.price, insert);
            insert.addBatch();
        }
        insert.execute();
    }
}
 
开发者ID:HSLdevcom,项目名称:parkandrideAPI,代码行数:18,代码来源:FacilityDao.java

示例2: insertPorts

import com.querydsl.sql.dml.SQLInsertClause; //导入方法依赖的package包/类
private void insertPorts(long facilityId, Map<Integer, Port> addedPorts) {
    if (addedPorts != null && !addedPorts.isEmpty()) {
        SQLInsertClause insert = queryFactory.insert(qPort);
        for (Entry<Integer, Port> entry : addedPorts.entrySet()) {
            populate(facilityId, entry.getKey(), entry.getValue(), insert);
            insert.addBatch();
        }
        insert.execute();
    }
}
 
开发者ID:HSLdevcom,项目名称:parkandrideAPI,代码行数:11,代码来源:FacilityDao.java

示例3: insertUnavailableCapacity

import com.querydsl.sql.dml.SQLInsertClause; //导入方法依赖的package包/类
private void insertUnavailableCapacity(long facilityId, List<UnavailableCapacity> unavailableCapacities) {
    if (unavailableCapacities != null && !unavailableCapacities.isEmpty()) {
        SQLInsertClause insert = queryFactory.insert(qUnavailableCapacity);
        for (UnavailableCapacity unavailableCapacity : unavailableCapacities) {
            insert.set(qUnavailableCapacity.facilityId, facilityId)
                    .set(qUnavailableCapacity.capacityType, unavailableCapacity.capacityType)
                    .set(qUnavailableCapacity.usage, unavailableCapacity.usage)
                    .set(qUnavailableCapacity.capacity, unavailableCapacity.capacity);
            insert.addBatch();
        }
        insert.execute();
    }
}
 
开发者ID:HSLdevcom,项目名称:parkandrideAPI,代码行数:14,代码来源:FacilityDao.java

示例4: insertAliases

import com.querydsl.sql.dml.SQLInsertClause; //导入方法依赖的package包/类
private void insertAliases(long facilityId, Collection<String> aliases) {
    if (aliases != null && !aliases.isEmpty()) {
        SQLInsertClause insertBatch = queryFactory.insert(qAlias);
        for (String alias : aliases) {
            insertBatch.set(qAlias.facilityId, facilityId);
            insertBatch.set(qAlias.alias, alias);
            insertBatch.addBatch();
        }
        insertBatch.execute();
    }
}
 
开发者ID:HSLdevcom,项目名称:parkandrideAPI,代码行数:12,代码来源:FacilityDao.java

示例5: insertHubFacilities

import com.querydsl.sql.dml.SQLInsertClause; //导入方法依赖的package包/类
private void insertHubFacilities(long hubId, Set<Long> facilityIds) {
    if (facilityIds != null && !facilityIds.isEmpty()) {
        SQLInsertClause insertBatch = queryFactory.insert(qHubFacility);
        for (Long facilityId : facilityIds) {
            insertBatch.set(qHubFacility.hubId, hubId);
            insertBatch.set(qHubFacility.facilityId, facilityId);
            insertBatch.addBatch();
        }
        insertBatch.execute();
    }
}
 
开发者ID:HSLdevcom,项目名称:parkandrideAPI,代码行数:12,代码来源:HubDao.java


注:本文中的com.querydsl.sql.dml.SQLInsertClause.addBatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。