Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSEARCH-4139 Use bitsets and ordinals in POJO path filters
Signed-off-by: Yoann Rodière <yoann@hibernate.org>
- Loading branch information
Showing
28 changed files
with
309 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ain/java/org/hibernate/search/mapper/javabean/model/impl/JavaBeanPojoPathsDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Hibernate Search, full-text search for your domain model | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later | ||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. | ||
*/ | ||
package org.hibernate.search.mapper.javabean.model.impl; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.hibernate.search.mapper.pojo.model.path.PojoModelPathPropertyNode; | ||
import org.hibernate.search.mapper.pojo.model.path.PojoModelPathValueNode; | ||
import org.hibernate.search.mapper.pojo.model.path.spi.PojoPathsDefinition; | ||
|
||
/** | ||
* A factory for filters expecting a simple string representation of dirty paths, | ||
* in the form "propertyA.propertyB.propertyC". | ||
* <p> | ||
* See {@link PojoModelPathPropertyNode#toPropertyString()}. | ||
*/ | ||
public class JavaBeanPojoPathsDefinition implements PojoPathsDefinition { | ||
|
||
@Override | ||
public List<String> preDefinedOrdinals() { | ||
return Collections.emptyList(); // No pre-defined ordinals | ||
} | ||
|
||
@Override | ||
public void interpretPaths(Set<String> target, Set<PojoModelPathValueNode> source) { | ||
for ( PojoModelPathValueNode path : source ) { | ||
target.add( path.parent().toPropertyString() ); | ||
} | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
...rnate/search/mapper/javabean/model/impl/JavaBeanSimpleStringSetPojoPathFilterFactory.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.