Skip to content

Commit c7561f2

Browse files
committed
Revert "DocumentDB JavaSDK 1.6.0 updates."
This reverts commit 7bd393c.
1 parent 7bd393c commit c7561f2

29 files changed

+1736
-3265
lines changed

README.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ public class SampleApp {
6868
// Define an id for your database and collection
6969
private static final String DATABASE_ID = "TestDB";
7070
private static final String COLLECTION_ID = "TestCollection";
71-
private static final String COLLECTION_ID_PARTITIONED = "TestCollection_Partitioned";
7271

7372
// We'll use Gson for POJO <=> JSON serialization for this sample.
7473
// Codehaus' Jackson is another great POJO <=> JSON serializer.
@@ -109,38 +108,7 @@ public class SampleApp {
109108
// Create a new document.
110109
myDocument = documentClient.createDocument(myCollection.getSelfLink(),
111110
myDocument, null, false).getResource();
112-
113-
// The following code Illustrates how to create a partitioned collection and
114-
// use the partition key to access documents.
115-
116-
// Create a partition key definition that specifies the path to the property
117-
// within a document that is used as the partition key.
118-
PartitionKeyDefinition partitionKeyDef = new PartitionKeyDefinition();
119-
ArrayList<String> paths = new ArrayList<String>();
120-
paths.add("/id");
121-
partitionKeyDef.setPaths(paths);
122-
123-
// Create a collection with the partition key definition and set the offer throughput
124-
// to 10100 RU per second.
125-
DocumentCollection myPartitionedCollection = new DocumentCollection();
126-
myPartitionedCollection.setId(COLLECTION_ID_PARTITIONED);
127-
myPartitionedCollection.setPartitionKey(partitionKeyDef);
128-
129-
RequestOptions options = new RequestOptions();
130-
options.setOfferThroughput(10100);
131-
myPartitionedCollection = documentClient.createCollection(
132-
myDatabase.getSelfLink(), myCollection, options).getResource();
133-
134-
// Insert a document into the created collection.
135-
String document = "{ 'id': 'document1', 'description': 'this is a test document.' }";
136-
Document newDocument = new Document(document);
137-
newDocument = documentClient.createDocument(myPartitionedCollection.getSelfLink(),
138-
newDocument, null, false).getResource();
139-
140-
// Read the created document, specifying the required partition key in RequestOptions.
141-
options = new RequestOptions();
142-
options.setPartitionKey(new PartitionKey("document1"));
143-
newDocument = documentClient.readDocument(newDocument.getSelfLink(), options).getResource();
111+
144112
}
145113
}
146114
```
@@ -149,7 +117,7 @@ Additional samples are provided in the unit tests.
149117

150118
##Need Help?
151119

152-
Be sure to check out the Microsoft Azure [Developer Forums on MSDN](https://social.msdn.microsoft.com/forums/azure/en-US/home?forum=AzureDocumentDB) or the [Developer Forums on Stack Overflow](http://stackoverflow.com/questions/tagged/azure-documentdb) if you have trouble with the provided code.
120+
Be sure to check out the [Developer Forums on Stack Overflow](http://stackoverflow.com/questions/tagged/azure-documentdb) if you have trouble with the provided code.
153121

154122
##Contribute Code or Provide Feedback
155123

@@ -162,4 +130,4 @@ If you encounter any bugs with the library please file an issue in the [Issues](
162130
* [Azure Developer Center](http://azure.microsoft.com/en-us/develop/java/)
163131
* [Azure DocumentDB Service](http://azure.microsoft.com/en-us/documentation/services/documentdb/)
164132
* [Azure DocumentDB Team Blog](http://blogs.msdn.com/b/documentdb/)
165-
* [JavaDocs](http://dl.windowsazure.com/documentdb/javadoc)
133+
* [JavaDocs](http://azure.github.io/azure-documentdb-java/)

changelog.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
## Changes in 1.6.0 : ##
2-
3-
- Added support to set offer throughput for collections created with variable pricing structure.
4-
- Added support to create collections with multiple partitions by specifying a partition key definition.
5-
- Added support to send partition key in RequestOptions and FeedOptions to specify the scope of the request or the query.
6-
- Added support to specify a partition key in the Permission object to scope the permission to a partition.
7-
81
## Changes in 1.5.1 : ##
92

103
- Fixed a bug in HashPartitionResolver to generate hash values in little-endian order to be consistent with other SDKs.

pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.microsoft.azure</groupId>
55
<artifactId>azure-documentdb</artifactId>
6-
<version>1.6.0</version>
6+
<version>1.5.1</version>
77
<name>${project.groupId}:${project.artifactId}</name>
88
<description>Java SDK for Microsoft Azure DocumentDB</description>
99
<url>http://azure.microsoft.com/en-us/services/documentdb/</url>
@@ -17,12 +17,6 @@
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
</properties>
1919
<developers>
20-
<developer>
21-
<name>Shelly Guo</name>
22-
<email>[email protected]</email>
23-
<organization>Microsoft</organization>
24-
<organizationUrl>http://www.microsoft.com/</organizationUrl>
25-
</developer>
2620
<developer>
2721
<name>Rajesh Nagpal</name>
2822
<email>[email protected]</email>

src/com/microsoft/azure/documentdb/Constants.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,6 @@ static class Properties {
105105

106106
//Offer resource
107107
static final String OFFER_TYPE = "offerType";
108-
static final String OFFER_VERSION = "offerVersion";
109-
static final String OFFER_CONTENT = "content";
110-
static final String OFFER_THROUGHPUT = "offerThroughput";
111-
static final String OFFER_VERSION_V1 = "V1";
112-
static final String OFFER_VERSION_V2 = "V2";
113-
static final String OFFER_RESOURCE_ID = "offerResourceId";
114-
115-
//PartitionKey
116-
static final String PARTITION_KEY = "partitionKey";
117-
static final String PARTITION_KEY_PATHS = "paths";
118-
static final String PARTITION_KIND = "kind";
119-
static final String RESOURCE_PARTITION_KEY = "resourcePartitionKey";
120108
}
121109

122110
static class ResourceKeys {

0 commit comments

Comments
 (0)