Skip to content

Commit 7819f2e

Browse files
committed
Merge branch 'pojoFacade' into dev
2 parents 83c3e2e + f9ce9cb commit 7819f2e

File tree

8 files changed

+136
-1
lines changed

8 files changed

+136
-1
lines changed

src/main/java/com/marklogic/client/DatabaseClient.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,15 @@ public interface DatabaseClient {
113113
public ServerConfigurationManager newServerConfigManager();
114114

115115
/**
116-
* Creates a PojoRepository specific to the specified class and id types.
116+
* Creates a PojoRepository specific to the specified class and its id type.
117117
* The PojoRepository provides a facade for persisting, retrieving, and
118118
* querying data contained in Java objects. Annotations are required to
119119
* identify the id field and any fields for which you wish to create indexes.
120+
*
121+
* @param clazz the class type for this PojoRepository to handle
122+
* @param idClass the class type of the id field for this clazz, must obviously
123+
* be Serializable or we'll struggle to marshall it
124+
* @return the initialized PojoRepository
120125
**/
121126
public <T, ID extends Serializable> PojoRepository<T, ID> newPojoRepository(Class<T> clazz, Class<ID> idClass);
122127

src/main/java/com/marklogic/client/document/DocumentManager.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,52 @@ public <T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle
368368
public <T extends R> T read(DocumentDescriptor desc, DocumentMetadataReadHandle metadataHandle, T contentHandle, ServerTransform transform, Transaction transaction)
369369
throws ResourceNotFoundException, ForbiddenUserException, FailedRequestException;
370370

371+
/**
372+
* Reads from the database a list of documents matching the provided uris. Allows
373+
* iteration across matching documents and metadata (only if setMetadataCategories
374+
* has been called to request metadata). To find out how many of your uris matched,
375+
* call the {@link DocumentPage#size() DocumentPage.size()} method.
376+
*
377+
* @param uris the database uris identifying documents to retrieve
378+
* @return the DocumentPage of matching documents and metadata
379+
*/
371380
public DocumentPage read(String... uris);
372381

382+
/**
383+
* Reads from the database a list of documents matching the provided uris. Allows
384+
* iteration across matching documents and metadata (only if setMetadataCategories
385+
* has been called to request metadata). To find out how many of your uris matched,
386+
* call the {@link DocumentPage#size() DocumentPage.size()} method.
387+
*
388+
* @param transform the transform to be run on the server on each document (must already be installed)
389+
* @param uris the database uris identifying documents to retrieve
390+
* @return the DocumentPage of matching documents and metadata
391+
*/
373392
public DocumentPage read(ServerTransform transform, String... uris);
374393

394+
/**
395+
* Reads from the database a list of documents matching the provided uris. Allows
396+
* iteration across matching documents and metadata (only if setMetadataCategories
397+
* has been called to request metadata). To find out how many of your uris matched,
398+
* call the {@link DocumentPage#size() DocumentPage.size()} method.
399+
*
400+
* @param transaction the transaction in which this read is participating
401+
* @param uris the database uris identifying documents to retrieve
402+
* @return the DocumentPage of matching documents and metadata
403+
*/
375404
public DocumentPage read(Transaction transaction, String... uris);
376405

406+
/**
407+
* Reads from the database a list of documents matching the provided uris. Allows
408+
* iteration across matching documents and metadata (only if setMetadataCategories
409+
* has been called to request metadata). To find out how many of your uris matched,
410+
* call the {@link DocumentPage#size() DocumentPage.size()} method.
411+
*
412+
* @param transform the transform to be run on the server on each document (must already be installed)
413+
* @param transaction the transaction in which this read is participating
414+
* @param uris the database uris identifying documents to retrieve
415+
* @return the DocumentPage of matching documents and metadata
416+
*/
377417
public DocumentPage read(ServerTransform transform, Transaction transaction, String... uris);
378418

379419
public DocumentPage readMetadata(String... uris);

src/main/java/com/marklogic/client/impl/PojoPageImpl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.impl;
217

318
import java.util.Iterator;

src/main/java/com/marklogic/client/impl/PojoRepositoryImpl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.impl;
217

318
import com.marklogic.client.DatabaseClient;

src/main/java/com/marklogic/client/pojo/PojoPage.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.pojo;
217

318
import com.marklogic.client.Page;

src/main/java/com/marklogic/client/pojo/PojoQueryBuilder.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.pojo;
217

318
import javax.xml.namespace.QName;

src/main/java/com/marklogic/client/pojo/PojoRepository.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.pojo;
217

318
import com.marklogic.client.DatabaseClient;

src/main/java/com/marklogic/client/pojo/annotation/Id.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*/
116
package com.marklogic.client.pojo.annotation;
217

318
import java.lang.annotation.Retention;

0 commit comments

Comments
 (0)