Package org.hibernate.search.bridge

Examples of org.hibernate.search.bridge.StringBridge


            // Finally, figure out if this entity query needs to be read-restricted, we have indexed the readAccessLevel of it
            if (searchableEntity.getHandler().isReadAccessChecked()) {

                Integer currentAccessLevel = (Integer)Component.getInstance("currentAccessLevel");
                StringBridge paddingBridge = new PaddedIntegerBridge();
                Query accessLimitQuery =
                    new ConstantScoreRangeQuery(FIELD_READACCESSLVL, null, paddingBridge.objectToString(currentAccessLevel), true, true);
                Filter accessFilter = new QueryWrapperFilter(accessLimitQuery);
                FilteredQuery accessFilterQuery = new FilteredQuery(entityQuery, accessFilter);

                log.debug("adding filtered entity query to main query: " + accessFilterQuery);
                mainQuery.add(accessFilterQuery, BooleanClause.Occur.SHOULD);
View Full Code Here


*/
public class TheaterBridgeProvider2 implements BridgeProvider {
  @Override
  public FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext) {
    if ( bridgeProviderContext.getReturnType().equals( Theater.class ) ) {
      return new String2FieldBridgeAdaptor( new StringBridge() {

        @Override
        public String objectToString(Object object) {
          return ( (Theater) object ).toString();
        }
View Full Code Here

*/
public class TheaterBridgeProvider1 implements BridgeProvider {
  @Override
  public FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext) {
    if ( bridgeProviderContext.getReturnType().equals( Theater.class ) ) {
      return new String2FieldBridgeAdaptor( new StringBridge() {

        @Override
        public String objectToString(Object object) {
          return ( (Theater) object ).toString();
        }
View Full Code Here

*/
public class MovieBridgeProvider implements BridgeProvider {
  @Override
  public FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext) {
    if ( bridgeProviderContext.getReturnType().equals( Movie.class ) ) {
      return new String2FieldBridgeAdaptor( new StringBridge() {

        @Override
        public String objectToString(Object object) {
          return ( (Movie) object ).toString();
        }
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.StringBridge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.