FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
rethinkdb-java/src/main/java/com/rethinkdb/RethinkDB.java at master · resureltd/rethinkdb-java · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
resureltd
/
rethinkdb-java
Public
forked from
rethinkdb/rethinkdb-java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
rethinkdb-java
/
src
/
main
/
java
/
com
/
rethinkdb
/
RethinkDB.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
88 lines (78 loc) · 2.68 KB
Breadcrumbs
rethinkdb-java
/
src
/
main
/
java
/
com
/
rethinkdb
/
RethinkDB.java
Copy path
File metadata and controls
88 lines (78 loc) · 2.68 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
package
com
.
rethinkdb
;
import
com
.
fasterxml
.
jackson
.
databind
.
DeserializationFeature
;
import
com
.
fasterxml
.
jackson
.
databind
.
ObjectMapper
;
import
com
.
rethinkdb
.
gen
.
model
.
TopLevel
;
import
com
.
rethinkdb
.
net
.
Connection
;
import
org
.
jetbrains
.
annotations
.
NotNull
;
import
org
.
jetbrains
.
annotations
.
Nullable
;
import
java
.
net
.
URI
;
/**
* Your entry point to interacting with RethinkDB.
*/
public
class
RethinkDB
extends
TopLevel
{
/**
* The Singleton to use to begin interacting with RethinkDB Driver.
*/
public
static
final
RethinkDB
r
=
new
RethinkDB
();
/**
* Jackson's {@link ObjectMapper} for handling {@link com.rethinkdb.net.Result}'s values.
*/
private
static
ObjectMapper
resultMapper
;
/**
* Gets (or creates, if null) the {@link ObjectMapper} for handling {@link com.rethinkdb.net.Result}'s values.
*
* @return the {@link com.rethinkdb.net.Result}'s {@link ObjectMapper}.
*/
public
synchronized
static
@
NotNull
ObjectMapper
getResultMapper
() {
ObjectMapper
mapper
=
resultMapper
;
if
(
mapper
==
null
) {
mapper
=
new
ObjectMapper
()
.
disable
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
);
resultMapper
=
mapper
;
}
return
mapper
;
}
/**
* Sets the {@link ObjectMapper} for handling {@link com.rethinkdb.net.Result}'s values.
*
* @param mapper an {@link ObjectMapper}, or null.
*/
public
synchronized
static
void
setResultMapper
(
@
Nullable
ObjectMapper
mapper
) {
resultMapper
=
mapper
;
}
/**
* Creates a new connection builder.
*
* @return a newly created {@link Connection.Builder}.
*/
public
@
NotNull
Connection
.
Builder
connection
() {
return
new
Connection
.
Builder
();
}
/**
* Creates a new connection builder and configures it with a db-url.
*
* @param dburl the db-url to configure the builder.
* @return a newly created {@link Connection.Builder}.
*/
public
@
NotNull
Connection
.
Builder
connection
(
@
NotNull
String
dburl
) {
return
connection
(
URI
.
create
(
dburl
));
}
/**
* Creates a new connection builder and configures it with a db-url.
*
* @param uri the db-url to configure the builder.
* @return a newly created {@link Connection.Builder}.
*/
public
@
NotNull
Connection
.
Builder
connection
(
@
NotNull
URI
uri
) {
return
new
Connection
.
Builder
(
uri
);
}
/**
* Copies a connection builder.
*
* @param b the original builder.
* @return a copy of the {@link Connection.Builder}.
*/
public
@
NotNull
Connection
.
Builder
connection
(
Connection
.
Builder
b
) {
return
new
Connection
.
Builder
(
b
);
}
}
Back
|
FazBrowse Home
|
New Git URL