private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";
public static void runExample(
DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
// Request the placement service from the service client factory.
PlacementRemote placementService = dfaServices.get(session, PlacementRemote.class);
// Set placement search criteria.
PlacementSearchCriteria searchCriteria = new PlacementSearchCriteria();
searchCriteria.setPageSize(10);
searchCriteria.setSearchString(searchString);
// Get placement types.
PlacementRecordSet placements = placementService.getPlacementsByCriteria(searchCriteria);
// Display placment names and IDs.
if (placements.getRecords() != null) {
for (Placement result : placements.getRecords()) {
System.out.printf("Placment with name \"%s\" and ID \"%s\" was found.%n",