05-24-2013 11:04 AM
public List getAlfrescoDocuments() {
List documents = new ArrayList();
String myType = "cmis:document";
Session session = getAlfrecoSession();
// get the query name of cmis:objectId
ObjectType type = session.getTypeDefinition(myType);
PropertyDefinition<?> objectIdPropDef = type.getPropertyDefinitions().get(PropertyIds.OBJECT_ID);
String objectIdQueryName = objectIdPropDef.getQueryName();
String queryString ="select d.cmis:objectId from cmis:document as d join p:custom:DocumentSigesa as o on d.cmis:objectId = o.cmis:objectId";
System.out.println(queryString);
// execute query
ItemIterable<QueryResult> results = session.query(queryString, false);
for (QueryResult qResult : results) {
String objectId = qResult.getPropertyValueByQueryName(objectIdQueryName);
Document doc = (Document) session.getObject(session.createObjectId(objectId));
documents.add(doc);
System.out.println("Entra");
}
return documents;
}
05-24-2013 11:07 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.