| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_201) on Wed Apr 24 20:07:06 CEST 2019 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>BooleanRepresentation (OpenJPA Parent POM 3.1.0 API)</title> |
| <meta name="date" content="2019-04-24"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.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="BooleanRepresentation (OpenJPA Parent POM 3.1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </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="class-use/BooleanRepresentation.html">Use</a></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/openjpa/jdbc/sql/AccessDictionary.html" title="class in org.apache.openjpa.jdbc.sql"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.html" title="class in org.apache.openjpa.jdbc.sql"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" target="_top">Frames</a></li> |
| <li><a href="BooleanRepresentation.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</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.openjpa.jdbc.sql</div> |
| <h2 title="Interface BooleanRepresentation" class="title">Interface BooleanRepresentation<REPRESENTATION_TYPE></h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>REPRESENTATION_TYPE</code> - the java type which is used to store the Boolean in the database, |
| e.g. <code>String</code> or <code>Integer</code></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.BooleanBooleanRepresentation.html" title="class in org.apache.openjpa.jdbc.sql">BooleanRepresentationFactory.BooleanBooleanRepresentation</a>, <a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.Int10BooleanRepresentation.html" title="class in org.apache.openjpa.jdbc.sql">BooleanRepresentationFactory.Int10BooleanRepresentation</a>, <a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.StringBooleanRepresentation.html" title="class in org.apache.openjpa.jdbc.sql">BooleanRepresentationFactory.StringBooleanRepresentation</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">BooleanRepresentation<REPRESENTATION_TYPE></span></pre> |
| <div class="block"><p>Defines how a <code>Boolean</code> or <code>boolean</code> value |
| gets stored in the database by default.</p> |
| |
| <p>The <a href="../../../../../org/apache/openjpa/jdbc/sql/DBDictionary.html" title="class in org.apache.openjpa.jdbc.sql"><code>DBDictionary</code></a> defines a default representation for <code>Boolean</code> |
| and <code>boolean</code> fields in JPA entities. The <a href="../../../../../org/apache/openjpa/jdbc/sql/OracleDictionary.html" title="class in org.apache.openjpa.jdbc.sql"><code>OracleDictionary</code></a> |
| for example uses a <code>NUMBER(1)</code> with the values <code>(int) 1</code> and <code>(int) 0</code> by default. |
| However, sometimes you like to use a different default representation for Boolean values in your database. |
| If your application likes to store boolean values in a <code>CHAR(1)</code> field with <code>"T"</code> and |
| <code>"F"</code> values then you might configure the <a href="../../../../../org/apache/openjpa/jdbc/sql/DBDictionary.html" title="class in org.apache.openjpa.jdbc.sql"><code>DBDictionary</code></a> |
| to use the <code>"STRING_TF"</code> BooleanRepresentation: |
| <pre> |
| <property name="openjpa.jdbc.DBDictionary" |
| value="(BitTypeName=CHAR(1),BooleanTypeName=CHAR(1),BooleanRepresentation=STRING_10)"/> |
| </pre> |
| |
| Please note that you still need to adopt the mapping separately by setting the |
| <code>BitTypeName</code> and/or <code>BooleanTypeName</code> (depending on your database) to |
| the desired type in the database. |
| </p> |
| |
| <p>The following <code>BooleanRepresentation</code> configuration options are possible: |
| <ul> |
| <li>One of the values of |
| <a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.html#BUILTIN_BOOLEAN_REPRESENTATIONS"><code>BooleanRepresentationFactory.BUILTIN_BOOLEAN_REPRESENTATIONS</code></a> |
| , e.g.: |
| <pre> |
| <property name="openjpa.jdbc.DBDictionary" value="(BooleanRepresentation=STRING_YN)"/> |
| </pre> |
| </li> |
| <li> |
| Two slash (<code>'/'</code>) separated true/false value strings: |
| <pre> |
| <property name="openjpa.jdbc.DBDictionary" value="(BooleanRepresentation=oui/non)"/> |
| </pre> |
| </li> |
| <li> |
| A fully qualified class name of your own <a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" title="interface in org.apache.openjpa.jdbc.sql"><code>BooleanRepresentation</code></a> |
| implementation, e.g.: |
| <pre> |
| <property name="openjpa.jdbc.DBDictionary" |
| value="(BooleanRepresentation=com.mycompany.MyOwnBoolRepresentation)"/> |
| </pre> |
| </li> |
| </ul> |
| |
| </p> |
| |
| <p>If a single column uses a different representation then they |
| still can tweak this for those columns with the |
| <code>org.apache.openjpa.persistence.ExternalValues</code> annotation.</p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html#getBoolean-java.sql.ResultSet-int-">getBoolean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a> rs, |
| int columnIndex)</code> |
| <div class="block">Read the boolean from the given ResultSet</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" title="type parameter in BooleanRepresentation">REPRESENTATION_TYPE</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html#getRepresentation-boolean-">getRepresentation</a></span>(boolean bool)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html#setBoolean-java.sql.PreparedStatement-int-boolean-">setBoolean</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a> stmnt, |
| int columnIndex, |
| boolean val)</code> |
| <div class="block">Set the boolean value into the statement</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setBoolean-java.sql.PreparedStatement-int-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setBoolean</h4> |
| <pre>void setBoolean(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html?is-external=true" title="class or interface in java.sql">PreparedStatement</a> stmnt, |
| int columnIndex, |
| boolean val) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre> |
| <div class="block">Set the boolean value into the statement</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBoolean-java.sql.ResultSet-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBoolean</h4> |
| <pre>boolean getBoolean(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSet.html?is-external=true" title="class or interface in java.sql">ResultSet</a> rs, |
| int columnIndex) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre> |
| <div class="block">Read the boolean from the given ResultSet</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRepresentation-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getRepresentation</h4> |
| <pre><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" title="type parameter in BooleanRepresentation">REPRESENTATION_TYPE</a> getRepresentation(boolean bool)</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>return the representation for <code>true</code> and <code>false</code></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="class-use/BooleanRepresentation.html">Use</a></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/openjpa/jdbc/sql/AccessDictionary.html" title="class in org.apache.openjpa.jdbc.sql"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/openjpa/jdbc/sql/BooleanRepresentationFactory.html" title="class in org.apache.openjpa.jdbc.sql"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/openjpa/jdbc/sql/BooleanRepresentation.html" target="_top">Frames</a></li> |
| <li><a href="BooleanRepresentation.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2006–2019 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |