All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jnosql.artemis.hazelcast.key.HazelcastTemplate Maven / Gradle / Ivy

The newest version!
/*
 *  Copyright (c) 2017 Otávio Santana and others
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   Otavio Santana
 */
package org.jnosql.artemis.hazelcast.key;

import com.hazelcast.query.Predicate;
import org.jnosql.artemis.key.KeyValueTemplate;

import java.util.Collection;
import java.util.Map;

/**
 * A template layer to Hazelcast key-value type
 */
public interface HazelcastTemplate extends KeyValueTemplate {

    /**
     * Executes hazelcast query
     *
     * @param    the entity type
     * @param query the query
     * @return the result query
     * @throws NullPointerException when there is null query
     */
     Collection sql(String query);

    /**
     * Executes hazelcast query with named query.
     * E.g.:  bucketManager.query("name = :name", singletonMap("name", "Matrix"))
     *
     * @param query  the query
     * @param     the entity type
     * @param params the params to bind
     * @return the result query
     * @throws NullPointerException when there is null query
     */
     Collection sql(String query, Map params);

    /**
     * Executes hazelcast query
     *
     * @param predicate the hazelcast predicate
     * @param        the key type
     * @param        the value type
     * @return the result query
     * @throws NullPointerException when there is null predicate
     */
     Collection sql(Predicate predicate);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy