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
Nested Classes -
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanget(int index) getDb()getLimit()getOrder()getRows()getTable()inthashCode()static SelectResultsparse(Database db, String table, ResultSet set, QueryCondition condition, QueryOrder order, QueryLimit limit) Parse a ResultSet into a SelectResults object.static SelectResultsParse a ResultSet into a SelectResults object.intsize()toString()Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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:
sizein interfaceCollection<SelectResults.SelectResultRow>- Specified by:
sizein interfaceList<SelectResults.SelectResultRow>- Specified by:
sizein classAbstractCollection<SelectResults.SelectResultRow>
-
contains
- Specified by:
containsin interfaceCollection<SelectResults.SelectResultRow>- Specified by:
containsin interfaceList<SelectResults.SelectResultRow>- Overrides:
containsin classAbstractCollection<SelectResults.SelectResultRow>
-
equals
- Specified by:
equalsin interfaceCollection<SelectResults.SelectResultRow>- Specified by:
equalsin interfaceList<SelectResults.SelectResultRow>- Overrides:
equalsin classAbstractList<SelectResults.SelectResultRow>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<SelectResults.SelectResultRow>- Specified by:
hashCodein interfaceList<SelectResults.SelectResultRow>- Overrides:
hashCodein classAbstractList<SelectResults.SelectResultRow>
-
get
- Specified by:
getin interfaceList<SelectResults.SelectResultRow>- Specified by:
getin classAbstractList<SelectResults.SelectResultRow>
-
toString
- Overrides:
toStringin classAbstractCollection<SelectResults.SelectResultRow>
-