Package com.ptsmods.mysqlw.query
Class SelectResults
- All Implemented Interfaces:
Iterable<SelectResults.SelectResultRow>
,Collection<SelectResults.SelectResultRow>
,List<SelectResults.SelectResultRow>
Returned when you use any of the select methods in
Database
.
Contains all data you need.-
Nested Class Summary
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
get
(int index) getDb()
getLimit()
getOrder()
getRows()
getTable()
int
hashCode()
static SelectResults
parse
(Database db, String table, ResultSet set, QueryCondition condition, QueryOrder order, QueryLimit limit) Parse a ResultSet into a SelectResults object.static SelectResults
Parse a ResultSet into a SelectResults object.int
size()
toString()
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Method Details
-
parse
Parse a ResultSet into a SelectResults object.- Parameters:
set
- The ResultSet to parse.- Returns:
- The SelectResults object that was parsed from this set.
- See Also:
-
parse
public static SelectResults parse(Database db, String table, ResultSet set, QueryCondition condition, QueryOrder order, QueryLimit limit) Parse a ResultSet into a SelectResults object.- Parameters:
db
- The Database this ResultSet was created with.table
- The table this ResultSet contains rows of.set
- The ResultSet to parse.condition
- The condition used when getting this ResultSet.order
- The order in which the rows of this ResultSet are sorted.limit
- The maximum amount of rows this ResultSet can contain.- Returns:
- The SelectResults object that was parsed from this set.
-
getDb
- Returns:
- The database the query used to get these results was run on.
-
getTable
- Returns:
- The table the query used to get these results was run on.
-
getColumns
- Returns:
- A list of all columns present in these SelectResults.
-
getCondition
- Returns:
- The condition all rows in these results meet.
-
getOrder
- Returns:
- The order in which the rows are sorted.
-
getLimit
- Returns:
- The limit of rows returned, including the offset at which these rows are selected from the entire result.
-
getRows
- Returns:
- A list of all rows in these results.
- See Also:
-
size
public int size()- Specified by:
size
in interfaceCollection<SelectResults.SelectResultRow>
- Specified by:
size
in interfaceList<SelectResults.SelectResultRow>
- Specified by:
size
in classAbstractCollection<SelectResults.SelectResultRow>
-
contains
- Specified by:
contains
in interfaceCollection<SelectResults.SelectResultRow>
- Specified by:
contains
in interfaceList<SelectResults.SelectResultRow>
- Overrides:
contains
in classAbstractCollection<SelectResults.SelectResultRow>
-
equals
- Specified by:
equals
in interfaceCollection<SelectResults.SelectResultRow>
- Specified by:
equals
in interfaceList<SelectResults.SelectResultRow>
- Overrides:
equals
in classAbstractList<SelectResults.SelectResultRow>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<SelectResults.SelectResultRow>
- Specified by:
hashCode
in interfaceList<SelectResults.SelectResultRow>
- Overrides:
hashCode
in classAbstractList<SelectResults.SelectResultRow>
-
get
- Specified by:
get
in interfaceList<SelectResults.SelectResultRow>
- Specified by:
get
in classAbstractList<SelectResults.SelectResultRow>
-
toString
- Overrides:
toString
in classAbstractCollection<SelectResults.SelectResultRow>
-