<commit_before>/*
 * Hibernate OGM, Domain model persistence for NoSQL datastores
 *
 * 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.ogm.backendtck.storedprocedures;

import static org.fest.assertions.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.isA;
import static org.hibernate.ogm.backendtck.storedprocedures.Car.RESULT_SET_PROC;
import static org.hibernate.ogm.backendtck.storedprocedures.Car.SIMPLE_VALUE_PROC;
import static org.hibernate.ogm.utils.GridDialectType.HASHMAP;
import static org.hibernate.ogm.utils.GridDialectType.INFINISPAN;
import static org.hibernate.ogm.utils.GridDialectType.INFINISPAN_REMOTE;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.Parameter;
import javax.persistence.ParameterMode;
import javax.persistence.PersistenceException;
import javax.persistence.StoredProcedureQuery;

import org.hibernate.HibernateException;
import org.hibernate.ogm.utils.SkipByGridDialect;
import org.hibernate.ogm.utils.TestForIssue;
import org.hibernate.ogm.utils.jpa.OgmJpaTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

/**
 * Testing call of stored procedures that supports indexed parameters
 * <p>
 * Note that the datastore must have defined 2 stored procedures:
 * <p>
 * One that returns a value that can be mapped to {@link Car} and another store procedure that returns the value passed
 * as parameter. The name of the stored procedures are respectively {@link Car#RESULT_SET_PROC} and
 * {@link Car#SIMPLE_VALUE_PROC}.
 *
 * @author <NAME> &amp;<EMAIL>.com&amp;
 */
@SkipByGridDialect(
		value = { HASHMAP, INFINISPAN, INFINISPAN_REMOTE },
		comment = "These dialects not support stored procedures with positional parameters")
@TestForIssue(jiraKey = { "OGM-359" })
public class PositionalParametersStoredProcedureCallTest extends OgmJpaTestCase {

	@Rule
	public ExpectedException thrown = ExpectedException.none();

	protected EntityManager em;

	@Before
	public void setUp() {
		em = getFactory().createEntityManager();
	}<commit_msg>OGM-1349 Exclude Neo4j remote dialects from stored procedures tests<commit_after>/*
 * Hibernate OGM, Domain model persistence for NoSQL datastores
 *
 * 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.ogm.backendtck.storedprocedures;

import static org.fest.assertions.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.isA;
import static org.hibernate.ogm.backendtck.storedprocedures.Car.RESULT_SET_PROC;
import static org.hibernate.ogm.backendtck.storedprocedures.Car.SIMPLE_VALUE_PROC;
import static org.hibernate.ogm.utils.GridDialectType.HASHMAP;
import static org.hibernate.ogm.utils.GridDialectType.INFINISPAN;
import static org.hibernate.ogm.utils.GridDialectType.INFINISPAN_REMOTE;
import static org.hibernate.ogm.utils.GridDialectType.NEO4J_REMOTE;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.Parameter;
import javax.persistence.ParameterMode;
import javax.persistence.PersistenceException;
import javax.persistence.StoredProcedureQuery;

import org.hibernate.HibernateException;
import org.hibernate.ogm.utils.SkipByGridDialect;
import org.hibernate.ogm.utils.TestForIssue;
import org.hibernate.ogm.utils.jpa.OgmJpaTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

/**
 * Testing call of stored procedures that supports indexed parameters
 * <p>
 * Note that the datastore must have defined 2 stored procedures:
 * <p>
 * One that returns a value that can be mapped to {@link Car} and another store procedure that returns the value passed
 * as parameter. The name of the stored procedures are respectively {@link Car#RESULT_SET_PROC} and
 * {@link Car#SIMPLE_VALUE_PROC}.
 *
 * @author <NAME> &amp;<EMAIL>&amp;
 */
@SkipByGridDialect(
		value = {HASHMAP, INFINISPAN, INFINISPAN_REMOTE, NEO4J_REMOTE},
		comment = "These dialects not support stored procedures with positional parameters")
@TestForIssue(jiraKey = { "OGM-359" })
public class PositionalParametersStoredProcedureCallTest extends OgmJpaTestCase {

	@Rule
	public ExpectedException thrown = ExpectedException.none();

	protected EntityManager em;

	@Before
	public void setUp() {
		em = getFactory().createEntityManager();
	}
{'fraction_non_alphanumeric': 0.09271948608137046, 'fraction_numerical': 0.004925053533190578, 'mean_word_length': 5.730547550432276, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2899213', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1427, 'n_words': 370}