// Get the InventoryService.
InventoryServiceInterface inventoryService =
user.getService(DfpService.V201308.INVENTORY_SERVICE);
// Get the NetworkService.
NetworkServiceInterface networkService =
user.getService(DfpService.V201308.NETWORK_SERVICE);
// Get the effective root ad unit ID of the network.
String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();
// Create a statement to select the children of the effective root ad
// unit.
Statement filterStatement = new StatementBuilder("WHERE parentId = :id LIMIT 500")
.putValue("id", effectiveRootAdUnitId).toStatement();