Package at.molindo.esi4j.mapping

Examples of at.molindo.esi4j.mapping.TypeMapping.indexRequest()


      return this;
    }

    public IndexRequestBuilder toIndexRequest(Object object) {
      TypeMapping mapping = _context.findTypeMapping(object);
      return mapping.indexRequest(_client, _indexName, object);
    }

    public Session delete(Object o) {
      TypeMapping mapping = _context.findTypeMapping(o);
      delete(mapping.getTypeClass(), mapping.getId(o), mapping.getVersion(o));
View Full Code Here


      public ListenableActionFuture<BulkResponse> execute(Client client, String indexName, OperationContext helper) {
        BulkRequestBuilder request = client.prepareBulk();

        for (Object o : iterable) {
          TypeMapping mapping = helper.findTypeMapping(o);
          IndexRequestBuilder index = mapping.indexRequest(client, indexName, o);
          if (index != null) {
            request.add(index);
          }
        }
View Full Code Here

    @Override
    public ListenableActionFuture<IndexResponse> execute(Client client, String indexName, OperationContext helper) {
      final TypeMapping typeMapping = helper.findTypeMapping(_object);

      IndexRequestBuilder request = typeMapping.indexRequest(client, indexName, _object);
      if (request == null) {
        throw new Esi4JObjectFilteredException(typeMapping, _object);
      } else {
        return request.execute();
      }
View Full Code Here

      return this;
    }

    public IndexRequestBuilder toIndexRequest(Object object) {
      TypeMapping mapping = _context.findTypeMapping(object);
      return mapping.indexRequest(_client, _indexName, object);
    }

    public Session delete(Object o) {
      TypeMapping mapping = _context.findTypeMapping(o);
      delete(mapping.getTypeClass(), mapping.getId(o), mapping.getVersion(o));
View Full Code Here

  @Override
  public void addToBulk(BulkRequestBuilder bulk, String indexName, OperationContext context) {
    Object entity = getEntity();
    if (entity != null) {
      TypeMapping mapping = context.findTypeMapping(entity);
      IndexRequest index = mapping.indexRequest(indexName, entity);

      if (index != null) {
        bulk.add(index);
      } else {
        DeleteRequest delete = mapping.deleteRequest(indexName, entity);
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.