}
public DBObject getObjectForParentType(DBObjectType parentObjectType, String name, boolean lookupHidden) {
for (DBObjectList objectList : objectLists.values()) {
DBObjectType objectType = objectList.getObjectType();
if (objectType.getParents().contains(parentObjectType)) {
DBObject object = objectList.getObject(name);
if (object != null) {
return object;
}
}
}
if (lookupHidden) {
for (DBObjectList objectList : hiddenObjectLists.values()) {
DBObjectType objectType = objectList.getObjectType();
if (objectType.getParents().contains(parentObjectType)) {
DBObject object = objectList.getObject(name);
if (object != null) {
return object;
}
}