[Users | Trunk]: Get couId optimized
This commit is contained in:
parent
891ffdd9ea
commit
92da59a386
|
@ -142,13 +142,12 @@ public class RegistryCalls {
|
||||||
*/
|
*/
|
||||||
public Integer getCouId(String name) {
|
public Integer getCouId(String name) {
|
||||||
JsonArray cous = getCous(name);
|
JsonArray cous = getCous(name);
|
||||||
Integer couId = null;
|
|
||||||
for (JsonElement cou : cous) {
|
for (JsonElement cou : cous) {
|
||||||
if (cou.getAsJsonObject().get("Name").getAsString().toLowerCase().equals(name.toLowerCase())) {
|
if (cou.getAsJsonObject().get("Name").getAsString().toLowerCase().equals(name.toLowerCase())) {
|
||||||
couId = cou.getAsJsonObject().get("Id").getAsInt();
|
return cou.getAsJsonObject().get("Id").getAsInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return couId;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue