jdbcTemplate.batchUpdate问题(jdbcTemplate.batchUpdate issue)
如何将其转换为返回jdbcTemplate.batchUpdate?
它需要执行到几个表。
@Override public int delete(int id) { String sql = "update user set deleted=1 where user_id = ?"; Object[] params = new Object[] { id }; try { return jdbcTemplate.update(sql, params); } catch (IncorrectResultSizeDataAccessException e) { throw new UserNotFoundException("User.not.found"); } }
How to convert this to return a jdbcTemplate.batchUpdate?
It needs to be executed to several tables.
@Override public int delete(int id) { String sql = "update user set deleted=1 where user_id = ?"; Object[] params = new Object[] { id }; try { return jdbcTemplate.update(sql, params); } catch (IncorrectResultSizeDataAccessException e) { throw new UserNotFoundException("User.not.found"); } }
原文:https://stackoverflow.com/questions/28671003
更新时间:2022-12-23 18:12
最满意答案
不要以这种方式存储文件 - 使用Persistable替代您的应用数据: http : //docs.blackberry.com/en/developers/deliverables/17952/Storing_objects_persistently_1219782_11.jsp
Don't store files this way - use Persistable for your app data instead: http://docs.blackberry.com/en/developers/deliverables/17952/Storing_objects_persistently_1219782_11.jsp
相关问答
更多-
我最终做了一个“我”的API调用。 如果OAuthException失败,我可以确定用户登录状态有问题。 Action
facebookMeCallbackAction = delegate (JSONObject jsonObject, GraphResponse graphResponse) { try { if (graphRes ... -
因为在显示启动画面之前您正在检查它是否是“第一次”打开应用程序: SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); if(!prefs.getBoolean("first_time", false)) { // Show splash } else { // Don't show splash } 这不是首先创建启动画面的正确方法 。 你不应该让你的用户通过创建一个计时器来等待启动画 ...
-
如果Facebook SDK在自己执行Facebook图形api请求时没有发现令牌无效,则需要强制iOS检查其令牌。 当您调用自己的服务器api(并为其提供令牌)并在那里代表用户进行呼叫时,这非常有用。 如果您发现令牌无效,那么告诉iOS 6令牌无效的唯一方法是: // Only do this if there is native Facebook Account support (iOS 6+) BOOL isFacebookAccountsAvailable = (&ACAccountTypeIden ...
-
购买完成后,您可以删除广告。 做类似的事情。 [bannerView removeFromSuperview]; 您只需在购买完成后隐藏广告即可。 When the purchase completes, it is up to you to remove the ads. Do something similar to this. [bannerView removeFromSuperview]; All you have to do is hide the ads when the purchase ...
-
如果我这样做,那么我将添加图像id作为按钮的值然后检索它,并删除相关的输入 $('.listImage').eq(window.lastUploadImageIndex).append('' + htmlEncode(imagefilename) + '不要以这种方式存储文件 - 使用Persistable替代您的应用数据: http : //docs.blackberry.com/en/developers/deliverables/17952/Storing_objects_persistently_1219782_11.jsp Don't store files this way - use Persistable for your app data instead: http://docs.blackberry.com/en/developers/ ...
保存添加和删除的用户(Save added and removed user)[2024-02-10]
只使用1个数组即可完成。 您只需创建一个新属性并将其设置为true( 如果已删除 ),否则设置为false。 然后在您的后端,您可以获取访问此属性的所有已删除项目。 请参阅以下示例 : (function() { 'use strict'; angular .module('app', []) .controller('demoController', demoController); demoController.$inject = ['$scope']; ...用户关闭所需应用程序时,辅助功能服务删除图标(Accessibility service remove icon when user close needed application)[2023-04-02]
我使用此代码来获取所有应用的事件: AccessibilityServiceInfo config = new AccessibilityServiceInfo(); config.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED; config.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC; config.notificationTimeout = 100; if (Bu ...确定用户是否仍未从其Facebook帐户中删除应用程序(Determine if user still hasn't removed App from his Facebook account)[2021-12-15]
在这里回答你的问题是我们为facebook连接做的一些事情 如果用户选择使用FB connect创建帐户,我们会获取firstname,lastname,email,fb_userid等详细信息,然后保存到我们的数据库中。 如果用户必须点击FB登录按钮,我们检查我们的数据库,如果API返回fb_userid在我们的数据库中并处理登录并授予用户页面访问权限。 因此,理想情况下,我们永远不会将fb_userid存储在cookie中,如果用户只是执行自动登录,则下次存储。 现在如果用户从FB中删除应用程序,因为我 ...好的,我已经解决了这个问题。 在这种情况下,您不需要使用su或su-devel。 默认情况下,所有pre / post rm / install脚本都由'root'运行。 要使这些脚本由'user'运行,我们只需要将以下字符串添加到aegis清单文件中:相关文章
更多- spring jdbctemplate batch 可以处理多少条记录
- 各们帮忙看一下,为什么spring引用不到jdbcTemplate?
- Spring2.5事务管理没有运行起来,哪里错了咧?
- solr python client
- ROR study
- Linux常用命令(整理)
- Bug分支-git入门教程
- jcseg-1.8.7版本发布 - 多配置适应+完整开发帮助文档
- 【第七章】 对JDBC的支持 之 7.5 集成Spring JDBC及最佳实践 ——跟我学spring3
- Newscoop 4.1 发布,适合记者的 CMS 系统
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)