Skip to content

Commit 2dffcda

Browse files
code improvements
1 parent 878aa4c commit 2dffcda

File tree

11 files changed

+9
-37
lines changed

11 files changed

+9
-37
lines changed

engine/schema/src/main/java/com/cloud/dc/ClusterDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,4 @@ private String getCpuMemoryOvercommitRatio(String name) {
186186

187187
return name;
188188
}
189-
190-
@Override
191-
public boolean doesConfigKeyAndValueExist(String key, String value) {
192-
return doesKeyValuePairExist(key, value);
193-
}
194189
}

engine/schema/src/main/java/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,4 @@ public void persist(long zoneId, String name, String value) {
6767
persist(vo);
6868
txn.commit();
6969
}
70-
71-
@Override
72-
public boolean doesConfigKeyAndValueExist(String key, String value) {
73-
return doesKeyValuePairExist(key, value);
74-
}
7570
}

engine/schema/src/main/java/com/cloud/domain/dao/DomainDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,4 @@ public String getConfigValue(long id, String key) {
132132
}
133133
return vo == null ? null : getActualValue(vo);
134134
}
135-
136-
@Override
137-
public boolean doesConfigKeyAndValueExist(String key, String value) {
138-
return doesKeyValuePairExist(key, value);
139-
}
140135
}

engine/schema/src/main/java/com/cloud/storage/dao/StoragePoolDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,4 @@ public void addDetail(long resourceId, String key, String value, boolean display
5757
}
5858
super.addDetail(new StoragePoolDetailVO(resourceId, key, value, display));
5959
}
60-
61-
@Override
62-
public boolean doesConfigKeyAndValueExist(String key, String value) {
63-
return doesKeyValuePairExist(key, value);
64-
}
6560
}

engine/schema/src/main/java/com/cloud/user/AccountDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,4 @@ public String getConfigValue(long id, String key) {
156156
}
157157
return value;
158158
}
159-
160-
@Override
161-
public boolean doesConfigKeyAndValueExist(String key, String value) {
162-
return doesKeyValuePairExist(key, value);
163-
}
164159
}

engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/ResourceDetailsDao.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,4 @@ public interface ResourceDetailsDao<R extends ResourceDetail> extends GenericDao
103103
long batchExpungeForResources(List<Long> ids, Long batchSize);
104104

105105
String getActualValue(ResourceDetail resourceDetail);
106-
107-
boolean doesKeyValuePairExist(String key, String value);
108106
}

engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/ResourceDetailsDaoBase.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ public String getActualValue(ResourceDetail resourceDetail) {
247247
return resourceDetail.getValue();
248248
}
249249

250-
@Override
251250
public boolean doesKeyValuePairExist(String key, String value) {
252251
List<R> details = findDetails(key, value, null);
253252
return CollectionUtils.isNotEmpty(details);

engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/ImageStoreDetailsDaoImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,4 @@ public String getConfigValue(long id, ConfigKey<?> key) {
119119
public void addDetail(long resourceId, String key, String value, boolean display) {
120120
super.addDetail(new ImageStoreDetailVO(resourceId, key, value, display));
121121
}
122-
123-
@Override
124-
public boolean doesConfigKeyAndValueExist(String key, String value) {
125-
return doesKeyValuePairExist(key, value);
126-
}
127122
}

framework/config/src/main/java/org/apache/cloudstack/framework/config/ConfigKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ protected T valueOf(String value) {
279279

280280
public boolean hasValueInScope(String value) {
281281
if (value != null && s_depot != null) {
282-
return s_depot.doesConfigKeyAndValueExistsInScope(_name, value, _scope);
282+
return s_depot.doesConfigKeyAndValueExistInScope(_name, value, _scope);
283283
}
284284
return false;
285285
}

framework/config/src/main/java/org/apache/cloudstack/framework/config/ScopedConfigStorage.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@ default String getConfigValue(long id, ConfigKey<?> key) {
3232
return getConfigValue(id, key.key());
3333
}
3434

35-
boolean doesConfigKeyAndValueExist(String key, String value);
35+
boolean doesKeyValuePairExist(String key, String value);
36+
37+
default boolean doesConfigKeyAndValueExist(String key, String value) {
38+
return doesKeyValuePairExist(key, value);
39+
}
3640
}

0 commit comments

Comments
 (0)