File tree 8 files changed +120
-23
lines changed
main/com/mongodb/client/model/bulk
test/unit/com/mongodb/client/model/bulk
8 files changed +120
-23
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package com .mongodb .client .model .bulk ;
18
18
19
- import com .mongodb .client .model .Collation ;
20
- import com .mongodb .lang .Nullable ;
21
- import org .bson .conversions .Bson ;
22
-
23
19
/**
24
20
* The methods declared in this interface are part of the public API of subclasses or sub-interfaces.
25
21
*/
26
- interface BaseClientDeleteOptions {
27
-
28
- BaseClientDeleteOptions collation (@ Nullable Collation collation );
29
-
30
- BaseClientDeleteOptions hint (@ Nullable Bson hint );
31
-
32
- BaseClientDeleteOptions hintString (@ Nullable String hintString );
22
+ interface BaseClientDeleteOptions extends BaseClientWriteModelOptions {
33
23
}
Original file line number Diff line number Diff line change 15
15
*/
16
16
package com .mongodb .client .model .bulk ;
17
17
18
- import com .mongodb .client .model .Collation ;
19
18
import com .mongodb .lang .Nullable ;
20
19
import org .bson .conversions .Bson ;
21
20
22
21
/**
23
22
* The methods declared in this interface are part of the public API of subclasses or sub-interfaces.
24
23
*/
25
- interface BaseClientUpdateOptions {
24
+ interface BaseClientUpdateOptions extends BaseClientWriteModelOptions , BaseClientUpsertableWriteModelOptions {
26
25
27
26
BaseClientUpdateOptions arrayFilters (@ Nullable Iterable <? extends Bson > arrayFilters );
28
-
29
- BaseClientUpdateOptions collation (@ Nullable Collation collation );
30
-
31
- BaseClientUpdateOptions hint (@ Nullable Bson hint );
32
-
33
- BaseClientUpdateOptions hintString (@ Nullable String hintString );
34
-
35
- BaseClientUpdateOptions upsert (@ Nullable Boolean upsert );
36
27
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2008-present MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com .mongodb .client .model .bulk ;
18
+
19
+ import com .mongodb .lang .Nullable ;
20
+
21
+ /**
22
+ * The methods declared in this interface are part of the public API of subclasses or sub-interfaces.
23
+ */
24
+ interface BaseClientUpsertableWriteModelOptions {
25
+ BaseClientUpsertableWriteModelOptions upsert (@ Nullable Boolean upsert );
26
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2008-present MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com .mongodb .client .model .bulk ;
18
+
19
+ import com .mongodb .client .model .Collation ;
20
+ import com .mongodb .lang .Nullable ;
21
+ import org .bson .conversions .Bson ;
22
+
23
+ /**
24
+ * The methods declared in this interface are part of the public API of subclasses or sub-interfaces.
25
+ */
26
+ interface BaseClientWriteModelOptions {
27
+ BaseClientWriteModelOptions collation (@ Nullable Collation collation );
28
+
29
+ BaseClientWriteModelOptions hint (@ Nullable Bson hint );
30
+
31
+ BaseClientWriteModelOptions hintString (@ Nullable String hintString );
32
+ }
Original file line number Diff line number Diff line change 27
27
* @since 5.3
28
28
*/
29
29
@ Sealed
30
- public interface ClientReplaceOneOptions {
30
+ public interface ClientReplaceOneOptions extends BaseClientWriteModelOptions , BaseClientUpsertableWriteModelOptions {
31
31
/**
32
32
* Creates the default options.
33
33
*
@@ -43,6 +43,7 @@ static ClientReplaceOneOptions clientReplaceOneOptions() {
43
43
* @param collation The collation. {@code null} represents the server default.
44
44
* @return {@code this}.
45
45
*/
46
+ @ Override
46
47
ClientReplaceOneOptions collation (@ Nullable Collation collation );
47
48
48
49
/**
@@ -52,6 +53,7 @@ static ClientReplaceOneOptions clientReplaceOneOptions() {
52
53
* @param hint The index specification. {@code null} represents the server default.
53
54
* @return {@code this}.
54
55
*/
56
+ @ Override
55
57
ClientReplaceOneOptions hint (@ Nullable Bson hint );
56
58
57
59
/**
@@ -61,6 +63,7 @@ static ClientReplaceOneOptions clientReplaceOneOptions() {
61
63
* @param hintString The index name. {@code null} represents the server default.
62
64
* @return {@code this}.
63
65
*/
66
+ @ Override
64
67
ClientReplaceOneOptions hintString (@ Nullable String hintString );
65
68
66
69
/**
@@ -69,5 +72,6 @@ static ClientReplaceOneOptions clientReplaceOneOptions() {
69
72
* @param upsert The upsert flag. {@code null} represents the server default.
70
73
* @return {@code this}.
71
74
*/
75
+ @ Override
72
76
ClientReplaceOneOptions upsert (@ Nullable Boolean upsert );
73
77
}
Original file line number Diff line number Diff line change 28
28
* @since 5.3
29
29
*/
30
30
@ Sealed
31
- public interface ClientUpdateOneOptions extends BaseClientUpdateOptions {
31
+ public interface ClientUpdateOneOptions extends BaseClientUpdateOptions {
32
32
/**
33
33
* Creates the default options.
34
34
*
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2008-present MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com .mongodb .client .model .bulk ;
18
+
19
+ import com .mongodb .MongoBaseInterfaceAssertions ;
20
+ import org .junit .jupiter .api .Test ;
21
+
22
+ final class BaseClientUpsertableWriteModelOptionsTest {
23
+ @ Test
24
+ void testAllSubInterfacesOverrideMethods () {
25
+ MongoBaseInterfaceAssertions .assertSubtypeReturn (BaseClientUpsertableWriteModelOptions .class );
26
+ }
27
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2008-present MongoDB, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package com .mongodb .client .model .bulk ;
18
+
19
+ import com .mongodb .MongoBaseInterfaceAssertions ;
20
+ import org .junit .jupiter .api .Test ;
21
+
22
+ final class BaseClientWriteModelOptionsTest {
23
+ @ Test
24
+ void testAllSubInterfacesOverrideMethods () {
25
+ MongoBaseInterfaceAssertions .assertSubtypeReturn (BaseClientWriteModelOptions .class );
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments