blob: 61f9f21ecb44d0fa0d1360c06a6a7ee8d6ceb1b2 [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 (1.8.0_112) on Mon Oct 14 11:36:18 MSK 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DbAttribute (cayenne-doc: Cayenne Documentation 4.0.2 API)</title>
<meta name="date" content="2019-10-14">
<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="DbAttribute (cayenne-doc: Cayenne Documentation 4.0.2 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/DbAttribute.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/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/map/DbAttribute.html" target="_top">Frames</a></li>
<li><a href="DbAttribute.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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.cayenne.map</div>
<h2 title="Class DbAttribute" class="title">Class DbAttribute</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">org.apache.cayenne.map.Attribute</a></li>
<li>
<ul class="inheritance">
<li>org.apache.cayenne.map.DbAttribute</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="../../../../org/apache/cayenne/configuration/ConfigurationNode.html" title="interface in org.apache.cayenne.configuration">ConfigurationNode</a>, <a href="../../../../org/apache/cayenne/util/CayenneMapEntry.html" title="interface in org.apache.cayenne.util">CayenneMapEntry</a>, <a href="../../../../org/apache/cayenne/util/XMLSerializable.html" title="interface in org.apache.cayenne.util">XMLSerializable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">DbAttribute</span>
extends <a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a>
implements <a href="../../../../org/apache/cayenne/configuration/ConfigurationNode.html" title="interface in org.apache.cayenne.configuration">ConfigurationNode</a></pre>
<div class="block">A DbAttribute defines a descriptor for a single database table column.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../serialized-form.html#org.apache.cayenne.map.DbAttribute">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#attributePrecision">attributePrecision</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#generated">generated</a></span></code>
<div class="block">Defines whether this column value is generated by the database.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#mandatory">mandatory</a></span></code>
<div class="block">Defines whether the attribute allows nulls.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#maxLength">maxLength</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#primaryKey">primaryKey</a></span></code>
<div class="block">Defines whether the attribute is a part of the table primary key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#scale">scale</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#type">type</a></span></code>
<div class="block">Defines JDBC type of the column.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.cayenne.map.Attribute">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.cayenne.map.<a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a></h3>
<code><a href="../../../../org/apache/cayenne/map/Attribute.html#entity">entity</a>, <a href="../../../../org/apache/cayenne/map/Attribute.html#name">name</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#DbAttribute--">DbAttribute</a></span>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#DbAttribute-java.lang.String-">DbAttribute</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#DbAttribute-java.lang.String-int-org.apache.cayenne.map.DbEntity-">DbAttribute</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
int&nbsp;type,
<a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#acceptVisitor-org.apache.cayenne.configuration.ConfigurationNodeVisitor-">acceptVisitor</a></span>(<a href="../../../../org/apache/cayenne/configuration/ConfigurationNodeVisitor.html" title="interface in org.apache.cayenne.configuration">ConfigurationNodeVisitor</a>&lt;T&gt;&nbsp;visitor)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#encodeAsXML-org.apache.cayenne.util.XMLEncoder-">encodeAsXML</a></span>(<a href="../../../../org/apache/cayenne/util/XMLEncoder.html" title="class in org.apache.cayenne.util">XMLEncoder</a>&nbsp;encoder)</code>
<div class="block">Prints itself as XML to the provided XMLEncoder.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/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/cayenne/map/DbAttribute.html#getAliasedName-java.lang.String-">getAliasedName</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;alias)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#getAttributePrecision--">getAttributePrecision</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#getEntity--">getEntity</a></span>()</code>
<div class="block">Returns parent entity that holds this attribute.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#getMaxLength--">getMaxLength</a></span>()</code>
<div class="block">Returns the length of database column described by this attribute.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#getScale--">getScale</a></span>()</code>
<div class="block">Returns the number of digits after period for decimal attributes.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#getType--">getType</a></span>()</code>
<div class="block">Returns the SQL type of the column.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#isForeignKey--">isForeignKey</a></span>()</code>
<div class="block">Returns <code>true</code> if the DB column represented by this attribute
is a foreign key, referencing another table.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#isGenerated--">isGenerated</a></span>()</code>
<div class="block">Returns true if this column value is generated by the database.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#isMandatory--">isMandatory</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#isPrimaryKey--">isPrimaryKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setAttributePrecision-int-">setAttributePrecision</a></span>(int&nbsp;attributePrecision)</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setGenerated-boolean-">setGenerated</a></span>(boolean&nbsp;generated)</code>
<div class="block">Updates attribute "generated" property.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setMandatory-boolean-">setMandatory</a></span>(boolean&nbsp;mandatory)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setMaxLength-int-">setMaxLength</a></span>(int&nbsp;maxLength)</code>
<div class="block">Sets the length of character or binary type or max num of digits for
DECIMAL.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setPrimaryKey-boolean-">setPrimaryKey</a></span>(boolean&nbsp;primaryKey)</code>
<div class="block">Updates attribute "primaryKey" property.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setScale-int-">setScale</a></span>(int&nbsp;scale)</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/cayenne/map/DbAttribute.html#setType-int-">setType</a></span>(int&nbsp;type)</code>
<div class="block">Sets the SQL type for the column.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/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/cayenne/map/DbAttribute.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.cayenne.map.Attribute">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.cayenne.map.<a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a></h3>
<code><a href="../../../../org/apache/cayenne/map/Attribute.html#getName--">getName</a>, <a href="../../../../org/apache/cayenne/map/Attribute.html#getParent--">getParent</a>, <a href="../../../../org/apache/cayenne/map/Attribute.html#setEntity-org.apache.cayenne.map.Entity-">setEntity</a>, <a href="../../../../org/apache/cayenne/map/Attribute.html#setName-java.lang.String-">setName</a>, <a href="../../../../org/apache/cayenne/map/Attribute.html#setParent-java.lang.Object-">setParent</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="type">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre>protected&nbsp;int type</pre>
<div class="block">Defines JDBC type of the column.</div>
</li>
</ul>
<a name="mandatory">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mandatory</h4>
<pre>protected&nbsp;boolean mandatory</pre>
<div class="block">Defines whether the attribute allows nulls.</div>
</li>
</ul>
<a name="primaryKey">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>primaryKey</h4>
<pre>protected&nbsp;boolean primaryKey</pre>
<div class="block">Defines whether the attribute is a part of the table primary key.</div>
</li>
</ul>
<a name="generated">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>generated</h4>
<pre>protected&nbsp;boolean generated</pre>
<div class="block">Defines whether this column value is generated by the database. Other
terms for such columns are "auto-increment" or "identity".</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="maxLength">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxLength</h4>
<pre>protected&nbsp;int maxLength</pre>
</li>
</ul>
<a name="scale">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scale</h4>
<pre>protected&nbsp;int scale</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="attributePrecision">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>attributePrecision</h4>
<pre>protected&nbsp;int attributePrecision</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DbAttribute--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DbAttribute</h4>
<pre>public&nbsp;DbAttribute()</pre>
</li>
</ul>
<a name="DbAttribute-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DbAttribute</h4>
<pre>public&nbsp;DbAttribute(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name)</pre>
</li>
</ul>
<a name="DbAttribute-java.lang.String-int-org.apache.cayenne.map.DbEntity-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DbAttribute</h4>
<pre>public&nbsp;DbAttribute(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;name,
int&nbsp;type,
<a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;entity)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getEntity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEntity</h4>
<pre>public&nbsp;<a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map">DbEntity</a>&nbsp;getEntity()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/cayenne/map/Attribute.html#getEntity--">Attribute</a></code></span></div>
<div class="block">Returns parent entity that holds this attribute.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/map/Attribute.html#getEntity--">getEntity</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a></code></dd>
</dl>
</li>
</ul>
<a name="acceptVisitor-org.apache.cayenne.configuration.ConfigurationNodeVisitor-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acceptVisitor</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T&nbsp;acceptVisitor(<a href="../../../../org/apache/cayenne/configuration/ConfigurationNodeVisitor.html" title="interface in org.apache.cayenne.configuration">ConfigurationNodeVisitor</a>&lt;T&gt;&nbsp;visitor)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/configuration/ConfigurationNode.html#acceptVisitor-org.apache.cayenne.configuration.ConfigurationNodeVisitor-">acceptVisitor</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/configuration/ConfigurationNode.html" title="interface in org.apache.cayenne.configuration">ConfigurationNode</a></code></dd>
</dl>
</li>
</ul>
<a name="encodeAsXML-org.apache.cayenne.util.XMLEncoder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeAsXML</h4>
<pre>public&nbsp;void&nbsp;encodeAsXML(<a href="../../../../org/apache/cayenne/util/XMLEncoder.html" title="class in org.apache.cayenne.util">XMLEncoder</a>&nbsp;encoder)</pre>
<div class="block">Prints itself as XML to the provided XMLEncoder.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/util/XMLSerializable.html#encodeAsXML-org.apache.cayenne.util.XMLEncoder-">encodeAsXML</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/util/XMLSerializable.html" title="interface in org.apache.cayenne.util">XMLSerializable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/map/Attribute.html#encodeAsXML-org.apache.cayenne.util.XMLEncoder-">encodeAsXML</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a></code></dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="getAliasedName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAliasedName</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getAliasedName(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;alias)</pre>
</li>
</ul>
<a name="getType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre>public&nbsp;int&nbsp;getType()</pre>
<div class="block">Returns the SQL type of the column.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Types.html?is-external=true" title="class or interface in java.sql"><code>Types</code></a></dd>
</dl>
</li>
</ul>
<a name="setType-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setType</h4>
<pre>public&nbsp;void&nbsp;setType(int&nbsp;type)</pre>
<div class="block">Sets the SQL type for the column.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/sql/Types.html?is-external=true" title="class or interface in java.sql"><code>Types</code></a></dd>
</dl>
</li>
</ul>
<a name="isPrimaryKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPrimaryKey</h4>
<pre>public&nbsp;boolean&nbsp;isPrimaryKey()</pre>
</li>
</ul>
<a name="isForeignKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isForeignKey</h4>
<pre>public&nbsp;boolean&nbsp;isForeignKey()</pre>
<div class="block">Returns <code>true</code> if the DB column represented by this attribute
is a foreign key, referencing another table.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.1</dd>
</dl>
</li>
</ul>
<a name="setPrimaryKey-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPrimaryKey</h4>
<pre>public&nbsp;void&nbsp;setPrimaryKey(boolean&nbsp;primaryKey)</pre>
<div class="block">Updates attribute "primaryKey" property.</div>
</li>
</ul>
<a name="isMandatory--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMandatory</h4>
<pre>public&nbsp;boolean&nbsp;isMandatory()</pre>
</li>
</ul>
<a name="setMandatory-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMandatory</h4>
<pre>public&nbsp;void&nbsp;setMandatory(boolean&nbsp;mandatory)</pre>
</li>
</ul>
<a name="getMaxLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxLength</h4>
<pre>public&nbsp;int&nbsp;getMaxLength()</pre>
<div class="block">Returns the length of database column described by this attribute.</div>
</li>
</ul>
<a name="setMaxLength-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxLength</h4>
<pre>public&nbsp;void&nbsp;setMaxLength(int&nbsp;maxLength)</pre>
<div class="block">Sets the length of character or binary type or max num of digits for
DECIMAL.</div>
</li>
</ul>
<a name="isGenerated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isGenerated</h4>
<pre>public&nbsp;boolean&nbsp;isGenerated()</pre>
<div class="block">Returns true if this column value is generated by the database. Other
terms for such columns are "auto-increment" or "identity".</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="setGenerated-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGenerated</h4>
<pre>public&nbsp;void&nbsp;setGenerated(boolean&nbsp;generated)</pre>
<div class="block">Updates attribute "generated" property.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
<a name="getAttributePrecision--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttributePrecision</h4>
<pre>public&nbsp;int&nbsp;getAttributePrecision()</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="setAttributePrecision-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAttributePrecision</h4>
<pre>public&nbsp;void&nbsp;setAttributePrecision(int&nbsp;attributePrecision)</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="getScale--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScale</h4>
<pre>public&nbsp;int&nbsp;getScale()</pre>
<div class="block">Returns the number of digits after period for decimal attributes. Returns
"-1" if not set.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="setScale-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScale</h4>
<pre>public&nbsp;void&nbsp;setScale(int&nbsp;scale)</pre>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../org/apache/cayenne/map/Attribute.html#toString--">toString</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/cayenne/map/Attribute.html" title="class in org.apache.cayenne.map">Attribute</a></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/DbAttribute.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/cayenne/map/DataMap.html" title="class in org.apache.cayenne.map"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/cayenne/map/DbEntity.html" title="class in org.apache.cayenne.map"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/map/DbAttribute.html" target="_top">Frames</a></li>
<li><a href="DbAttribute.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2001&#x2013;2019 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</body>
</html>