// Get DfpUser from "~/dfp.properties".
DfpUser user = new DfpUser();
// Get the LineItemCreativeAssociationService.
LineItemCreativeAssociationServiceInterface licaService =
user.getService(DfpService.V201208.LINEITEMCREATIVEASSOCIATION_SERVICE);
// Set the line item to get LICAs by.
Long lineItemId = Long.parseLong("INSERT_LINE_ITEM_ID_HERE");
// Create a statement to only select LICAs for the given lineItem ID.
Statement filterStatement =
new StatementBuilder("WHERE lineItemId = :lineItemId LIMIT 500")
.putValue("lineItemId", lineItemId).toStatement();
// Get LICAs by statement.
LineItemCreativeAssociationPage page =
licaService.getLineItemCreativeAssociationsByStatement(filterStatement);
if (page.getResults() != null) {
int i = page.getStartIndex();
for (LineItemCreativeAssociation lica : page.getResults()) {
System.out.println(i + ") LICA with line item ID \"" + lica.getLineItemId()