@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
List<Relationship> page = new ArrayList<Relationship>();
if (relList.getObjects() != null) {
for (ObjectData rod : relList.getObjects()) {
CmisObject relationship = getObject(createObjectId(rod.getId()), ctxt);
if (!(relationship instanceof Relationship)) {
throw new CmisRuntimeException("Repository returned an object that is not a relationship!");
}
page.add((Relationship) relationship);
}
}
return new AbstractPageFetcher.Page<Relationship>(page, relList.getNumItems(), relList.hasMoreItems());
}
});
}