Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b945b82
Add examples.
conniey Jun 3, 2020
2805b2e
rebase with changes that move Table to new folderCode Snippets, Sync …
eboyd23 Jun 8, 2020
a09b66b
stashing
eboyd23 Jun 8, 2020
bdce025
rebase with folder changes for tables
eboyd23 Jun 8, 2020
63f1967
rebase on connie's branch with test filesCode Snippets, Sync done and…
eboyd23 Jun 8, 2020
0d9dc52
sync + async
eboyd23 Jun 8, 2020
87f1baa
rebase with changes that move Table to new folderCode Snippets, Sync …
eboyd23 Jun 8, 2020
af877ee
stashing
eboyd23 Jun 8, 2020
07c6fb7
rebase with folder changes for tables
eboyd23 Jun 8, 2020
0840acd
Code Snippets, Sync done and Async in progress
eboyd23 Jun 8, 2020
5cf42ad
code snippets
eboyd23 Jun 12, 2020
2e07c02
delete testing from code snippets branch
eboyd23 Jun 12, 2020
ee74e38
adding service level client
eboyd23 Jun 12, 2020
330f7b5
stashing async
eboyd23 Jun 16, 2020
a409f80
fixed async
eboyd23 Jun 16, 2020
7245126
reformatting
eboyd23 Jun 17, 2020
044356b
fixing conflictfile name changes
eboyd23 Jun 18, 2020
a9a61c1
writing in docs
eboyd23 Jun 18, 2020
4cbcfef
fixing stash
eboyd23 Jun 24, 2020
bdb4d42
fixing stash2
eboyd23 Jun 24, 2020
c6b283a
Brandon's suggestions
eboyd23 Jun 24, 2020
42b1fba
stashing changes
eboyd23 Jun 29, 2020
40cdbf7
QueryOptions added
eboyd23 Jun 30, 2020
d8ff221
Added QueryOptions class
eboyd23 Jun 30, 2020
1b2339b
brandon comments round 2
eboyd23 Jun 30, 2020
c2b6dd9
delete pom from cosmos tables
eboyd23 Jun 30, 2020
cf4e00f
fix query options builder
eboyd23 Jun 30, 2020
d804bfb
fixing javadocs error
eboyd23 Jul 1, 2020
aba06e6
fix pom
eboyd23 Jul 1, 2020
0f29626
checkstyles
eboyd23 Jul 1, 2020
4ccbbc3
move samples
eboyd23 Jul 1, 2020
1550243
adding private to some local vars
eboyd23 Jul 1, 2020
f18d4ff
switching code samples
eboyd23 Jul 2, 2020
6e725d8
switch to create, update, upsert
eboyd23 Jul 2, 2020
68a3d3f
additional changes
eboyd23 Jul 6, 2020
773eb7f
edits based on comments
eboyd23 Jul 6, 2020
b048b1c
merge conflicts
eboyd23 Jul 9, 2020
c763ac9
Edits based on comments
eboyd23 Jul 9, 2020
58f9b78
fix void async
eboyd23 Jul 9, 2020
07e1baa
connie edits
eboyd23 Jul 9, 2020
2aef60f
fix pom
eboyd23 Jul 9, 2020
d83fd30
fix version
eboyd23 Jul 9, 2020
3416f33
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
eboyd23 Jul 9, 2020
6120144
checkstyle errors
eboyd23 Jul 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions sdk/tables/azure-data-tables/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,26 @@ Licensed under the MIT License.
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter;external_dependency} -->
<artifactId>junit-jupiter-api</artifactId>
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.3.5.RELEASE</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<version>3.3.5.RELEASE</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -65,6 +77,12 @@ Licensed under the MIT License.
<version>1.3.1</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.0.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.tables;

