Skip to content

Commit 4007f65

Browse files
committed
feat: create configuration namespace
Signed-off-by: Otavio Santana <[email protected]>
1 parent ea98ff8 commit 4007f65

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

jnosql-nosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/communication/DeploymentType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public enum DeploymentType implements Function<Settings, Optional<AuthorizationP
3434
* Represents an "On-premises" deployment where software solutions are deployed and managed
3535
* within an organization's physical premises or data centers.
3636
*/
37-
ON_PREMISES{
37+
ON_PREMISES {
3838
@Override
3939
public Optional<AuthorizationProvider> apply(Settings settings) {
4040
String user = settings.get(List.of(OracleNoSQLConfigurations.USER.get(), Configurations.USER.get()))
@@ -54,7 +54,7 @@ public Optional<AuthorizationProvider> apply(Settings settings) {
5454
* Represents a "Cloud" deployment where software solutions are delivered and managed
5555
* over the internet (the cloud) by Oracle cloud provider.
5656
*/
57-
CLOUD{
57+
CLOUD {
5858
@Override
5959
public Optional<AuthorizationProvider> apply(Settings settings) {
6060

jnosql-nosql-oracle/src/main/java/org/eclipse/jnosql/databases/oracle/communication/NoSQLHandleConfigConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ enum NoSQLHandleConfigConfiguration implements Function<Settings, NoSQLHandleCon
3333
private static final int DEFAULT_TABLE_DELAY_MILLIS = 500;
3434
@Override
3535
public NoSQLHandleConfiguration apply(Settings settings) {
36+
3637
String host = settings.get(List.of(OracleNoSQLConfigurations.HOST.get(), Configurations.HOST.get()))
3738
.map(Object::toString).orElse(DEFAULT_HOST);
3839

@@ -48,6 +49,10 @@ public NoSQLHandleConfiguration apply(Settings settings) {
4849
int waitMillis = settings.getOrDefault(OracleNoSQLConfigurations.TABLE_WAIT_MILLIS, DEFAULT_TABLE_WAIT_MILLIS);
4950
int delayMillis = settings.getOrDefault(OracleNoSQLConfigurations.TABLE_DELAY_MILLIS, DEFAULT_TABLE_DELAY_MILLIS);
5051
var tableLimits = new TableCreationConfiguration(readLimit, writeLimit, storageGB, waitMillis, delayMillis);
52+
settings.get(OracleNoSQLConfigurations.NAMESPACE.get())
53+
.map(Object::toString).ifPresent(config::setDefaultNamespace);
54+
settings.get(OracleNoSQLConfigurations.COMPARTMENT.get())
55+
.map(Object::toString).ifPresent(config::setDefaultCompartment);
5156
return new NoSQLHandleConfiguration(config, tableLimits);
5257
}
5358
}

0 commit comments

Comments
 (0)