use of com.emc.storageos.db.client.constraint.NamedElementQueryResultList.NamedElement in project coprhd-controller by CoprHD.
the class InMemoryDbClient method findAllOrdersByTimeRange.
@Override
public List<NamedElement> findAllOrdersByTimeRange(URI tid, String columnField, Date startTime, Date endTime, int maxCount) throws DataAccessException {
List<NamedElement> results = Lists.newArrayList();
for (URI modelId : findAllIds(Order.class)) {
Order model = findById(Order.class, modelId);
Object o = getColumnField(model, columnField);
results.add(createNamedElement(model));
}
return results;
}
use of com.emc.storageos.db.client.constraint.NamedElementQueryResultList.NamedElement in project coprhd-controller by CoprHD.
the class ComputeSystemHelper method upateHostTenant.
/**
* Updates the Host's tenant.
*
* @param dbClient DBClient for the database operations.
* @param dataCenterId data center URI.
* @param tenantId tenant id to be updated.
*/
private static void upateHostTenant(DbClient dbClient, URI dataCenterId, URI tenantId) {
List<NamedElement> hostUris = listChildren(dbClient, dataCenterId, Host.class, "label", "vcenterDataCenter");
for (NamedElement hostUri : hostUris) {
Host host = dbClient.queryObject(Host.class, hostUri.getId());
if (host != null) {
host.setTenant(tenantId);
dbClient.persistObject(host);
}
}
}
Aggregations