@Test public void update処理が正常に終了する() { EsIndex index = esClient.idxUser(UNIT_PREFIX, UNIT_USER_NAME); assertNotNull(index); DavNodeAccessor davNodeAccessor = new DavNodeAccessor(index, TYPE_NAME, ROUTING_ID); DavNode davNode = createTestDavNode(); DcIndexResponse createResponse = davNodeAccessor.create(davNode); assertNotNull(createResponse); assertFalse(createResponse.getId().equals("")); long dateTime = new Date().getTime(); davNode.setUpdated(dateTime); DcIndexResponse updateResponse = davNodeAccessor.update(createResponse.getId(), davNode); assertNotNull(updateResponse); assertEquals(createResponse.getId(), updateResponse.getId()); if (davNodeAccessor.getAds() != null) { JdbcAds ads = null; try { ads = new JdbcAds(); List<JSONObject> list = ads.getDavNodeList(INDEX_NAME, 0, 1); assertEquals(1, list.size()); assertEquals(dateTime, Long.parseLong((String) ((JSONObject) list.get(0).get("source")).get("u"))); } catch (Exception e) { fail(e.getMessage()); } } davNodeAccessor.delete(davNode); }
public DcIndexResponse update(String id, DavNode davNode) { return this.update(id, davNode, -1); }
DavNodeAccessor extends DataSourceAccessor { public DcIndexResponse update(String id, DavNode davNode) { return this.update(id, davNode, -1); } }
DavNodeAccessor extends DataSourceAccessor { public DcIndexResponse update(String id, DavNode davNode) { return this.update(id, davNode, -1); } DavNodeAccessor(EsIndex index, String name, String routingId); }
DavNodeAccessor extends DataSourceAccessor { public DcIndexResponse update(String id, DavNode davNode) { return this.update(id, davNode, -1); } DavNodeAccessor(EsIndex index, String name, String routingId); DcIndexResponse create(final DavNode davNode); DcIndexResponse create(String id, DavNode davNode); DcActionResponse createForFile(String id, DavNode davNode); DcDeleteResponse delete(DavNode davNode); DcDeleteResponse delete(DavNode davNode, long version); DcIndexResponse update(String id, DavNode davNode); DcIndexResponse update(String id, DavNode davNode, long version); DcIndexResponse updateForFile(String id, DavNode davNode, long version); }
DavNodeAccessor extends DataSourceAccessor { public DcIndexResponse update(String id, DavNode davNode) { return this.update(id, davNode, -1); } DavNodeAccessor(EsIndex index, String name, String routingId); DcIndexResponse create(final DavNode davNode); DcIndexResponse create(String id, DavNode davNode); DcActionResponse createForFile(String id, DavNode davNode); DcDeleteResponse delete(DavNode davNode); DcDeleteResponse delete(DavNode davNode, long version); DcIndexResponse update(String id, DavNode davNode); DcIndexResponse update(String id, DavNode davNode, long version); DcIndexResponse updateForFile(String id, DavNode davNode, long version);  }