Skip to content

Commit 9bd2a67

Browse files
committed
Added overloaded methods for create/write and delete to not take
systemTime as an argument
1 parent 489370c commit 9bd2a67

File tree

2 files changed

+1315
-1193
lines changed

2 files changed

+1315
-1193
lines changed
Lines changed: 128 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,128 @@
1-
/*
2-
* Copyright 2012-2014 MarkLogic Corporation
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-
package com.marklogic.client.bitemporal;
17-
18-
import com.marklogic.client.FailedRequestException;
19-
import com.marklogic.client.ForbiddenUserException;
20-
import com.marklogic.client.ResourceNotFoundException;
21-
import com.marklogic.client.Transaction;
22-
import com.marklogic.client.document.DocumentDescriptor;
23-
import com.marklogic.client.document.DocumentPage;
24-
import com.marklogic.client.document.DocumentUriTemplate;
25-
import com.marklogic.client.document.ServerTransform;
26-
import com.marklogic.client.io.marker.AbstractReadHandle;
27-
import com.marklogic.client.io.marker.AbstractWriteHandle;
28-
import com.marklogic.client.io.marker.DocumentMetadataReadHandle;
29-
import com.marklogic.client.io.marker.DocumentMetadataWriteHandle;
30-
31-
public interface TemporalDocumentManager<R extends AbstractReadHandle, W extends AbstractWriteHandle> {
32-
public DocumentDescriptor create(DocumentUriTemplate template,
33-
DocumentMetadataWriteHandle metadataHandle,
34-
W contentHandle,
35-
ServerTransform transform,
36-
Transaction transaction,
37-
String temporalCollection,
38-
java.util.Calendar systemTime)
39-
throws ForbiddenUserException, FailedRequestException;
40-
41-
public void write(DocumentDescriptor desc,
42-
DocumentMetadataWriteHandle metadataHandle,
43-
W contentHandle,
44-
ServerTransform transform,
45-
Transaction transaction,
46-
String temporalCollection,
47-
java.util.Calendar systemTime)
48-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
49-
50-
public void write(String docId,
51-
DocumentMetadataWriteHandle metadataHandle,
52-
W contentHandle,
53-
ServerTransform transform,
54-
Transaction transaction,
55-
String temporalCollection,
56-
java.util.Calendar systemTime)
57-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
58-
59-
/*
60-
public <T extends R> T read(DocumentDescriptor desc,
61-
DocumentMetadataReadHandle metadataHandle,
62-
T contentHandle,
63-
ServerTransform transform,
64-
Transaction transaction,
65-
String temporalCollection)
66-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
67-
68-
public <T extends R> T read(String docId,
69-
DocumentMetadataReadHandle metadataHandle,
70-
T contentHandle,
71-
ServerTransform transform,
72-
Transaction transaction,
73-
String temporalCollection)
74-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
75-
76-
public DocumentPage read(ServerTransform transform,
77-
Transaction transaction,
78-
String temporalCollection,
79-
String[] uris)
80-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
81-
*/
82-
83-
public void delete(DocumentDescriptor desc,
84-
Transaction transaction,
85-
String temporalCollection,
86-
java.util.Calendar systemTime)
87-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
88-
89-
public void delete(String docId,
90-
Transaction transaction,
91-
String temporalCollection,
92-
java.util.Calendar systemTime)
93-
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
94-
}
1+
/*
2+
* Copyright 2012-2014 MarkLogic Corporation
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+
package com.marklogic.client.bitemporal;
17+
18+
import com.marklogic.client.FailedRequestException;
19+
import com.marklogic.client.ForbiddenUserException;
20+
import com.marklogic.client.ResourceNotFoundException;
21+
import com.marklogic.client.Transaction;
22+
import com.marklogic.client.document.DocumentDescriptor;
23+
import com.marklogic.client.document.DocumentUriTemplate;
24+
import com.marklogic.client.document.ServerTransform;
25+
import com.marklogic.client.io.marker.AbstractReadHandle;
26+
import com.marklogic.client.io.marker.AbstractWriteHandle;
27+
import com.marklogic.client.io.marker.DocumentMetadataWriteHandle;
28+
29+
public interface TemporalDocumentManager<R extends AbstractReadHandle, W extends AbstractWriteHandle> {
30+
public DocumentDescriptor create(DocumentUriTemplate template,
31+
DocumentMetadataWriteHandle metadataHandle,
32+
W contentHandle,
33+
ServerTransform transform,
34+
Transaction transaction,
35+
String temporalCollection)
36+
throws ForbiddenUserException, FailedRequestException;
37+
38+
public void write(DocumentDescriptor desc,
39+
DocumentMetadataWriteHandle metadataHandle,
40+
W contentHandle,
41+
ServerTransform transform,
42+
Transaction transaction,
43+
String temporalCollection)
44+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
45+
46+
public void write(String docId,
47+
DocumentMetadataWriteHandle metadataHandle,
48+
W contentHandle,
49+
ServerTransform transform,
50+
Transaction transaction,
51+
String temporalCollection)
52+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
53+
54+
public void delete(DocumentDescriptor desc,
55+
Transaction transaction,
56+
String temporalCollection)
57+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
58+
59+
public void delete(String docId,
60+
Transaction transaction,
61+
String temporalCollection)
62+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
63+
64+
// The following methods take a system time which is an advanced concept in bitemporal feature.
65+
public DocumentDescriptor create(DocumentUriTemplate template,
66+
DocumentMetadataWriteHandle metadataHandle,
67+
W contentHandle,
68+
ServerTransform transform,
69+
Transaction transaction,
70+
String temporalCollection,
71+
java.util.Calendar systemTime)
72+
throws ForbiddenUserException, FailedRequestException;
73+
74+
public void write(DocumentDescriptor desc,
75+
DocumentMetadataWriteHandle metadataHandle,
76+
W contentHandle,
77+
ServerTransform transform,
78+
Transaction transaction,
79+
String temporalCollection,
80+
java.util.Calendar systemTime)
81+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
82+
83+
public void write(String docId,
84+
DocumentMetadataWriteHandle metadataHandle,
85+
W contentHandle,
86+
ServerTransform transform,
87+
Transaction transaction,
88+
String temporalCollection,
89+
java.util.Calendar systemTime)
90+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
91+
92+
public void delete(DocumentDescriptor desc,
93+
Transaction transaction,
94+
String temporalCollection,
95+
java.util.Calendar systemTime)
96+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
97+
98+
public void delete(String docId,
99+
Transaction transaction,
100+
String temporalCollection,
101+
java.util.Calendar systemTime)
102+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
103+
104+
/*
105+
public <T extends R> T read(DocumentDescriptor desc,
106+
DocumentMetadataReadHandle metadataHandle,
107+
T contentHandle,
108+
ServerTransform transform,
109+
Transaction transaction,
110+
String temporalCollection)
111+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
112+
113+
public <T extends R> T read(String docId,
114+
DocumentMetadataReadHandle metadataHandle,
115+
T contentHandle,
116+
ServerTransform transform,
117+
Transaction transaction,
118+
String temporalCollection)
119+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
120+
121+
public DocumentPage read(ServerTransform transform,
122+
Transaction transaction,
123+
String temporalCollection,
124+
String[] uris)
125+
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
126+
*/
127+
128+
}

0 commit comments

Comments
 (0)