Using DefaultExecuteContext

18 views
Skip to first unread message

vipu...@gmail.com

unread,
Jun 1, 2019, 3:53:52 PM6/1/19
to jOOQ User Group
Hi,
how can we make instance of DefaultExecuteContext i am not able to import it as import org.jooq.impl.DefaultExecuteContext; but able to import ExecuteContext  import org.jooq.impl.DefaultExecuteContext;
The following dependencies of jooq are present in pom.xml files:
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>3.11.11</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-meta</artifactId>
<version>3.11.11</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen</artifactId>
<version>3.11.11</version>
</dependency>

Lukas Eder

unread,
Jun 2, 2019, 1:37:37 PM6/2/19
to jooq...@googlegroups.com
Hello,

Thanks for your message. That type is an internal type, and as such, is package private - i.e. not for you to access. The page you linked doesn't refer to DefaultExecuteContext, but to DefaultExecuteListener, which is a common base implementation for public use when implementing ExecuteListener. Is that what you were looking for? If not, why do you want to access DefaultExecuteContext?

Thanks,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/d7a296f7-162a-4150-8106-62dd55009e5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vipu...@gmail.com

unread,
Jun 4, 2019, 12:16:32 PM6/4/19
to jOOQ User Group
Basically i want to ask how to call below given method read from URL: https://www.jooq.org/doc/3.11/manual/sql-execution/execute-listeners/#N501C2 
@Override
    public void start(ExecuteContext ctx) {
        STATISTICS.compute(ctx.type(), (k, v) -> v == null ? 1 : v + 1);
    }
To unsubscribe from this group and stop receiving emails from it, send an email to jooq...@googlegroups.com.

Lukas Eder

unread,
Jun 4, 2019, 2:28:15 PM6/4/19
to jooq...@googlegroups.com
But why would you want to call that method? ExecuteListener is an SPI, which means you *implement* it and jOOQ calls it. You don't call it yourself...

To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/537a51b9-f394-4826-91b5-7de96dad04f4%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages