久久久久久久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的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我正在使用 DynamoDBMapper,并且希望有條件地保存當(dāng)且僅當(dāng) hashkey 和 range 鍵組合不存在時(shí).我知道有一些方法可以使用 UUID 來(lái)減少發(fā)生沖突的可能性,但我想通過(guò)使用條件保存來(lái)保護(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 但是我無(wú)法指定條件是hashkey AND rangekey"不能存在.API 指定withConditionalOperator 方法,但我在課堂上看不到這個(gè).我也在使用來(lái)自 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的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                Local variables before return statements, does it matter?(return 語(yǔ)句之前的局部變量,這有關(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 存儲(chǔ)為 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>
                          主站蜘蛛池模板: 日本三级一区 | 丁香九月婷婷 | 国产农村妇女精品一二区 | 亚洲三级视频在线观看 | 国产一级片在线播放 | 日韩一区在线视频 | 黄色一及片 | 这里只有精品在线观看 | 国产精品久久久久久久久久 | 91免费看 | 狠狠操网| 午夜在线视频 | 国产精品伦子伦免费视频 | 亚洲一区成人 | 三年中文在线观看免费大全中国 | 国产香蕉视频 | 一级大片免费看 | 污视频网站在线观看 | 在线视频日本 | 蜜桃av一区二区三区 | 欧美揉bbbbb揉bbbbb | 91麻豆精品视频 | 成人毛片在线观看 | 午夜一级片| 中文字幕av久久爽av | 国产a久久麻豆入口 | 日韩在线视频一区二区三区 | 久久视频在线免费观看 | 日韩国产在线 | 午夜看看 | 国产成人精品一区二区三区视频 | 亚洲免费小视频 | 国产福利视频在线观看 | 国产日韩欧美亚洲 | 久久久久精 | 日韩精品大片 | 久艹视频在线观看 | 日韩在线一区二区三区 | xxxxx国产| 欧美一级精品 | 欧美一级片免费看 |