Skip to content

Commit 911fae7

Browse files
committed
rm ArangoDatabase.getDocument()
1 parent 9522c60 commit 911fae7

File tree

3 files changed

+0
-55
lines changed

3 files changed

+0
-55
lines changed

core/src/main/java/com/arangodb/ArangoDatabase.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -579,29 +579,6 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
579579
*/
580580
DatabaseEntity getInfo();
581581

582-
/**
583-
* Reads a single document
584-
*
585-
* @param id The id of the document
586-
* @param type The type of the document (POJO or {@link com.arangodb.util.RawData})
587-
* @return the document identified by the id
588-
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#read-document">API
589-
* Documentation</a>
590-
*/
591-
<T> T getDocument(String id, Class<T> type);
592-
593-
/**
594-
* Reads a single document
595-
*
596-
* @param id The id of the document
597-
* @param type The type of the document (POJO or {@link com.arangodb.util.RawData})
598-
* @param options Additional options, can be null
599-
* @return the document identified by the id
600-
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#read-document">API
601-
* Documentation</a>
602-
*/
603-
<T> T getDocument(String id, Class<T> type, DocumentReadOptions options);
604-
605582
/**
606583
* Reload the routing table.
607584
*

core/src/main/java/com/arangodb/internal/ArangoDatabaseImpl.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,6 @@ public DatabaseEntity getInfo() {
344344
return executor.execute(getInfoRequest(), getInfoResponseDeserializer());
345345
}
346346

347-
@Override
348-
public <T> T getDocument(final String id, final Class<T> type) {
349-
DocumentUtil.validateDocumentId(id);
350-
final String[] split = id.split("/");
351-
return collection(split[0]).getDocument(split[1], type);
352-
}
353-
354-
@Override
355-
public <T> T getDocument(final String id, final Class<T> type, final DocumentReadOptions options) {
356-
DocumentUtil.validateDocumentId(id);
357-
final String[] split = id.split("/");
358-
return collection(split[0]).getDocument(split[1], type, options);
359-
}
360-
361347
@Override
362348
public void reloadRouting() {
363349
executor.execute(reloadRoutingRequest(), Void.class);

driver/src/test/java/com/arangodb/ArangoDatabaseTest.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,17 +1363,6 @@ void getInfo(ArangoDatabase db) {
13631363
}
13641364
}
13651365

1366-
@ParameterizedTest(name = "{index}")
1367-
@MethodSource("dbs")
1368-
void getDocument(ArangoDatabase db) {
1369-
String key = "key-" + rnd();
1370-
final BaseDocument value = new BaseDocument(key);
1371-
db.collection(CNAME1).insertDocument(value);
1372-
final BaseDocument document = db.getDocument(CNAME1 + "/" + key, BaseDocument.class);
1373-
assertThat(document).isNotNull();
1374-
assertThat(document.getKey()).isEqualTo(key);
1375-
}
1376-
13771366
@ParameterizedTest(name = "{index}")
13781367
@MethodSource("dbs")
13791368
void shouldIncludeExceptionMessage(ArangoDatabase db) {
@@ -1389,13 +1378,6 @@ void shouldIncludeExceptionMessage(ArangoDatabase db) {
13891378
}
13901379
}
13911380

1392-
@ParameterizedTest(name = "{index}")
1393-
@MethodSource("dbs")
1394-
void getDocumentWrongId(ArangoDatabase db) {
1395-
Throwable thrown = catchThrowable(() -> db.getDocument("123", BaseDocument.class));
1396-
assertThat(thrown).isInstanceOf(ArangoDBException.class);
1397-
}
1398-
13991381
@ParameterizedTest(name = "{index}")
14001382
@MethodSource("dbs")
14011383
void reloadRouting(ArangoDatabase db) {

0 commit comments

Comments
 (0)