public class JoinConfig
extends java.lang.Object
implements java.lang.Cloneable
JoinCursor
. The join cursor
configuration is specified when calling Database.join
.
To create a configuration object with default attributes:
JoinConfig config = new JoinConfig();
To set custom attributes:
JoinConfig config = new JoinConfig(); config.setNoSort(true);
Database.join
,
JoinCursor
Modifier and Type | Field and Description |
---|---|
static JoinConfig |
DEFAULT
Default configuration used if null is passed to
Database.join . |
Constructor and Description |
---|
JoinConfig()
Creates an instance with the system's default settings.
|
Modifier and Type | Method and Description |
---|---|
JoinConfig |
clone()
Returns a copy of this configuration object.
|
boolean |
getNoSort()
Returns whether automatic sorting of the input cursors is disabled.
|
JoinConfig |
setNoSort(boolean noSort)
Specifies whether automatic sorting of the input cursors is disabled.
|
java.lang.String |
toString()
Returns the values for each configuration attribute.
|
public static final JoinConfig DEFAULT
Database.join
.public JoinConfig()
public JoinConfig setNoSort(boolean noSort)
Joined values are retrieved by doing a sequential iteration over the
first cursor in the cursor array, and a nested iteration over each
following cursor in the order they are specified in the array. This
requires database traversals to search for the current datum in all the
cursors after the first. For this reason, the best join performance
normally results from sorting the cursors from the one that refers to
the least number of data items to the one that refers to the
most. Unless this method is called with true, Database.join
does this sort on behalf of its caller using the Cursor.countEstimate()
method.
If the data are structured so that cursors with many data items also
share many common elements, higher performance will result from listing
those cursors before cursors with fewer data items; that is, a sort
order other than the default. Calling this method permits applications
to perform join optimization prior to calling
Database.join
.
noSort
- whether automatic sorting of the input cursors is
disabled.Database.join
public boolean getNoSort()
setNoSort(boolean)
public JoinConfig clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.