001/*
002 * Copyright (c) 2008, 2009, 2011 Oracle, Inc. All rights reserved.
003 *
004 * This program and the accompanying materials are made available under the
005 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
006 * which accompanies this distribution.  The Eclipse Public License is available
007 * at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License
008 * is available at http://www.eclipse.org/org/documents/edl-v10.php.
009 */
010package javax.persistence;
011
012import java.lang.annotation.Retention;
013import java.lang.annotation.Target;
014
015import static java.lang.annotation.RetentionPolicy.RUNTIME;
016
017/**
018 * Specifies a parameter of a named stored procedure query. All parameters of a named stored procedure query
019 * must be specified.
020 *
021 * @see StoredProcedureQuery
022 * @see ParameterMode
023 * @since Java Persistence 2.1
024 */
025@Target({})
026@Retention(RUNTIME)
027public @interface StoredProcedureParameter {
028  /**
029   * The name of the parameter as defined by the stored procedure in the database.
030   *
031   * @return name
032   */
033  String name() default "";
034
035  /**
036   * Specifies whether the parameter is an IN, INOUT, OUT, or REF_CURSOR parameter.
037   *
038   * @return mode of param
039   */
040  ParameterMode mode() default ParameterMode.IN;
041
042  /**
043   * JDBC type of the paramter.
044   *
045   * @return JDBC Type
046   */
047  Class type();
048}