mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
More SearchService refactor. Added CMIS SQL to the search service. Tidy ups. FTS supports default namespace and templates via search parameters API. (MOB-568, MOB-569)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14463 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,11 +30,16 @@ import java.util.Map;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryService;
|
||||
import org.alfresco.cmis.CMISResultSet;
|
||||
import org.alfresco.cmis.CMISResultSetMetaData;
|
||||
import org.alfresco.cmis.CMISResultSetRow;
|
||||
import org.alfresco.repo.search.impl.querymodel.Column;
|
||||
import org.alfresco.repo.search.impl.querymodel.Query;
|
||||
import org.alfresco.repo.search.results.ResultSetSPIWrapper;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -87,9 +92,9 @@ public class CMISResultSetRowImpl implements CMISResultSetRow
|
||||
*
|
||||
* @see org.alfresco.cmis.search.CMISResultSetRow#getResultSet()
|
||||
*/
|
||||
public CMISResultSet getResultSet()
|
||||
public ResultSet getResultSet()
|
||||
{
|
||||
return resultSet;
|
||||
return new ResultSetSPIWrapper<CMISResultSetRow, CMISResultSetMetaData>(resultSet);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -186,4 +191,37 @@ public class CMISResultSetRowImpl implements CMISResultSetRow
|
||||
return answer;
|
||||
}
|
||||
|
||||
public CMISResultSet getCMISResultSet()
|
||||
{
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
public ChildAssociationRef getChildAssocRef()
|
||||
{
|
||||
NodeRef nodeRef = getNodeRef();
|
||||
return nodeService.getPrimaryParent(nodeRef);
|
||||
}
|
||||
|
||||
public NodeRef getNodeRef()
|
||||
{
|
||||
if(getCMISResultSet().getMetaData().getColumns().length == 1)
|
||||
{
|
||||
return getNodeRef(getCMISResultSet().getMetaData().getColumns()[0].getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new UnsupportedOperationException("Ambiguous selector");
|
||||
}
|
||||
}
|
||||
|
||||
public QName getQName()
|
||||
{
|
||||
return getChildAssocRef().getQName();
|
||||
}
|
||||
|
||||
public Serializable getValue(QName qname)
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user