mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Reversed out revisions 14366, 14361 and 14356
- Just prior to this, created dev branch DEV/ANDY_HEAD_ROLLBACKS - Andy: Switch to this branch on your local copy if you have changes to any of the files modified here git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14374 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,7 +27,6 @@ package org.alfresco.cmis.mapping;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.repo.search.impl.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -78,7 +77,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
*/
|
||||
public Query buildLuceneEquality(LuceneQueryParser lqp, Serializable value, PredicateMode mode) throws ParseException
|
||||
{
|
||||
return lqp.getFieldQuery(getLuceneFieldName(), getValueAsString(value), AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(getLuceneFieldName(), getValueAsString(value));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -89,11 +88,11 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
if (not)
|
||||
{
|
||||
return lqp.getFieldQuery("ISNULL", getQNameForExists().toString(), AnalysisMode.DEFAULT);
|
||||
return lqp.getFieldQuery("ISNULL", getQNameForExists().toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getFieldQuery("ISNOTNULL", getQNameForExists().toString(), AnalysisMode.DEFAULT);
|
||||
return lqp.getFieldQuery("ISNOTNULL", getQNameForExists().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +104,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getRangeQuery(field, stringValue, getRangeMax(), false, true, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getRangeQuery(field, stringValue, getRangeMax(), false, true);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -116,7 +115,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getRangeQuery(field, stringValue, getRangeMax(), true, true, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getRangeQuery(field, stringValue, getRangeMax(), true, true);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -149,11 +148,11 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
String value = asStrings.iterator().next();
|
||||
if (not)
|
||||
{
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -165,7 +164,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
}
|
||||
for (String value : asStrings)
|
||||
{
|
||||
Query any = lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
Query any = lqp.getFieldQuery(field, value);
|
||||
if (not)
|
||||
{
|
||||
booleanQuery.add(any, Occur.MUST_NOT);
|
||||
@@ -187,7 +186,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -198,7 +197,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getRangeQuery(field, getRangeMin(), stringValue, true, false, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getRangeQuery(field, getRangeMin(), stringValue, true, false);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -209,7 +208,7 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getRangeQuery(field, getRangeMin(), stringValue, true, true, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getRangeQuery(field, getRangeMin(), stringValue, true, true);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -225,12 +224,12 @@ public abstract class AbstractSimpleProperty extends AbstractProperty
|
||||
{
|
||||
BooleanQuery booleanQuery = new BooleanQuery();
|
||||
booleanQuery.add(new MatchAllDocsQuery(), Occur.MUST);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER), Occur.MUST_NOT);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue), Occur.MUST_NOT);
|
||||
return booleanQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getLikeQuery(field, stringValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,6 @@ import java.util.Collection;
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISQueryException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.search.impl.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -105,7 +104,7 @@ public class ObjectIdProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getFieldQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, stringValue);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -172,11 +171,11 @@ public class ObjectIdProperty extends AbstractProperty
|
||||
String value = asStrings.iterator().next();
|
||||
if (not)
|
||||
{
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -188,7 +187,7 @@ public class ObjectIdProperty extends AbstractProperty
|
||||
}
|
||||
for (String value : asStrings)
|
||||
{
|
||||
Query any = lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
Query any = lqp.getFieldQuery(field, value);
|
||||
if (not)
|
||||
{
|
||||
booleanQuery.add(any, Occur.MUST_NOT);
|
||||
@@ -210,7 +209,7 @@ public class ObjectIdProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -246,12 +245,12 @@ public class ObjectIdProperty extends AbstractProperty
|
||||
{
|
||||
BooleanQuery booleanQuery = new BooleanQuery();
|
||||
booleanQuery.add(new MatchAllDocsQuery(), Occur.MUST);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER), Occur.MUST_NOT);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue), Occur.MUST_NOT);
|
||||
return booleanQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getLikeQuery(field, stringValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,6 @@ import java.util.Collection;
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.cmis.CMISQueryException;
|
||||
import org.alfresco.cmis.CMISTypeDefinition;
|
||||
import org.alfresco.repo.search.impl.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -97,7 +96,7 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
CMISTypeDefinition type = getServiceRegistry().getCMISDictionaryService().findType(stringValue);
|
||||
return lqp.getFieldQuery(field, type.getTypeId().getQName().toString(), AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, type.getTypeId().getQName().toString());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -166,11 +165,11 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
String value = asStrings.iterator().next();
|
||||
if (not)
|
||||
{
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -182,7 +181,7 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
}
|
||||
for (String value : asStrings)
|
||||
{
|
||||
Query any = lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
Query any = lqp.getFieldQuery(field, value);
|
||||
if (not)
|
||||
{
|
||||
booleanQuery.add(any, Occur.MUST_NOT);
|
||||
@@ -205,7 +204,7 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
CMISTypeDefinition type = getServiceRegistry().getCMISDictionaryService().findType(stringValue);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, type.getTypeId().getQName().toString(), AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, type.getTypeId().getQName().toString());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -241,12 +240,12 @@ public class ObjectTypeIdProperty extends AbstractProperty
|
||||
{
|
||||
BooleanQuery booleanQuery = new BooleanQuery();
|
||||
booleanQuery.add(new MatchAllDocsQuery(), Occur.MUST);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, typeQName, AnalysisMode.IDENTIFIER), Occur.MUST_NOT);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, typeQName), Occur.MUST_NOT);
|
||||
return booleanQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getLikeQuery(field, typeQName, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getLikeQuery(field, typeQName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,6 @@ import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.cmis.CMISDictionaryModel;
|
||||
import org.alfresco.repo.search.impl.lucene.AnalysisMode;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
|
||||
import org.alfresco.repo.search.impl.querymodel.PredicateMode;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -104,7 +103,7 @@ public class ParentProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getFieldQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, stringValue);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -153,11 +152,11 @@ public class ParentProperty extends AbstractProperty
|
||||
String value = asStrings.iterator().next();
|
||||
if (not)
|
||||
{
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getFieldQuery(field, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -169,7 +168,7 @@ public class ParentProperty extends AbstractProperty
|
||||
}
|
||||
for (String value : asStrings)
|
||||
{
|
||||
Query any = lqp.getFieldQuery(field, value, AnalysisMode.IDENTIFIER);
|
||||
Query any = lqp.getFieldQuery(field, value);
|
||||
if (not)
|
||||
{
|
||||
booleanQuery.add(any, Occur.MUST_NOT);
|
||||
@@ -191,7 +190,7 @@ public class ParentProperty extends AbstractProperty
|
||||
{
|
||||
String field = getLuceneFieldName();
|
||||
String stringValue = getValueAsString(value);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getDoesNotMatchFieldQuery(field, stringValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,12 +207,12 @@ public class ParentProperty extends AbstractProperty
|
||||
{
|
||||
BooleanQuery booleanQuery = new BooleanQuery();
|
||||
booleanQuery.add(new MatchAllDocsQuery(), Occur.MUST);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER), Occur.MUST_NOT);
|
||||
booleanQuery.add(lqp.getLikeQuery(field, stringValue), Occur.MUST_NOT);
|
||||
return booleanQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
return lqp.getLikeQuery(field, stringValue, AnalysisMode.IDENTIFIER);
|
||||
return lqp.getLikeQuery(field, stringValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user