-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* findById Optimization * reformat * add hashcode override and licence to BasicItem * improve point read test * address linting errors * fix linting errors * fix linting * some enhancements * fix build errors * fix testFindByIdNull integration test failure * add return null for CosmosAccessException * address Fabian review comment * update change log * address review comments * fix build errors * fix build errors * fix build errors * fix build errors * add testFindByIdWithInvalidId * add missing license header * add repository api checks for point read/query * change pointReadWarningLogged to primitive * edit change log and warning text * add extra checks per Kushagra's comments * Update CHANGELOG.md --------- Co-authored-by: Theo van Kraay <thvankra@microsoft.com> Co-authored-by: Kushagra Thapar <kushuthapar@gmail.com>
- Loading branch information
1 parent
43f68e7
commit 8236c59
Showing
10 changed files
with
196 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...azure-spring-data-cosmos/src/test/java/com/azure/spring/data/cosmos/domain/BasicItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
package com.azure.spring.data.cosmos.domain; | ||
|
||
import com.azure.spring.data.cosmos.core.mapping.Container; | ||
import com.azure.spring.data.cosmos.core.mapping.PartitionKey; | ||
import org.springframework.data.annotation.Id; | ||
|
||
import java.util.Objects; | ||
|
||
@Container() | ||
public class BasicItem { | ||
|
||
@Id | ||
@PartitionKey | ||
private String id; | ||
|
||
public BasicItem(String id) { | ||
this.id = id; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public BasicItem() { | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
final BasicItem item = (BasicItem) o; | ||
return Objects.equals(id, item.id); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BasicItem{" | ||
+ "id='" | ||
+ id | ||
+ '\'' | ||
+ '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.