diff --git a/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/AspectSupport.java b/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/AspectSupport.java index 613cf27065..84ac6f7d7e 100644 --- a/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/AspectSupport.java +++ b/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/AspectSupport.java @@ -107,6 +107,13 @@ public class AspectSupport implements DBQueryBuilderComponent DBQueryBuilderPredicatePartCommand command; switch(joinType) { + case LEFT: + case RIGHT: + command = new DBQueryBuilderPredicatePartCommand(); + command.setJoinCommandType(DBQueryBuilderJoinCommandType.ASPECT); + command.setType(DBQueryBuilderPredicatePartCommandType.NP_MATCHES); + predicatePartCommands.add(command); + break; case NONE: case INNER: default: @@ -124,13 +131,6 @@ public class AspectSupport implements DBQueryBuilderComponent } predicatePartCommands.add(command); break; - case LEFT: - case RIGHT: - command = new DBQueryBuilderPredicatePartCommand(); - command.setJoinCommandType(DBQueryBuilderJoinCommandType.ASPECT); - command.setType(DBQueryBuilderPredicatePartCommandType.NP_MATCHES); - predicatePartCommands.add(command); - break; } } diff --git a/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/TypeSupport.java b/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/TypeSupport.java index 8048cc2215..464f747256 100644 --- a/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/TypeSupport.java +++ b/src/main/java/org/alfresco/repo/search/impl/querymodel/impl/db/TypeSupport.java @@ -1,28 +1,28 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ +/* + * #%L + * Alfresco Repository + * %% + * Copyright (C) 2005 - 2016 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ package org.alfresco.repo.search.impl.querymodel.impl.db; import java.util.ArrayList; @@ -33,8 +33,8 @@ import java.util.Set; import org.alfresco.repo.domain.node.NodeDAO; import org.alfresco.repo.domain.qname.QNameDAO; import org.alfresco.repo.search.impl.querymodel.Argument; -import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext; -import org.alfresco.repo.search.impl.querymodel.JoinType; +import org.alfresco.repo.search.impl.querymodel.FunctionEvaluationContext; +import org.alfresco.repo.search.impl.querymodel.JoinType; import org.alfresco.repo.tenant.TenantService; import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.namespace.NamespaceService; @@ -111,12 +111,19 @@ public class TypeSupport implements DBQueryBuilderComponent */ @Override public void buildPredicateCommands(List predicatePartCommands) - { - DBQueryBuilderPredicatePartCommand command; - switch(joinType) - { - case NONE: - case INNER: + { + DBQueryBuilderPredicatePartCommand command; + switch(joinType) + { + case LEFT: + case RIGHT: + command = new DBQueryBuilderPredicatePartCommand(); + command.setJoinCommandType(DBQueryBuilderJoinCommandType.NODE); + command.setType(DBQueryBuilderPredicatePartCommandType.NP_MATCHES); + predicatePartCommands.add(command); + break; + case NONE: + case INNER: default: command = new DBQueryBuilderPredicatePartCommand(); command.setJoinCommandType(DBQueryBuilderJoinCommandType.NODE); @@ -131,22 +138,15 @@ public class TypeSupport implements DBQueryBuilderComponent { command.setValues(new Long[]{-1l}); } - predicatePartCommands.add(command); - break; - case LEFT: - case RIGHT: - command = new DBQueryBuilderPredicatePartCommand(); - command.setJoinCommandType(DBQueryBuilderJoinCommandType.NODE); - command.setType(DBQueryBuilderPredicatePartCommandType.NP_MATCHES); - predicatePartCommands.add(command); - break; + predicatePartCommands.add(command); + break; } } - - public void setJoinType(JoinType joinType) - { - this.joinType = joinType; + + public void setJoinType(JoinType joinType) + { + this.joinType = joinType; } } \ No newline at end of file