throw new IllegalArgumentException("Operation context must be set!");
}
final String id = objectId.getId();
final String typeId = (type == null ? null : type.getId());
final RelationshipService relationshipService = getBinding().getRelationshipService();
final OperationContext ctxt = new OperationContextImpl(context);
return new CollectionIterable<Relationship>(new AbstractPageFetcher<Relationship>(ctxt.getMaxItemsPerPage()) {
@Override
protected AbstractPageFetcher.Page<Relationship> fetchPage(long skipCount) {
// fetch the relationships
ObjectList relList = relationshipService.getObjectRelationships(getRepositoryId(), id,
includeSubRelationshipTypes, relationshipDirection, typeId, ctxt.getFilterString(),
ctxt.isIncludeAllowableActions(), BigInteger.valueOf(this.maxNumItems),
BigInteger.valueOf(skipCount), null);
// convert relationship objects