use of org.alfresco.repo.search.impl.querymodel.impl.db.PropertySupport in project alfresco-repository by Alfresco.
the class DBFTSTerm method prepare.
/*
* (non-Javadoc)
* @see
* org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryBuilderComponent#prepare(org.alfresco.service.namespace
* .NamespaceService, org.alfresco.service.cmr.dictionary.DictionaryService,
* org.alfresco.repo.domain.qname.QNameDAO, org.alfresco.repo.domain.node.NodeDAO, java.util.Set, java.util.Map,
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
*/
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors, Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble) {
Argument argument = functionArgs.get(ARG_TERM);
String term = (String) argument.getValue(functionContext);
PropertyArgument propArg = (PropertyArgument) functionArgs.get(ARG_PROPERTY);
if ((propArg == null) || (propArg.getPropertyName() == null)) {
throw new QueryModelException("Default field not supported");
} else if (propArg.getPropertyName().equals(QueryConstants.FIELD_PARENT)) {
ParentSupport parentSupport = new ParentSupport();
String id = (String) term;
parentSupport.setDbid(DBQuery.getDbid(id, nodeDAO, tenantService));
parentSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
builderSupport = parentSupport;
} else if (propArg.getPropertyName().equals(QueryConstants.FIELD_TYPE)) {
TypeSupport typeSupport = new TypeSupport();
typeSupport.setQnameIds(DBQuery.findTypeIds(term, namespaceService, dictionaryService, qnameDAO, false));
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
builderSupport = typeSupport;
} else if (propArg.getPropertyName().equals(QueryConstants.FIELD_ASPECT)) {
AspectSupport aspectSupport = new AspectSupport();
aspectSupport.setQnameIds(DBQuery.findAspectIds(term, namespaceService, dictionaryService, qnameDAO, false));
builderSupport = aspectSupport;
} else if (propArg.getPropertyName().equals(QueryConstants.FIELD_EXACTTYPE)) {
TypeSupport typeSupport = new TypeSupport();
typeSupport.setQnameIds(DBQuery.findTypeIds(term, namespaceService, dictionaryService, qnameDAO, true));
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
builderSupport = typeSupport;
} else if (propArg.getPropertyName().equals(QueryConstants.FIELD_EXACTASPECT)) {
AspectSupport aspectSupport = new AspectSupport();
aspectSupport.setQnameIds(DBQuery.findAspectIds(term, namespaceService, dictionaryService, qnameDAO, true));
builderSupport = aspectSupport;
} else {
argument = functionArgs.get(ARG_TOKENISATION_MODE);
AnalysisMode mode = (AnalysisMode) argument.getValue(functionContext);
if (mode != AnalysisMode.IDENTIFIER) {
throw new QueryModelException("Analysis mode not supported for DB " + mode);
}
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(term);
QName propertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(propArg.getPropertyName()), namespaceService));
propertySupport.setPropertyQName(propertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, propertyQName));
propertySupport.setPair(qnameDAO.getQName(propertyQName));
propertySupport.setJoinCommandType(DBQuery.getJoinCommandType(propertyQName));
propertySupport.setFieldName(DBQuery.getFieldName(dictionaryService, propertyQName, supportBooleanFloatAndDouble));
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
builderSupport = propertySupport;
}
}
use of org.alfresco.repo.search.impl.querymodel.impl.db.PropertySupport in project alfresco-repository by Alfresco.
the class DBLessThanOrEquals method prepare.
/* (non-Javadoc)
* @see org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryBuilderComponent#prepare(org.alfresco.service.namespace.NamespaceService, org.alfresco.service.cmr.dictionary.DictionaryService, org.alfresco.repo.domain.qname.QNameDAO, org.alfresco.repo.domain.node.NodeDAO, java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
*/
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors, Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble) {
setPropertyAndStaticArguments(functionArgs);
Serializable staticValue = getStaticArgument().getValue(functionContext);
if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_MIME_TYPE)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_MIMETYPE);
propertySupport.setFieldName("mimetype_str");
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.LTE : DBQueryBuilderPredicatePartCommandType.LTE.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_LENGTH)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_URL);
propertySupport.setFieldName("content_size");
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.LTE : DBQueryBuilderPredicatePartCommandType.LTE.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName propertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(propertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, propertyQName));
propertySupport.setPair(qnameDAO.getQName(propertyQName));
propertySupport.setJoinCommandType(DBQuery.getJoinCommandType(propertyQName));
propertySupport.setFieldName(DBQuery.getFieldName(dictionaryService, propertyQName, supportBooleanFloatAndDouble));
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.LTE : DBQueryBuilderPredicatePartCommandType.LTE.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
}
}
use of org.alfresco.repo.search.impl.querymodel.impl.db.PropertySupport in project alfresco-repository by Alfresco.
the class DBEquals method prepare.
/*
* (non-Javadoc)
* @see
* org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryBuilderComponent#prepare(org.alfresco.service.namespace
* .NamespaceService, org.alfresco.service.cmr.dictionary.DictionaryService,
* org.alfresco.repo.domain.qname.QNameDAO, org.alfresco.repo.domain.node.NodeDAO, java.util.Set, java.util.Map,
* org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
*/
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors, Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble) {
setPropertyAndStaticArguments(functionArgs);
Serializable staticValue = getStaticArgument().getValue(functionContext);
if (getPropertyName().equals(PropertyIds.PARENT_ID)) {
ParentSupport parentSupport = new ParentSupport();
String id = (String) staticValue;
parentSupport.setDbid(DBQuery.getDbid(id, nodeDAO, tenantService));
parentSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
builderSupport = parentSupport;
} else if (getPropertyName().equals(PropertyIds.OBJECT_ID)) {
UUIDSupport uuidSupport = new UUIDSupport();
uuidSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
uuidSupport.setUuid(DBQuery.getUUID((String) staticValue));
builderSupport = uuidSupport;
} else if (getPropertyName().equals(PropertyIds.OBJECT_TYPE_ID)) {
TypeSupport typeSupport = new TypeSupport();
String typeName = functionContext.getAlfrescoTypeName((String) staticValue);
typeSupport.setQnameIds(DBQuery.findTypeIds(typeName, namespaceService, dictionaryService, qnameDAO, true));
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
builderSupport = typeSupport;
} else if (getPropertyName().equals(PropertyIds.BASE_TYPE_ID)) {
TypeSupport typeSupport = new TypeSupport();
String typeName = functionContext.getAlfrescoTypeName((String) staticValue);
typeSupport.setQnameIds(DBQuery.findTypeIds(typeName, namespaceService, dictionaryService, qnameDAO, false));
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
builderSupport = typeSupport;
} else if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_MIME_TYPE)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_MIMETYPE);
propertySupport.setFieldName("mimetype_str");
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_LENGTH)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_URL);
propertySupport.setFieldName("content_size");
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName propertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(propertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, propertyQName));
propertySupport.setPair(qnameDAO.getQName(propertyQName));
propertySupport.setJoinCommandType(DBQuery.getJoinCommandType(propertyQName));
propertySupport.setFieldName(DBQuery.getFieldName(dictionaryService, propertyQName, supportBooleanFloatAndDouble));
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.EQUALS);
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
}
}
use of org.alfresco.repo.search.impl.querymodel.impl.db.PropertySupport in project alfresco-repository by Alfresco.
the class DBGreaterThan method prepare.
/* (non-Javadoc)
* @see org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryBuilderComponent#prepare(org.alfresco.service.namespace.NamespaceService, org.alfresco.service.cmr.dictionary.DictionaryService, org.alfresco.repo.domain.qname.QNameDAO, org.alfresco.repo.domain.node.NodeDAO, java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
*/
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors, Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble) {
setPropertyAndStaticArguments(functionArgs);
Serializable staticValue = getStaticArgument().getValue(functionContext);
if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_MIME_TYPE)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_MIMETYPE);
propertySupport.setFieldName("mimetype_str");
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.GT : DBQueryBuilderPredicatePartCommandType.GT.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else if (getPropertyName().equals(PropertyIds.CONTENT_STREAM_LENGTH)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_URL);
propertySupport.setFieldName("content_size");
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.GT : DBQueryBuilderPredicatePartCommandType.GT.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
} else {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValue(staticValue.toString());
QName propertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(getPropertyName()), namespaceService));
propertySupport.setPropertyQName(propertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, propertyQName));
propertySupport.setPair(qnameDAO.getQName(propertyQName));
propertySupport.setJoinCommandType(DBQuery.getJoinCommandType(propertyQName));
propertySupport.setFieldName(DBQuery.getFieldName(dictionaryService, propertyQName, supportBooleanFloatAndDouble));
propertySupport.setCommandType(getStaticPosition().equals(ARG_RHS) ? DBQueryBuilderPredicatePartCommandType.GT : DBQueryBuilderPredicatePartCommandType.GT.propertyAndValueReversed());
propertySupport.setLuceneFunction(functionContext.getLuceneFunction(getFunctionArgument()));
builderSupport = propertySupport;
}
}
use of org.alfresco.repo.search.impl.querymodel.impl.db.PropertySupport in project alfresco-repository by Alfresco.
the class DBIn method prepare.
/* (non-Javadoc)
* @see org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryBuilderComponent#prepare(org.alfresco.service.namespace.NamespaceService, org.alfresco.service.cmr.dictionary.DictionaryService, org.alfresco.repo.domain.qname.QNameDAO, org.alfresco.repo.domain.node.NodeDAO, java.util.Set, java.util.Map, org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext)
*/
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors, Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble) {
PropertyArgument propertyArgument = (PropertyArgument) functionArgs.get(ARG_PROPERTY);
Argument inverseArgument = functionArgs.get(ARG_NOT);
Boolean not = DefaultTypeConverter.INSTANCE.convert(Boolean.class, inverseArgument.getValue(functionContext));
ListArgument listArgument = (ListArgument) functionArgs.get(ARG_LIST);
Collection<Serializable> collection = (Collection<Serializable>) listArgument.getValue(functionContext);
if (propertyArgument.getPropertyName().equals(PropertyIds.PARENT_ID)) {
ParentSupport parentSupport = new ParentSupport();
parentSupport.setDbids(DBQuery.getDbids(DBQuery.toStringValues(collection), nodeDAO, tenantService));
if ((not != null) && (not.equals(Boolean.TRUE))) {
parentSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
parentSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = parentSupport;
} else if (propertyArgument.getPropertyName().equals(PropertyIds.OBJECT_ID)) {
UUIDSupport uuidSupport = new UUIDSupport();
uuidSupport.setUuids(DBQuery.getUUIDs(DBQuery.toStringValues(collection)));
if ((not != null) && (not.equals(Boolean.TRUE))) {
uuidSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
uuidSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = uuidSupport;
} else if (propertyArgument.getPropertyName().equals(PropertyIds.OBJECT_TYPE_ID)) {
TypeSupport typeSupport = new TypeSupport();
ArrayList<Long> typeIds = new ArrayList<Long>();
for (String typeName : DBQuery.toStringValues(collection)) {
String alfTypeName = functionContext.getAlfrescoTypeName(typeName);
typeIds.addAll(DBQuery.findTypeIds(alfTypeName, namespaceService, dictionaryService, qnameDAO, true));
}
typeSupport.setQnameIds(typeIds);
if ((not != null) && (not.equals(Boolean.TRUE))) {
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = typeSupport;
} else if (propertyArgument.getPropertyName().equals(PropertyIds.BASE_TYPE_ID)) {
TypeSupport typeSupport = new TypeSupport();
ArrayList<Long> typeIds = new ArrayList<Long>();
for (String typeName : DBQuery.toStringValues(collection)) {
String alfTypeName = functionContext.getAlfrescoTypeName(typeName);
typeIds.addAll(DBQuery.findTypeIds(alfTypeName, namespaceService, dictionaryService, qnameDAO, false));
}
typeSupport.setQnameIds(typeIds);
if ((not != null) && (not.equals(Boolean.TRUE))) {
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
typeSupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = typeSupport;
} else if (propertyArgument.getPropertyName().equals(PropertyIds.CONTENT_STREAM_MIME_TYPE)) {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValues(DBQuery.toStringValues(collection));
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(propertyArgument.getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_MIMETYPE);
propertySupport.setFieldName("mimetype_str");
if ((not != null) && (not.equals(Boolean.TRUE))) {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = propertySupport;
} else if (propertyArgument.getPropertyName().equals(PropertyIds.CONTENT_STREAM_LENGTH)) {
PropertySupport propertySupport = new PropertySupport();
ArrayList<String> lengths = new ArrayList<String>();
for (String value : DBQuery.toStringValues(collection)) {
lengths.add(value);
}
propertySupport.setValues(DBQuery.toStringValues(lengths));
QName basePropertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(propertyArgument.getPropertyName()), namespaceService));
propertySupport.setPropertyQName(basePropertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, basePropertyQName));
propertySupport.setPair(qnameDAO.getQName(basePropertyQName));
propertySupport.setJoinCommandType(DBQueryBuilderJoinCommandType.CONTENT_URL);
propertySupport.setFieldName("content_size");
if ((not != null) && (not.equals(Boolean.TRUE))) {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = propertySupport;
} else {
PropertySupport propertySupport = new PropertySupport();
propertySupport.setValues(DBQuery.toStringValues(collection));
QName propertyQName = QName.createQName(DBQuery.expandQName(functionContext.getAlfrescoPropertyName(propertyArgument.getPropertyName()), namespaceService));
propertySupport.setPropertyQName(propertyQName);
propertySupport.setPropertyDataType(DBQuery.getDataTypeDefinition(dictionaryService, propertyQName));
propertySupport.setPair(qnameDAO.getQName(propertyQName));
propertySupport.setJoinCommandType(DBQuery.getJoinCommandType(propertyQName));
propertySupport.setFieldName(DBQuery.getFieldName(dictionaryService, propertyQName, supportBooleanFloatAndDouble));
if ((not != null) && (not.equals(Boolean.TRUE))) {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.NOTIN);
} else {
propertySupport.setCommandType(DBQueryBuilderPredicatePartCommandType.IN);
}
builderSupport = propertySupport;
}
}
Aggregations