blob: 97807aa384893c5f964a016c24bc07b126319186 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Query (Apache Juneau 9.0.0)</title>
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Query (Apache Juneau 9.0.0)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/http/annotation/PathAnnotation.Builder.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/http/annotation/QueryAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Query.html" target="_top">Frames</a></li>
<li><a href="Query.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.juneau.http.annotation</div>
<h2 title="Annotation Type Query" class="title">Annotation Type Query</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Documented.html?is-external=true" title="class or interface in java.lang.annotation">@Documented</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>={<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>})
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>)
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Inherited.html?is-external=true" title="class or interface in java.lang.annotation">@Inherited</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true" title="class or interface in java.lang.annotation">@Repeatable</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/QueryAnnotation.Array.html" title="annotation in org.apache.juneau.http.annotation">QueryAnnotation.Array.class</a>)
<a href="../../../../../org/apache/juneau/annotation/ContextApply.html" title="annotation in org.apache.juneau.annotation">@ContextApply</a>(<a href="../../../../../org/apache/juneau/annotation/ContextApply.html#value--">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/QueryAnnotation.Applier.html" title="class in org.apache.juneau.http.annotation">QueryAnnotation.Applier.class</a>)
public @interface <a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.97">Query</a></pre>
<div class="block">REST request form-data annotation.
<p>
Identifies a POJO to be used as a form-data entry on an HTTP request.
<p>
Can be used in the following locations:
<ul>
<li>Arguments and argument-types of server-side <ja>@RestOp</ja>-annotated methods.
<li>Arguments and argument-types of client-side <ja>@RemoteResource</ja>-annotated interfaces.
<li>Methods and return types of server-side and client-side <ja>@Request</ja>-annotated interfaces.
</ul>
<h5 class='topic'>Arguments and argument-types of server-side @RestOp-annotated methods</h5>
<p>
Annotation that can be applied to a parameter of a <ja>@RestOp</ja>-annotated method to identify it as a URL query parameter.
<p class='w800'>
Unlike <a href="../../../../../org/apache/juneau/http/annotation/FormData.html" title="annotation in org.apache.juneau.http.annotation"><code>@FormData</code></a>, using this annotation does not result in the servlet reading the contents of
URL-encoded form posts.
Therefore, this annotation can be used in conjunction with the <a href="../../../../../org/apache/juneau/http/annotation/Content.html" title="annotation in org.apache.juneau.http.annotation"><code>@Content</code></a> annotation or
<c>RestRequest.getContent()</c> method for <c>application/x-www-form-urlencoded POST</c> calls.
<h5 class='section'>Example:</h5>
<p class='bjava'>
<ja>@RestGet</ja>
<jk>public void</jk> doGet(
<ja>@Query</ja>(<js>"p1"</js>) <jk>int</jk> <jv>p1</jv>,
<ja>@Query</ja>(<js>"p2"</js>) String <jv>p2</jv>,
<ja>@Query</ja>(<js>"p3"</js>) UUID <jv>p3</jv>
) {...}
</p>
<p>
This is functionally equivalent to the following code...
<p class='bjava'>
<ja>@RestGet</ja>
<jk>public void</jk> doGet(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) {
<jk>int</jk> <jv>p1</jv> = <jv>req</jv>.getQueryParam(<js>"p1"</js>).asInteger().orElse(0);
String <jv>p2</jv> = <jv>req</jv>.getQueryParam(<js>"p2"</js>).asString().orElse(<jk>null</jk>);
UUID <jv>p3</jv> = <jv>req</jv>.getQueryParam(<js>"p3"</js>).as(UUID.<jk>class</jk>).orElse(<jk>null</jk>);
...
}
</p>
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.jrs.Swagger'>Overview &gt; juneau-rest-server &gt; Swagger</a>
<li class='extlink'><a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>
</ul>
<h5 class='topic'>Arguments and argument-types of client-side @RemoteResource-annotated interfaces</h5>
<p>
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Query'>Overview &gt; juneau-rest-client &gt; REST Proxies &gt; @Query</a>
</ul>
<h5 class='topic'>Methods and return types of server-side and client-side @Request-annotated interfaces</h5>
<p>
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Request'>Overview &gt; juneau-rest-client &gt; REST Proxies &gt; @Request</a>
</ul>
<p>
<ul class='seealso'>
<li class='extlink'><a class='doclink' target='_blank' href='https://github.com/apache/juneau/blob/master/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/Query.java'>Source</a>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.optional.element.summary">
<!-- -->
</a>
<h3>Optional Element Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Optional Element and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#def--">def</a></span></code>
<div class="block">Default value for this parameter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#name--">name</a></span></code>
<div class="block">URL query parameter name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#on--">on</a></span></code>
<div class="block">Dynamically apply this annotation to the specified classes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#onClass--">onClass</a></span></code>
<div class="block">Dynamically apply this annotation to the specified classes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#parser--">parser</a></span></code>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#schema--">schema</a></span></code>
<div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#serializer--">serializer</a></span></code>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Query.html#value--">value</a></span></code>
<div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/Query.html#name--"><code>name()</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="annotation.type.element.detail">
<!-- -->
</a>
<h3>Element Detail</h3>
<a name="def--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>def</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.104">def</a></pre>
<div class="block">Default value for this parameter.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="name--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>name</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.168">name</a></pre>
<div class="block">URL query parameter name.
Required. The name of the parameter. Parameter names are case sensitive.
<p>
The value should be either a valid query parameter name, or <js>"*"</js> to represent multiple name/value pairs
<p>
A blank value (the default) has the following behavior:
<ul class='spaced-list'>
<li>
If the data type is <c>NameValuePairs</c>, <c>Map</c>, or a bean,
then it's the equivalent to <js>"*"</js> which will cause the value to be serialized as name/value pairs.
<h5 class='figure'>Examples:</h5>
<p class='bjava'>
<jc>// When used on a REST method</jc>
<ja>@RestPost</ja>
<jk>public void</jk> addPet(<ja>@Query</ja> JsonMap <jv>allQueryParameters</jv>) {...}
</p>
<p class='bjava'>
<jc>// When used on a remote method parameter</jc>
<ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>)
<jk>public interface</jk> MyProxy {
<jc>// Equivalent to @Query("*")</jc>
<ja>@RemoteGet</ja>(<js>"/mymethod"</js>)
String myProxyMethod1(<ja>@Query</ja> Map&lt;String,Object&gt; <jv>allQueryParameters</jv>);
}
</p>
<p class='bjava'>
<jc>// When used on a request bean method</jc>
<jk>public interface</jk> MyRequest {
<jc>// Equivalent to @Query("*")</jc>
<ja>@Query</ja>
Map&lt;String,Object&gt; getFoo();
}
</p>
</li>
<li>
If used on a request bean method, uses the bean property name.
<h5 class='figure'>Example:</h5>
<p class='bjava'>
<jk>public interface</jk> MyRequest {
<jc>// Equivalent to @Query("foo")</jc>
<ja>@Query</ja>
String getFoo();
}
</p>
</li>
</ul>
<ul class='notes'>
<li class='note'>
The format is plain-text.
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="on--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>on</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.179">on</a></pre>
<div class="block">Dynamically apply this annotation to the specified classes.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview &gt; juneau-marshall &gt; Dynamically Applied Annotations</a>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="onClass--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onClass</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.193">onClass</a></pre>
<div class="block">Dynamically apply this annotation to the specified classes.
<p>
Identical to <a href="../../../../../org/apache/juneau/http/annotation/Query.html#on--"><code>on()</code></a> except allows you to specify class objects instead of a strings.
<ul class='seealso'>
<li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview &gt; juneau-marshall &gt; Dynamically Applied Annotations</a>
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>{}</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="parser--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parser</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.203">parser</a></pre>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values.
<p>
Overrides for this part the part parser defined on the REST resource which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>org.apache.juneau.httppart.HttpPartParser.Void.class</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="schema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>schema</h4>
<pre>public abstract&nbsp;<a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.228">schema</a></pre>
<div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>.
<p>
The <a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation"><code>@Schema</code></a> annotation can also be used standalone on the parameter or type.
Values specified on this field override values specified on the type, and values specified on child types override values
specified on parent types.
<p>
The schema defining the type used for parameter.
<h5 class='section'>Used for:</h5>
<ul class='spaced-list'>
<li>
Server-side schema-based parsing and parsing validation.
<li>
Server-side generated Swagger documentation.
<li>
Client-side schema-based serializing and serializing validation.
</ul></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>@org.apache.juneau.annotation.Schema</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="serializer--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serializer</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.238">serializer</a></pre>
<div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings.
<p>
Overrides for this part the part serializer defined on the REST client which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>org.apache.juneau.httppart.HttpPartSerializer.Void.class</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="value--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>value</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/juneau/http/annotation/Query.html#line.257">value</a></pre>
<div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/Query.html#name--"><code>name()</code></a>.
<p>
Allows you to use shortened notation if you're only specifying the name.
<p>
The following are completely equivalent ways of defining the existence of a query entry:
<p class='bjava'>
<jk>public</jk> Order placeOrder(<ja>@Query</ja>(name=<js>"petId"</js>) <jk>long</jk> <jv>petId</jv>) {...}
</p>
<p class='bjava'>
<jk>public</jk> Order placeOrder(<ja>@Query</ja>(<js>"petId"</js>) <jk>long</jk> <jv>petId</jv>) {...}
</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The annotation value.</dd>
</dl>
<dl>
<dt>Default:</dt>
<dd>""</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/juneau/http/annotation/PathAnnotation.Builder.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/juneau/http/annotation/QueryAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Query.html" target="_top">Frames</a></li>
<li><a href="Query.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Required&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#annotation.type.element.detail">Element</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>