Examples of objectToString()


Examples of org.hibernate.search.bridge.TwoWayFieldBridge.objectToString()

  private void index( Object entity, Session session ) throws InterruptedException {
    Serializable id = session.getIdentifier( entity );
    Class clazz = Hibernate.getClass( entity );
    DocumentBuilderIndexedEntity docBuilder = documentBuilders.get( clazz );
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    String idInString = idBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

Examples of org.hibernate.search.bridge.TwoWayFieldBridge.objectToString()

  private void index( Object entity, Session session ) throws InterruptedException {
    Serializable id = session.getIdentifier( entity );
    Class clazz = Hibernate.getClass( entity );
    DocumentBuilderIndexedEntity docBuilder = documentBuilders.get( clazz );
    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    String idInString = idBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

Examples of org.hibernate.search.bridge.builtin.CalendarBridge.objectToString()

    CalendarBridge bridge = new CalendarBridge();
    HashMap<String, String> bridgeParams = new HashMap<String, String>();
    bridgeParams.put( CalendarBridge.RESOLUTION_PARAMETER, Resolution.YEAR.toString() );
    bridge.setParameterValues( bridgeParams );
    assertEquals( "2000", bridge.objectToString( c ) );
    bridgeParams.put( CalendarBridge.RESOLUTION_PARAMETER, Resolution.DAY.toString() );
    bridge.setParameterValues( bridgeParams );
    assertEquals( "20001215", bridge.objectToString( c ) );
  }
View Full Code Here

Examples of org.hibernate.search.bridge.builtin.CalendarBridge.objectToString()

    bridgeParams.put( CalendarBridge.RESOLUTION_PARAMETER, Resolution.YEAR.toString() );
    bridge.setParameterValues( bridgeParams );
    assertEquals( "2000", bridge.objectToString( c ) );
    bridgeParams.put( CalendarBridge.RESOLUTION_PARAMETER, Resolution.DAY.toString() );
    bridge.setParameterValues( bridgeParams );
    assertEquals( "20001215", bridge.objectToString( c ) );
  }

  @Test
  public void testIncorrectSetBridge() throws Exception {
    IncorrectSet incorrect = new IncorrectSet();
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

  private String objectToString(TwoWayFieldBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setFieldBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setStringBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, boolean isBatch) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap );
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

  private String objectToString(TwoWayFieldBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setFieldBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

  private String objectToString(StringBridge bridge, String fieldName, Object value) {
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass( getBeanClass() )
        .setStringBridge( bridge )
        .setFieldName( fieldName );
    return contextualBridge.objectToString( value );
  }

  public AddLuceneWork createAddWork(Class<T> entityClass, T entity, Serializable id, String idInString, boolean isBatch) {
    Map<String, String> fieldToAnalyzerMap = new HashMap<String, String>();
    Document doc = getDocument( entity, id, fieldToAnalyzerMap );
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass(clazz)
        .setFieldName(docBuilder.getIdKeywordName())
        .setFieldBridge(idBridge);
    String idInString = contextualBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here

Examples of org.hibernate.search.bridge.util.ContextualException2WayBridge.objectToString()

    TwoWayFieldBridge idBridge = docBuilder.getIdBridge();
    ContextualException2WayBridge contextualBridge = new ContextualException2WayBridge()
        .setClass(clazz)
        .setFieldName(docBuilder.getIdKeywordName())
        .setFieldBridge(idBridge);
    String idInString = contextualBridge.objectToString( id );
    //depending on the complexity of the object graph going to be indexed it's possible
    //that we hit the database several times during work construction.
    AddLuceneWork addWork = docBuilder.createAddWork( clazz, entity, id, idInString, true );
    backend.enqueueAsyncWork( addWork );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.