Plan/all/com/djrapitops/plan/storage/database/Database.html

369 lines
16 KiB
HTML
Raw Normal View History

2019-08-05 11:13:19 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="fi">
<head>
2019-10-05 10:27:37 +02:00
<!-- Generated by javadoc (1.8.0_201) on Sat Oct 05 11:26:16 EEST 2019 -->
<title>Database (Plan 5.0 build %buildNumber% API)</title>
<meta name="date" content="2019-10-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
2019-08-05 11:13:19 +02:00
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
2019-10-05 10:27:37 +02:00
parent.document.title="Database (Plan 5.0 build %buildNumber% API)";
2019-08-05 11:13:19 +02:00
}
}
catch(err) {
}
//-->
2019-10-05 10:27:37 +02:00
var methods = {"i0":6,"i1":6,"i2":18,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
2019-08-05 11:13:19 +02:00
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">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../overview-summary.html">Overview</a></li>
2019-08-05 11:13:19 +02:00
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
2019-10-05 10:27:37 +02:00
<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>
2019-08-05 11:13:19 +02:00
</ul>
</div>
<div class="subNav">
<ul class="navList">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../com/djrapitops/plan/storage/database/BukkitDBSystem.html" title="class in com.djrapitops.plan.storage.database"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/djrapitops/plan/storage/database/Database.State.html" title="enum in com.djrapitops.plan.storage.database"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
2019-08-05 11:13:19 +02:00
</ul>
<ul class="navList">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../index.html?com/djrapitops/plan/storage/database/Database.html" target="_top">Frames</a></li>
2019-08-05 11:13:19 +02:00
<li><a href="Database.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
2019-08-05 11:13:19 +02:00
</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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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">
2019-10-05 10:27:37 +02:00
<div class="subTitle">com.djrapitops.plan.storage.database</div>
2019-08-05 11:13:19 +02:00
<h2 title="Interface Database" class="title">Interface Database</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
2019-10-05 10:27:37 +02:00
<dd><a href="../../../../../com/djrapitops/plan/storage/database/AbstractDatabase.html" title="class in com.djrapitops.plan.storage.database">AbstractDatabase</a>, <a href="../../../../../com/djrapitops/plan/storage/database/H2DB.html" title="class in com.djrapitops.plan.storage.database">H2DB</a>, <a href="../../../../../com/djrapitops/plan/storage/database/MySQLDB.html" title="class in com.djrapitops.plan.storage.database">MySQLDB</a>, <a href="../../../../../com/djrapitops/plan/storage/database/SQLDB.html" title="class in com.djrapitops.plan.storage.database">SQLDB</a>, <a href="../../../../../com/djrapitops/plan/storage/database/SQLiteDB.html" title="class in com.djrapitops.plan.storage.database">SQLiteDB</a></dd>
2019-08-05 11:13:19 +02:00
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">Database</span></pre>
<div class="block">Interface for interacting with a Plan SQL database.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
2019-10-05 10:27:37 +02:00
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.State.html" title="enum in com.djrapitops.plan.storage.database">Database.State</a></span></code>
<div class="block">Possible State changes:
CLOSED to PATCHING (Database init),
PATCHING to OPEN (Database initialized),
OPEN to CLOSING (Database closing),
CLOSING to CLOSED (Database closed),
PATCHING to CLOSED (Database closed prematurely)</div>
</td>
2019-08-05 11:13:19 +02:00
</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">
2019-10-05 10:27:37 +02:00
<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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
2019-08-05 11:13:19 +02:00
<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>void</code></td>
2019-10-05 10:27:37 +02:00
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#close--">close</a></span>()</code>&nbsp;</td>
2019-08-05 11:13:19 +02:00
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.concurrent.Future&lt;?&gt;</code></td>
2019-10-05 10:27:37 +02:00
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#executeTransaction-com.djrapitops.plan.storage.database.transactions.Transaction-">executeTransaction</a></span>(<a href="../../../../../com/djrapitops/plan/storage/database/transactions/Transaction.html" title="class in com.djrapitops.plan.storage.database.transactions">Transaction</a>&nbsp;transaction)</code>
2019-08-05 11:13:19 +02:00
<div class="block">Execute an SQL Transaction.</div>
</td>
</tr>
<tr id="i2" class="altColor">
2019-10-05 10:27:37 +02:00
<td class="colFirst"><code>default <a href="../../../../../com/djrapitops/plan/storage/database/sql/parsing/Sql.html" title="class in com.djrapitops.plan.storage.database.sql.parsing">Sql</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#getSql--">getSql</a></span>()</code>&nbsp;</td>
2019-08-05 11:13:19 +02:00
</tr>
<tr id="i3" class="rowColor">
2019-10-05 10:27:37 +02:00
<td class="colFirst"><code><a href="../../../../../com/djrapitops/plan/storage/database/Database.State.html" title="enum in com.djrapitops.plan.storage.database">Database.State</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#getState--">getState</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../com/djrapitops/plan/storage/database/DBType.html" title="enum in com.djrapitops.plan.storage.database">DBType</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#getType--">getType</a></span>()</code>
2019-08-05 11:13:19 +02:00
<div class="block">Used to get the <code>DBType</code> of the Database</div>
</td>
</tr>
2019-10-05 10:27:37 +02:00
<tr id="i5" class="rowColor">
2019-08-05 11:13:19 +02:00
<td class="colFirst"><code>void</code></td>
2019-10-05 10:27:37 +02:00
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#init--">init</a></span>()</code>
2019-08-05 11:13:19 +02:00
<div class="block">Initializes the Database.</div>
</td>
</tr>
2019-10-05 10:27:37 +02:00
<tr id="i6" class="altColor">
2019-08-05 11:13:19 +02:00
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
2019-10-05 10:27:37 +02:00
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/djrapitops/plan/storage/database/Database.html#query-com.djrapitops.plan.storage.database.queries.Query-">query</a></span>(<a href="../../../../../com/djrapitops/plan/storage/database/queries/Query.html" title="interface in com.djrapitops.plan.storage.database.queries">Query</a>&lt;T&gt;&nbsp;query)</code>
2019-08-05 11:13:19 +02:00
<div class="block">Execute an SQL Query statement to get a result.</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="init--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>void&nbsp;init()</pre>
<div class="block">Initializes the Database.
<p>
Queries can be performed after this request has completed all required transactions for the database operations.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
2019-10-05 10:27:37 +02:00
<dd><code><a href="../../../../../com/djrapitops/plan/exceptions/database/DBInitException.html" title="class in com.djrapitops.plan.exceptions.database">DBInitException</a></code> - if Database fails to initiate.</dd>
2019-08-05 11:13:19 +02:00
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()</pre>
</li>
</ul>
2019-10-05 10:27:37 +02:00
<a name="query-com.djrapitops.plan.storage.database.queries.Query-">
2019-08-05 11:13:19 +02:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>query</h4>
2019-10-05 10:27:37 +02:00
<pre>&lt;T&gt;&nbsp;T&nbsp;query(<a href="../../../../../com/djrapitops/plan/storage/database/queries/Query.html" title="interface in com.djrapitops.plan.storage.database.queries">Query</a>&lt;T&gt;&nbsp;query)</pre>
2019-08-05 11:13:19 +02:00
<div class="block">Execute an SQL Query statement to get a result.
<p>
This method should only be called from an asynchronous thread.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - Type of the object to be returned.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>query</code> - QueryStatement to execute.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Result of the query.</dd>
</dl>
</li>
</ul>
2019-10-05 10:27:37 +02:00
<a name="executeTransaction-com.djrapitops.plan.storage.database.transactions.Transaction-">
2019-08-05 11:13:19 +02:00
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeTransaction</h4>
2019-10-05 10:27:37 +02:00
<pre>java.util.concurrent.Future&lt;?&gt;&nbsp;executeTransaction(<a href="../../../../../com/djrapitops/plan/storage/database/transactions/Transaction.html" title="class in com.djrapitops.plan.storage.database.transactions">Transaction</a>&nbsp;transaction)</pre>
2019-08-05 11:13:19 +02:00
<div class="block">Execute an SQL Transaction.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>transaction</code> - Transaction to execute.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Future that is finished when the transaction has been executed.</dd>
</dl>
</li>
</ul>
<a name="getType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
2019-10-05 10:27:37 +02:00
<pre><a href="../../../../../com/djrapitops/plan/storage/database/DBType.html" title="enum in com.djrapitops.plan.storage.database">DBType</a>&nbsp;getType()</pre>
2019-08-05 11:13:19 +02:00
<div class="block">Used to get the <code>DBType</code> of the Database</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>DBType</code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
2019-10-05 10:27:37 +02:00
<dd><a href="../../../../../com/djrapitops/plan/storage/database/DBType.html" title="enum in com.djrapitops.plan.storage.database"><code>DBType</code></a></dd>
2019-08-05 11:13:19 +02:00
</dl>
</li>
</ul>
2019-10-05 10:27:37 +02:00
<a name="getSql--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSql</h4>
<pre>default&nbsp;<a href="../../../../../com/djrapitops/plan/storage/database/sql/parsing/Sql.html" title="class in com.djrapitops.plan.storage.database.sql.parsing">Sql</a>&nbsp;getSql()</pre>
</li>
</ul>
2019-08-05 11:13:19 +02:00
<a name="getState--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getState</h4>
2019-10-05 10:27:37 +02:00
<pre><a href="../../../../../com/djrapitops/plan/storage/database/Database.State.html" title="enum in com.djrapitops.plan.storage.database">Database.State</a>&nbsp;getState()</pre>
2019-08-05 11:13:19 +02:00
</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">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../overview-summary.html">Overview</a></li>
2019-08-05 11:13:19 +02:00
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
2019-10-05 10:27:37 +02:00
<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>
2019-08-05 11:13:19 +02:00
</ul>
</div>
<div class="subNav">
<ul class="navList">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../com/djrapitops/plan/storage/database/BukkitDBSystem.html" title="class in com.djrapitops.plan.storage.database"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../com/djrapitops/plan/storage/database/Database.State.html" title="enum in com.djrapitops.plan.storage.database"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
2019-08-05 11:13:19 +02:00
</ul>
<ul class="navList">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../index.html?com/djrapitops/plan/storage/database/Database.html" target="_top">Frames</a></li>
2019-08-05 11:13:19 +02:00
<li><a href="Database.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
2019-10-05 10:27:37 +02:00
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
2019-08-05 11:13:19 +02:00
</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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>