Plan/all/com/djrapitops/plan/query/CommonQueries.html

448 lines
16 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>CommonQueries (Plan 5.3-SNAPSHOT API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CommonQueries (Plan 5.3-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":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";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.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" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.djrapitops.plan.query</a></div>
<h2 title="Interface CommonQueries" class="title">Interface CommonQueries</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="CommonQueriesImplementation.html" title="class in com.djrapitops.plan.query">CommonQueriesImplementation</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">CommonQueries</span></pre>
<div class="block">Class that allows performing most commonly wanted queries.
<p>
This exists so that SQL does not necessarily need to be written.
Obtain an instance from <a href="QueryService.html" title="interface in com.djrapitops.plan.query"><code>QueryService</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doesDBHaveTable(java.lang.String)">doesDBHaveTable</a></span>&#8203;(java.lang.String&nbsp;table)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#doesDBHaveTableColumn(java.lang.String,java.lang.String)">doesDBHaveTableColumn</a></span>&#8203;(java.lang.String&nbsp;table,
java.lang.String&nbsp;column)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchActivityIndexOf(java.util.UUID,long)">fetchActivityIndexOf</a></span>&#8203;(java.util.UUID&nbsp;playerUUID,
long&nbsp;epochMs)</code></th>
<td class="colLast">
<div class="block">Calculates the activity index for the player at a specific date.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchCurrentSessionPlaytime(java.util.UUID)">fetchCurrentSessionPlaytime</a></span>&#8203;(java.util.UUID&nbsp;playerUUID)</code></th>
<td class="colLast">
<div class="block">Get playtime of current online session.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchLastSeen(java.util.UUID,java.util.UUID)">fetchLastSeen</a></span>&#8203;(java.util.UUID&nbsp;playerUUID,
java.util.UUID&nbsp;serverUUID)</code></th>
<td class="colLast">
<div class="block">Fetch last seen Epoch ms for a player on a server.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.Optional&lt;java.lang.String&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchNameOf(java.util.UUID)">fetchNameOf</a></span>&#8203;(java.util.UUID&nbsp;playerUUID)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchPlaytime(java.util.UUID,java.util.UUID,long,long)">fetchPlaytime</a></span>&#8203;(java.util.UUID&nbsp;playerUUID,
java.util.UUID&nbsp;serverUUID,
long&nbsp;after,
long&nbsp;before)</code></th>
<td class="colLast">
<div class="block">Fetch playtime of a player on a server.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;java.util.UUID&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchServerUUIDs()">fetchServerUUIDs</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.util.Optional&lt;java.util.UUID&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fetchUUIDOf(java.lang.String)">fetchUUIDOf</a></span>&#8203;(java.lang.String&nbsp;playerName)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getActivityGroupForIndex(double)">getActivityGroupForIndex</a></span>&#8203;(double&nbsp;activityIndex)</code></th>
<td class="colLast">
<div class="block">Get a String that represents the Activity group for an index.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="fetchPlaytime(java.util.UUID,java.util.UUID,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchPlaytime</h4>
<pre class="methodSignature">long&nbsp;fetchPlaytime&#8203;(java.util.UUID&nbsp;playerUUID,
java.util.UUID&nbsp;serverUUID,
long&nbsp;after,
long&nbsp;before)</pre>
<div class="block">Fetch playtime of a player on a server.
<p>
Returns 0 for any non existing players or servers.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playerUUID</code> - UUID of the player.</dd>
<dd><code>serverUUID</code> - UUID of the Plan server.</dd>
<dd><code>after</code> - Data after this Epoch ms should be fetched</dd>
<dd><code>before</code> - Data before this Epoch ms should be fetched</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Milliseconds the player has played with the defined parameters.</dd>
</dl>
</li>
</ul>
<a id="fetchCurrentSessionPlaytime(java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchCurrentSessionPlaytime</h4>
<pre class="methodSignature">long&nbsp;fetchCurrentSessionPlaytime&#8203;(java.util.UUID&nbsp;playerUUID)</pre>
<div class="block">Get playtime of current online session.
<p>
Requires Capability QUERY_API_ACTIVE_SESSION_PLAYTIME</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playerUUID</code> - UUID of the player.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Milliseconds the player has played during current online session. 0 if player is offline.</dd>
</dl>
</li>
</ul>
<a id="fetchLastSeen(java.util.UUID,java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchLastSeen</h4>
<pre class="methodSignature">long&nbsp;fetchLastSeen&#8203;(java.util.UUID&nbsp;playerUUID,
java.util.UUID&nbsp;serverUUID)</pre>
<div class="block">Fetch last seen Epoch ms for a player on a server.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playerUUID</code> - UUID of the player.</dd>
<dd><code>serverUUID</code> - UUID of the Plan server.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Epoch ms the player was last seen, 0 if player has not played on server.</dd>
</dl>
</li>
</ul>
<a id="fetchServerUUIDs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchServerUUIDs</h4>
<pre class="methodSignature">java.util.Set&lt;java.util.UUID&gt;&nbsp;fetchServerUUIDs()</pre>
</li>
</ul>
<a id="fetchUUIDOf(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchUUIDOf</h4>
<pre class="methodSignature">java.util.Optional&lt;java.util.UUID&gt;&nbsp;fetchUUIDOf&#8203;(java.lang.String&nbsp;playerName)</pre>
</li>
</ul>
<a id="fetchNameOf(java.util.UUID)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchNameOf</h4>
<pre class="methodSignature">java.util.Optional&lt;java.lang.String&gt;&nbsp;fetchNameOf&#8203;(java.util.UUID&nbsp;playerUUID)</pre>
</li>
</ul>
<a id="doesDBHaveTable(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doesDBHaveTable</h4>
<pre class="methodSignature">boolean&nbsp;doesDBHaveTable&#8203;(java.lang.String&nbsp;table)</pre>
</li>
</ul>
<a id="doesDBHaveTableColumn(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doesDBHaveTableColumn</h4>
<pre class="methodSignature">boolean&nbsp;doesDBHaveTableColumn&#8203;(java.lang.String&nbsp;table,
java.lang.String&nbsp;column)</pre>
</li>
</ul>
<a id="fetchActivityIndexOf(java.util.UUID,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fetchActivityIndexOf</h4>
<pre class="methodSignature">double&nbsp;fetchActivityIndexOf&#8203;(java.util.UUID&nbsp;playerUUID,
long&nbsp;epochMs)</pre>
<div class="block">Calculates the activity index for the player at a specific date.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playerUUID</code> - UUID of the player.</dd>
<dd><code>epochMs</code> - Epoch millisecond to use for calculation</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a double between 0.0 and 5.0.</dd>
</dl>
</li>
</ul>
<a id="getActivityGroupForIndex(double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getActivityGroupForIndex</h4>
<pre class="methodSignature">java.lang.String&nbsp;getActivityGroupForIndex&#8203;(double&nbsp;activityIndex)</pre>
<div class="block">Get a String that represents the Activity group for an index.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>activityIndex</code> - a double between 0.0 and 5.0.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Name of the group (in English) that this activityIndex falls within.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.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" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>