/**
* class for a table object
*/
public class AzureTable {
private final String name;

AzureTable(String name) {
this.name = name;
}

/**
* returns the name of this table
*
* @return table name
*/
public String getName() {
return name;
}

/**
* returns the associated table client or null if it doesn't exist
* @return the associated table client
*/
public TableClient getClient() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.data.tables;

import com.azure.core.annotation.Fluent;

/**
* helps construct a query
*/
@Fluent
public final class QueryOptions {
private Integer top;
private String select;
private String filter;

/**
* Get the top property: Maximum number of records to return.
*
* @return the top value.
*/
public Integer getTop() {
return this.top;
}

/**
* Set the top property: Maximum number of records to return.
*
* @param top the top value to set.
* @return the QueryOptions object itself.
*/
public QueryOptions setTop(Integer top) {
this.top = top;
return this;
}

/**
* Get the select property: Select expression using OData notation. Limits the columns on each record to just those
* requested, e.g. "$select=PolicyAssignmentId, ResourceId".
*
* @return the select value.
*/
public String getSelect() {
return this.select;
}

/**
* Set the select property: Select expression using OData notation. Limits the columns on each record to just those
* requested, e.g. "$select=PolicyAssignmentId, ResourceId".
*
* @param select the select value to set.
* @return the QueryOptions object itself.
*/
public QueryOptions setSelect(String select) {
this.select = select;
return this;
}

/**
* Get the filter property: OData filter expression.
*
* @return the filter value.
*/
public String getFilter() {
return this.filter;
}

/**
* Set the filter property: OData filter expression.
*
* @param filter the filter value to set.
* @return the QueryOptions object itself.
*/
public QueryOptions setFilter(String filter) {
this.filter = filter;
return this;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.tables;

import com.azure.core.annotation.ServiceClient;
import com.azure.core.http.rest.PagedFlux;
import java.util.Map;
import reactor.core.publisher.Mono;

/**
* class for the table async client
*/
@ServiceClient(
builder = TableClientBuilder.class,
isAsync = true)
public class TableAsyncClient {
private final String tableName;

TableAsyncClient(String tableName) {
this.tableName = tableName;
}

/**
* Queries and returns entities in the given table using the select and filter strings
*
* @param queryOptions the odata query object
* @return a paged flux of all the entity which fit this criteria
*/
public PagedFlux<TableEntity> queryEntities(QueryOptions queryOptions) {
return null;
}

/**
* returns the entity with the given rowKey and ParitionKey
*
* @param rowKey the given row key
* @param partitionKey the given partition key
* @return an entity that fits the criteria
*/
public Mono<TableEntity> get(String rowKey, String partitionKey) {
return null;
}

/**
* insert a TableEntity with the given properties and return that TableEntity. Property map must include
* rowKey and partitionKey
*
* @param tableEntityProperties a map of properties for the TableEntity
* @return the created TableEntity
*/
public Mono<TableEntity> createEntity(Map<String, Object> tableEntityProperties) {
return Mono.empty();
}

/**
* based on Mode it either inserts or merges if exists or inserts or merges if exists
*
* @param updateMode type of upsert
* @param tableEntity entity to upsert
* @return void
*/
public Mono<Void> upsertEntity(UpdateMode updateMode, TableEntity tableEntity) {
return Mono.empty();
}

/**
* based on Mode it either updates or fails if it does exists or replaces or fails if it does exists
*
* @param updateMode type of update
* @param tableEntity entity to update
* @return void
*/
public Mono<Void> updateEntity(UpdateMode updateMode, TableEntity tableEntity) {
return Mono.empty();
}

/**
* deletes the given entity
*
* @param tableEntity entity to delete
* @return void
*/
public Mono<Void> deleteEntity(TableEntity tableEntity) {
return Mono.empty();
}

/**
* deletes the given entity
*
* @param partitionKey the partition key
* @param rowKey the row key
* @return void
*/
public Mono<Void> deleteEntity(String partitionKey, String rowKey) {
return Mono.empty();
}

/**
* returns the table name associated with the client
*
* @return table name
*/
public String getTableName() {
return tableName;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.tables;

import com.azure.core.annotation.ServiceClient;
import java.util.List;
import java.util.Map;

/**
* sync client for table operations
*/
@ServiceClient(
builder = TableClientBuilder.class)
public class TableClient {
final String tableName;

TableClient(String tableName) {
this.tableName = tableName;
}

/**
* Queries and returns entities in the given table using the select and filter strings
*
* @param queryOptions the odata query object
* @return a list of the tables that fit the query
*/
public List<TableEntity> queryEntities(QueryOptions queryOptions) {
return null;
}

/**
* returns the entity with the given rowKey and ParitionKey
*
* @param rowKey the given row key
* @param partitionKey the given partition key
* @return an entity that fits the criteria
*/
public TableEntity get(String rowKey, String partitionKey) {
return null;
}


/**
* insert a TableEntity with the given properties and return that TableEntity. Property map must include
* rowKey and partitionKey
*
* @param tableEntityProperties a map of properties for the TableEntity
* @return the created TableEntity
*/
public TableEntity createEntity(Map<String, Object> tableEntityProperties) {
return null;
}

/**
* based on Mode it either inserts or merges if exists or inserts or merges if exists
*
* @param updateMode type of upsert
* @param tableEntity entity to upsert
*/
public void upsertEntity(UpdateMode updateMode, TableEntity tableEntity) {
}

/**
* based on Mode it either updates or fails if it does exists or replaces or fails if it does exists
*
* @param updateMode type of update
* @param tableEntity entity to update
*/
public void updateEntity(UpdateMode updateMode, TableEntity tableEntity) {
}

/**
* deletes the given entity
*
* @param tableEntity entity to delete
*/
public void deleteEntity(TableEntity tableEntity) {
}

/**
* deletes the given entity
*
* @param partitionKey the partition key
* @param rowKey the row key
*/
public void deleteEntity(String partitionKey, String rowKey) {
}

/**
* returns the table name associated with the client
*
* @return table name
*/
public String getTableName() {
return this.tableName;
}


}
Loading