diff --git a/jOOQ/src/main/java/org/jooq/Param.java b/jOOQ/src/main/java/org/jooq/Param.java index ad9d48298a..3abca3be4c 100644 --- a/jOOQ/src/main/java/org/jooq/Param.java +++ b/jOOQ/src/main/java/org/jooq/Param.java @@ -125,4 +125,9 @@ public interface Param extends Field { * The parameter type. */ ParamType getParamType(); + + /** + * The parameter mode. + */ + ParamMode getParamMode(); } diff --git a/jOOQ/src/main/java/org/jooq/ParamMode.java b/jOOQ/src/main/java/org/jooq/ParamMode.java new file mode 100644 index 0000000000..0fd48de1a3 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/ParamMode.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com) + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Other licenses: + * ----------------------------------------------------------------------------- + * Commercial licenses for this work are available. These replace the above + * ASL 2.0 and offer limited warranties, support, maintenance, and commercial + * database integrations. + * + * For more information, please visit: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq; + +/** + * The mode of a {@link Param}. + * + * @author Lukas Eder + */ +public enum ParamMode { + + /** + * An IN parameter. + *

+ * This is the default parameter mode if no explicit mode was specified. + */ + IN, + + /** + * An OUT parameter. + */ + OUT, + + /** + * An IN OUT parameter. + */ + INOUT; +} diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractParam.java b/jOOQ/src/main/java/org/jooq/impl/AbstractParam.java index 9edacc31c6..e141f91d39 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AbstractParam.java +++ b/jOOQ/src/main/java/org/jooq/impl/AbstractParam.java @@ -52,6 +52,7 @@ import org.jooq.Clause; import org.jooq.Context; import org.jooq.DataType; import org.jooq.Param; +import org.jooq.ParamMode; import org.jooq.UDTRecord; import org.jooq.conf.ParamType; import org.jooq.tools.StringUtils; @@ -170,4 +171,9 @@ abstract class AbstractParam extends AbstractField implements Param { : NAMED ; } + + @Override + public final ParamMode getParamMode() { + return ParamMode.IN; + } }