久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <tfoot id='RmBHw'></tfoot>
  1. <small id='RmBHw'></small><noframes id='RmBHw'>

    1. <legend id='RmBHw'><style id='RmBHw'><dir id='RmBHw'><q id='RmBHw'></q></dir></style></legend>

      • <bdo id='RmBHw'></bdo><ul id='RmBHw'></ul>
    2. <i id='RmBHw'><tr id='RmBHw'><dt id='RmBHw'><q id='RmBHw'><span id='RmBHw'><b id='RmBHw'><form id='RmBHw'><ins id='RmBHw'></ins><ul id='RmBHw'></ul><sub id='RmBHw'></sub></form><legend id='RmBHw'></legend><bdo id='RmBHw'><pre id='RmBHw'><center id='RmBHw'></center></pre></bdo></b><th id='RmBHw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RmBHw'><tfoot id='RmBHw'></tfoot><dl id='RmBHw'><fieldset id='RmBHw'></fieldset></dl></div>

      用于條件保存的 DynamoDBMapper

      DynamoDBMapper for conditional saves(用于條件保存的 DynamoDBMapper)

      <legend id='35Ufc'><style id='35Ufc'><dir id='35Ufc'><q id='35Ufc'></q></dir></style></legend>
            <bdo id='35Ufc'></bdo><ul id='35Ufc'></ul>
          • <small id='35Ufc'></small><noframes id='35Ufc'>

                <i id='35Ufc'><tr id='35Ufc'><dt id='35Ufc'><q id='35Ufc'><span id='35Ufc'><b id='35Ufc'><form id='35Ufc'><ins id='35Ufc'></ins><ul id='35Ufc'></ul><sub id='35Ufc'></sub></form><legend id='35Ufc'></legend><bdo id='35Ufc'><pre id='35Ufc'><center id='35Ufc'></center></pre></bdo></b><th id='35Ufc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='35Ufc'><tfoot id='35Ufc'></tfoot><dl id='35Ufc'><fieldset id='35Ufc'></fieldset></dl></div>
                  <tbody id='35Ufc'></tbody>
                <tfoot id='35Ufc'></tfoot>

                本文介紹了用于條件保存的 DynamoDBMapper的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在使用 DynamoDBMapper,并且希望有條件地保存當(dāng)且僅當(dāng) hashkey 和 range 鍵組合不存在時(shí).我知道有一些方法可以使用 UUID 來減少發(fā)生沖突的可能性,但我想通過使用條件保存來保護(hù)自己.

                I'm using DynamoDBMapper and would like to conditionally save if and only if the hashkey and range key combination does not exist. I know there are ways to use UUIDs to reduce the possibility of a collision but I would like to protect myself by using conditional saves.

                我遇到了這篇文章 使用 DynamoDBSaveExpression 但是我無法指定條件是hashkey AND rangekey"不能存在.API 指定withConditionalOperator 方法,但我在課堂上看不到這個(gè).我也在使用來自 here 的最新 aws java sdk.

                I came across this article that uses DynamoDBSaveExpression however I'm not able to specify that the condition is "hashkey AND rangekey" cannot exist. The API specifies a withConditionalOperator method but I'm not able to see this in my class. I am using the latest aws java sdk also from here.

                關(guān)于如何有條件地保存的任何建議?或者我可能做錯(cuò)了什么?

                Any suggestions on how to conditionally save? Or what I may be doing incorrectly?

                推薦答案

                DynamoDBSaveExpression saveExpression = new DynamoDBSaveExpression();
                Map<String, ExpectedAttributeValue> expectedAttributes = 
                    ImmutableMap.<String, ExpectedAttributeValue>builder()
                        .put("hashKey", new ExpectedAttributeValue(false))
                        .put("rangeKey", new ExpectedAttributeValue(false))
                        .build();
                saveExpression.setExpected(expectedAttributes);
                saveExpression.setConditionalOperator(ConditionalOperator.AND);
                try {
                    dynamoDBMapper.save(objectToSave, saveExpression);
                } catch (ConditionalCheckFailedException e) {
                    //Handle conditional check
                }
                

                這使用 public ExpectedAttributeValue(Boolean exists) 構(gòu)造函數(shù),它只是在內(nèi)部調(diào)用 setExists.

                This uses the public ExpectedAttributeValue(Boolean exists) constructor, which just internally calls setExists.

                這篇關(guān)于用于條件保存的 DynamoDBMapper的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數(shù)溢出?)
                Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                Inconsistent behavior on java#39;s ==(java的行為不一致==)
                Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲為 int?)
                <tfoot id='HfOW6'></tfoot>

                  • <i id='HfOW6'><tr id='HfOW6'><dt id='HfOW6'><q id='HfOW6'><span id='HfOW6'><b id='HfOW6'><form id='HfOW6'><ins id='HfOW6'></ins><ul id='HfOW6'></ul><sub id='HfOW6'></sub></form><legend id='HfOW6'></legend><bdo id='HfOW6'><pre id='HfOW6'><center id='HfOW6'></center></pre></bdo></b><th id='HfOW6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HfOW6'><tfoot id='HfOW6'></tfoot><dl id='HfOW6'><fieldset id='HfOW6'></fieldset></dl></div>

                      <bdo id='HfOW6'></bdo><ul id='HfOW6'></ul>

                            <tbody id='HfOW6'></tbody>

                          <small id='HfOW6'></small><noframes id='HfOW6'>

                          <legend id='HfOW6'><style id='HfOW6'><dir id='HfOW6'><q id='HfOW6'></q></dir></style></legend>
                          主站蜘蛛池模板: a级毛片毛片免费观看久潮喷 | 国产一二三区电影 | 91欧美精品成人综合在线观看 | 欧洲av一区 | 97免费在线观看视频 | 日韩精品 电影一区 亚洲 | 亚洲最色网站 | 免费的日批视频 | 欧美在线a | 三级在线免费观看 | 欧美日韩三级 | www.日日干| 亚洲欧美一区二区三区国产精品 | 网色| 亚洲一av | 成人一区二区三区在线观看 | 久久精品欧美一区二区三区不卡 | 日韩视频二区 | 欧美视频xxx | 中文字幕日韩欧美一区二区三区 | 午夜精品一区二区三区在线视频 | 中文av在线播放 | 中文字幕日韩欧美一区二区三区 | 日韩精品a在线观看图片 | 超碰97人人人人人蜜桃 | 九九九久久国产免费 | 久久国产精品视频免费看 | 久久久人 | 日韩1区2区| 欧美日韩在线免费观看 | 秋霞在线一区 | 精品美女视频在线观看免费软件 | 欧美一级片中文字幕 | 亚洲综合色视频在线观看 | 欧美日韩中文在线观看 | 久久久久国产一区二区三区四区 | 成人黄在线观看 | 亚洲高清免费视频 | 精品在线一区二区三区 | 91影库 | 韩国精品一区二区三区 |