Class QueryStatement<T>
- java.lang.Object
-
- com.djrapitops.plan.storage.database.queries.QueryStatement<T>
-
- All Implemented Interfaces:
Query<T>
- Direct Known Subclasses:
ExtensionUUIDsInGroupQuery
,HasMoreThanZeroQueryStatement
,NewerConfigQuery
,QueryAllStatement
public abstract class QueryStatement<T> extends java.lang.Object implements Query<T>
SQL query that closes proper elements.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
QueryStatement(java.lang.String sql)
protected
QueryStatement(java.lang.String sql, int fetchSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
T
executeQuery(SQLDB db)
T
executeQuery(java.sql.PreparedStatement statement)
T
executeWithConnection(java.sql.Connection connection)
java.lang.String
getSql()
int
hashCode()
abstract void
prepare(java.sql.PreparedStatement statement)
abstract T
processResults(java.sql.ResultSet set)
java.lang.String
toString()
-
-
-
Method Detail
-
executeQuery
public T executeQuery(SQLDB db)
- Specified by:
executeQuery
in interfaceQuery<T>
-
executeWithConnection
public T executeWithConnection(java.sql.Connection connection)
-
executeQuery
public T executeQuery(java.sql.PreparedStatement statement) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
prepare
public abstract void prepare(java.sql.PreparedStatement statement) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
processResults
public abstract T processResults(java.sql.ResultSet set) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getSql
public java.lang.String getSql()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-