Class SQLQueryImpl

  • All Implemented Interfaces:
    SQLQuery, java.lang.AutoCloseable

    public class SQLQueryImpl
    extends java.lang.Object
    implements SQLQuery
    • Field Detail

      • executeTime

        protected final long executeTime
      • connection

        protected final java.sql.Connection connection
      • statement

        protected final java.sql.Statement statement
      • resultSet

        protected final java.sql.ResultSet resultSet
    • Constructor Detail

      • SQLQueryImpl

        public SQLQueryImpl​(SQLManagerImpl sqlManager,
                            QueryActionImpl queryAction,
                            java.sql.Connection connection,
                            java.sql.Statement statement,
                            java.sql.ResultSet resultSet)
      • SQLQueryImpl

        public SQLQueryImpl​(SQLManagerImpl sqlManager,
                            QueryActionImpl queryAction,
                            java.sql.Connection connection,
                            java.sql.Statement statement,
                            java.sql.ResultSet resultSet,
                            long executeTime)
    • Method Detail

      • getExecuteTime

        public long getExecuteTime​(java.util.concurrent.TimeUnit timeUnit)
        Description copied from interface: SQLQuery
        获取该查询创建的时间
        注意,此处获得的时间非时间戳毫秒数,仅用于计算耗时。
        Specified by:
        getExecuteTime in interface SQLQuery
        Parameters:
        timeUnit - 时间单位
        Returns:
        创建时间
      • getResultSet

        public java.sql.ResultSet getResultSet()
        Specified by:
        getResultSet in interface SQLQuery
      • getSQLContent

        public java.lang.String getSQLContent()
        Description copied from interface: SQLQuery
        得到设定的SQL语句
        Specified by:
        getSQLContent in interface SQLQuery
        Returns:
        SQL语句
      • close

        public void close()
        Description copied from interface: SQLQuery
        关闭所有内容
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface SQLQuery
      • getStatement

        public java.sql.Statement getStatement()
        Specified by:
        getStatement in interface SQLQuery
      • getConnection

        public java.sql.Connection getConnection()
        Specified by:
        getConnection in interface SQLQuery