From 67d7cf5b95b2e0a308167eea9f55192ebb1dce93 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Thu, 7 Dec 2017 11:12:21 +0100 Subject: [PATCH] Removed broken JAX RS example --- jOOQ-examples/jOOQ-jax-rs-example/.gitignore | 2 - jOOQ-examples/jOOQ-jax-rs-example/LICENSE.txt | 19 -- jOOQ-examples/jOOQ-jax-rs-example/pom.xml | 127 -------- jOOQ-examples/jOOQ-jax-rs-example/setup.sql | 33 -- .../jooq/example/jaxrs/LicenseService.java | 185 ------------ .../java/org/jooq/example/jaxrs/db/Keys.java | 51 ---- .../jooq/example/jaxrs/db/LicenseServer.java | 53 ---- .../org/jooq/example/jaxrs/db/Routines.java | 49 --- .../org/jooq/example/jaxrs/db/Sequences.java | 25 -- .../org/jooq/example/jaxrs/db/Tables.java | 25 -- .../jaxrs/db/routines/GenerateKey.java | 69 ----- .../jooq/example/jaxrs/db/tables/License.java | 99 ------ .../example/jaxrs/db/tables/LogVerify.java | 104 ------- .../db/tables/records/LicenseRecord.java | 249 --------------- .../db/tables/records/LogVerifyRecord.java | 283 ------------------ .../src/main/resources/applicationContext.xml | 10 - .../src/main/webapp/WEB-INF/web.xml | 24 -- 17 files changed, 1407 deletions(-) delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/.gitignore delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/LICENSE.txt delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/pom.xml delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/setup.sql delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/LicenseService.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Keys.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/LicenseServer.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Routines.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Sequences.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Tables.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/routines/GenerateKey.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/License.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/LogVerify.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LicenseRecord.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LogVerifyRecord.java delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/resources/applicationContext.xml delete mode 100644 jOOQ-examples/jOOQ-jax-rs-example/src/main/webapp/WEB-INF/web.xml diff --git a/jOOQ-examples/jOOQ-jax-rs-example/.gitignore b/jOOQ-examples/jOOQ-jax-rs-example/.gitignore deleted file mode 100644 index 19f2e002ce..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/target diff --git a/jOOQ-examples/jOOQ-jax-rs-example/LICENSE.txt b/jOOQ-examples/jOOQ-jax-rs-example/LICENSE.txt deleted file mode 100644 index d090694f44..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -Other licenses: ------------------------------------------------------------------------------ -Commercial licenses for this work are available. These replace the above -ASL 2.0 and offer limited warranties, support, maintenance, and commercial -database integrations. - -For more information, please visit: http://www.jooq.org/licenses \ No newline at end of file diff --git a/jOOQ-examples/jOOQ-jax-rs-example/pom.xml b/jOOQ-examples/jOOQ-jax-rs-example/pom.xml deleted file mode 100644 index cb65c3c10a..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/pom.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - 4.0.0 - - org.jooq - jooq-jax-rs-example - war - 1.0 - - - 3.11.0-SNAPSHOT - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - 1.7 - 1.7 - - - - - org.mortbay.jetty - maven-jetty-plugin - 6.1.26 - - manual - stop - 9966 - - - - - org.jooq - jooq-codegen-maven - ${org.jooq.version} - - - - generate-postgres - generate-sources - - generate - - - - org.postgresql.Driver - jdbc:postgresql:postgres - postgres - test - - - - org.jooq.util.postgres.PostgresDatabase - .* - - true - license_server - - - false - true - - - org.jooq.example.jaxrs.db - src/main/java - - - - - - - - org.postgresql - postgresql - 9.4.1208 - - - - - - - - - com.sun.jersey - jersey-server - 1.18.2 - - - com.sun.jersey - jersey-json - 1.18.2 - - - com.sun.jersey.contribs - jersey-spring - 1.18.2 - - - javax.servlet - servlet-api - 2.5 - - - - org.jooq - jooq - ${org.jooq.version} - - - org.postgresql - postgresql - 9.4.1208 - - - log4j - log4j - 1.2.16 - - - \ No newline at end of file diff --git a/jOOQ-examples/jOOQ-jax-rs-example/setup.sql b/jOOQ-examples/jOOQ-jax-rs-example/setup.sql deleted file mode 100644 index 3f91eda783..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/setup.sql +++ /dev/null @@ -1,33 +0,0 @@ -CREATE OR REPLACE FUNCTION LICENSE_SERVER.GENERATE_KEY( - IN license_date TIMESTAMP WITH TIME ZONE, - IN email TEXT -) RETURNS VARCHAR -AS $$ -BEGIN - RETURN 'license-key'; -END; -$$ LANGUAGE PLPGSQL; - -CREATE TABLE LICENSE_SERVER.LICENSE ( - ID SERIAL8 NOT NULL, - - LICENSE_DATE TIMESTAMP NOT NULL, - LICENSEE TEXT NOT NULL, - LICENSE TEXT NOT NULL, - VERSION VARCHAR(50) NOT NULL DEFAULT '.*', - - CONSTRAINT PK_LICENSE PRIMARY KEY (ID), - CONSTRAINT UK_LICENSE UNIQUE (LICENSE) -); - -CREATE TABLE LICENSE_SERVER.LOG_VERIFY ( - ID SERIAL8 NOT NULL, - - LICENSEE TEXT NOT NULL, - LICENSE TEXT NOT NULL, - REQUEST_IP VARCHAR(50) NOT NULL, - MATCH BOOLEAN NOT NULL, - VERSION VARCHAR(50) NOT NULL, - - CONSTRAINT PK_LOG_VERIFY PRIMARY KEY (ID) -); diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/LicenseService.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/LicenseService.java deleted file mode 100644 index 53ac7470be..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/LicenseService.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Other licenses: - * ----------------------------------------------------------------------------- - * Commercial licenses for this work are available. These replace the above - * ASL 2.0 and offer limited warranties, support, maintenance, and commercial - * database integrations. - * - * For more information, please visit: http://www.jooq.org/licenses - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -package org.jooq.example.jaxrs; - -import static java.sql.DriverManager.getConnection; -import static org.jooq.example.jaxrs.db.Routines.generateKey; -import static org.jooq.example.jaxrs.db.Tables.LICENSE; -import static org.jooq.example.jaxrs.db.Tables.LOG_VERIFY; -import static org.jooq.impl.DSL.field; -import static org.jooq.impl.DSL.inline; -import static org.jooq.impl.DSL.selectCount; -import static org.jooq.impl.DSL.val; - -import java.sql.Connection; -import java.sql.Timestamp; - -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; - -import org.jooq.DSLContext; -import org.jooq.SQLDialect; -import org.jooq.conf.Settings; -import org.jooq.impl.DSL; -import org.jooq.impl.DefaultConfiguration; -import org.jooq.impl.DefaultConnectionProvider; -import org.jooq.tools.jdbc.JDBCUtils; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Component; - - -/** - * The license server. - */ -@Path("/license/") -@Component -@Scope("request") -public class LicenseService { - - /** - * /license/generate generates and returns a new license key. - * - * @param mail The input email address of the licensee. - */ - @GET - @Produces("text/plain") - @Path("/generate") - public String generate( - final @QueryParam("mail") String mail - ) { - return run(new CtxRunnable() { - - @Override - public String run(DSLContext ctx) { - Timestamp licenseDate = new Timestamp(System.currentTimeMillis()); - - return - ctx.insertInto(LICENSE) - .set(LICENSE.LICENSE_, generateKey(inline(licenseDate), inline(mail))) - .set(LICENSE.LICENSE_DATE, licenseDate) - .set(LICENSE.LICENSEE, mail) - .returning() - .fetchOne() - .getLicense(); - } - }); - } - - /** - * /license/verify checks if a given licensee has access to version using a license. - * - * @param request The servlet request from the JAX-RS context. - * @param mail The input email address of the licensee. - * @param license The license used by the licensee. - * @param version The product version being accessed. - */ - @GET - @Produces("text/plain") - @Path("/verify") - public String verify( - final @Context HttpServletRequest request, - final @QueryParam("mail") String mail, - final @QueryParam("license") String license, - final @QueryParam("version") String version - ) { - return run(new CtxRunnable() { - @Override - public String run(DSLContext ctx) { - String v = (version == null || version.equals("")) ? "" : version; - - return - ctx.insertInto(LOG_VERIFY) - .set(LOG_VERIFY.LICENSE, license) - .set(LOG_VERIFY.LICENSEE, mail) - .set(LOG_VERIFY.REQUEST_IP, request.getRemoteAddr()) - .set(LOG_VERIFY.MATCH, field( - selectCount() - .from(LICENSE) - .where(LICENSE.LICENSEE.eq(mail)) - .and(LICENSE.LICENSE_.eq(license)) - .and(val(v).likeRegex(LICENSE.VERSION)) - .asField().gt(0))) - .set(LOG_VERIFY.VERSION, v) - .returning(LOG_VERIFY.MATCH) - .fetchOne() - .get(LOG_VERIFY.MATCH, String.class); - } - }); - } - - // ------------------------------------------------------------------------- - // Utilities - // ------------------------------------------------------------------------- - - /** - * This method encapsulates a transaction and initialises a jOOQ DSLcontext. - * This could also be achieved with Spring and DBCP for connection pooling. - */ - private String run(CtxRunnable runnable) { - Connection c = null; - - try { - Class.forName("org.postgresql.Driver"); - c = getConnection("jdbc:postgresql:postgres", "postgres", System.getProperty("pw", "test")); - DSLContext ctx = DSL.using(new DefaultConfiguration() - .set(new DefaultConnectionProvider(c)) - .set(SQLDialect.POSTGRES) - .set(new Settings().withExecuteLogging(false))); - - return runnable.run(ctx); - } - catch (Exception e) { - e.printStackTrace(); - Response.status(Status.SERVICE_UNAVAILABLE); - return "Service Unavailable - Please contact support@datageekery.com for help"; - } - finally { - JDBCUtils.safeClose(c); - } - } - - private interface CtxRunnable { - String run(DSLContext ctx); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Keys.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Keys.java deleted file mode 100644 index 07a3d331e2..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Keys.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db; - -/** - * This class is generated by jOOQ. - * - * A class modelling foreign key relationships between tables of the license_server - * schema - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Keys { - - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- - - public static final org.jooq.Identity IDENTITY_LICENSE = Identities0.IDENTITY_LICENSE; - public static final org.jooq.Identity IDENTITY_LOG_VERIFY = Identities0.IDENTITY_LOG_VERIFY; - - // ------------------------------------------------------------------------- - // UNIQUE and PRIMARY KEY definitions - // ------------------------------------------------------------------------- - - public static final org.jooq.UniqueKey PK_LICENSE = UniqueKeys0.PK_LICENSE; - public static final org.jooq.UniqueKey UK_LICENSE = UniqueKeys0.UK_LICENSE; - public static final org.jooq.UniqueKey PK_LOG_VERIFY = UniqueKeys0.PK_LOG_VERIFY; - - // ------------------------------------------------------------------------- - // FOREIGN KEY definitions - // ------------------------------------------------------------------------- - - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Identities0 extends org.jooq.impl.AbstractKeys { - public static org.jooq.Identity IDENTITY_LICENSE = createIdentity(org.jooq.example.jaxrs.db.tables.License.LICENSE, org.jooq.example.jaxrs.db.tables.License.LICENSE.ID); - public static org.jooq.Identity IDENTITY_LOG_VERIFY = createIdentity(org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY, org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.ID); - } - - private static class UniqueKeys0 extends org.jooq.impl.AbstractKeys { - public static final org.jooq.UniqueKey PK_LICENSE = createUniqueKey(org.jooq.example.jaxrs.db.tables.License.LICENSE, org.jooq.example.jaxrs.db.tables.License.LICENSE.ID); - public static final org.jooq.UniqueKey UK_LICENSE = createUniqueKey(org.jooq.example.jaxrs.db.tables.License.LICENSE, org.jooq.example.jaxrs.db.tables.License.LICENSE.LICENSE_); - public static final org.jooq.UniqueKey PK_LOG_VERIFY = createUniqueKey(org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY, org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.ID); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/LicenseServer.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/LicenseServer.java deleted file mode 100644 index a8ed1e14b1..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/LicenseServer.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class LicenseServer extends org.jooq.impl.SchemaImpl { - - private static final long serialVersionUID = -1750632487; - - /** - * The singleton instance of license_server - */ - public static final LicenseServer LICENSE_SERVER = new LicenseServer(); - - /** - * No further instances allowed - */ - private LicenseServer() { - super("license_server"); - } - - @Override - public final java.util.List> getSequences() { - java.util.List result = new java.util.ArrayList(); - result.addAll(getSequences0()); - return result; - } - - private final java.util.List> getSequences0() { - return java.util.Arrays.>asList( - org.jooq.example.jaxrs.db.Sequences.LICENSE_ID_SEQ, - org.jooq.example.jaxrs.db.Sequences.LOG_VERIFY_ID_SEQ); - } - - @Override - public final java.util.List> getTables() { - java.util.List result = new java.util.ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final java.util.List> getTables0() { - return java.util.Arrays.>asList( - org.jooq.example.jaxrs.db.tables.License.LICENSE, - org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Routines.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Routines.java deleted file mode 100644 index e5c145b501..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Routines.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db; - -/** - * This class is generated by jOOQ. - * - * Convenience access to all stored procedures and functions in license_server - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Routines { - - /** - * Call license_server.generate_key - */ - public static java.lang.String generateKey(org.jooq.Configuration configuration, java.sql.Timestamp licenseDate, java.lang.String email) { - org.jooq.example.jaxrs.db.routines.GenerateKey f = new org.jooq.example.jaxrs.db.routines.GenerateKey(); - f.setLicenseDate(licenseDate); - f.setEmail(email); - - f.execute(configuration); - return f.getReturnValue(); - } - - /** - * Get license_server.generate_key as a field - */ - public static org.jooq.Field generateKey(java.sql.Timestamp licenseDate, java.lang.String email) { - org.jooq.example.jaxrs.db.routines.GenerateKey f = new org.jooq.example.jaxrs.db.routines.GenerateKey(); - f.setLicenseDate(licenseDate); - f.setEmail(email); - - return f.asField(); - } - - /** - * Get license_server.generate_key as a field - */ - public static org.jooq.Field generateKey(org.jooq.Field licenseDate, org.jooq.Field email) { - org.jooq.example.jaxrs.db.routines.GenerateKey f = new org.jooq.example.jaxrs.db.routines.GenerateKey(); - f.setLicenseDate(licenseDate); - f.setEmail(email); - - return f.asField(); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Sequences.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Sequences.java deleted file mode 100644 index 438670a08a..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Sequences.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db; - -/** - * This class is generated by jOOQ. - * - * Convenience access to all sequences in license_server - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Sequences { - - /** - * The sequence license_server.license_id_seq - */ - public static final org.jooq.Sequence LICENSE_ID_SEQ = new org.jooq.impl.SequenceImpl("license_id_seq", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.BIGINT); - - /** - * The sequence license_server.log_verify_id_seq - */ - public static final org.jooq.Sequence LOG_VERIFY_ID_SEQ = new org.jooq.impl.SequenceImpl("log_verify_id_seq", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.BIGINT); -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Tables.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Tables.java deleted file mode 100644 index 6f153647cc..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/Tables.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db; - -/** - * This class is generated by jOOQ. - * - * Convenience access to all tables in license_server - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Tables { - - /** - * The table license_server.license - */ - public static final org.jooq.example.jaxrs.db.tables.License LICENSE = org.jooq.example.jaxrs.db.tables.License.LICENSE; - - /** - * The table license_server.log_verify - */ - public static final org.jooq.example.jaxrs.db.tables.LogVerify LOG_VERIFY = org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY; -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/routines/GenerateKey.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/routines/GenerateKey.java deleted file mode 100644 index 3c9ae0fe8a..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/routines/GenerateKey.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db.routines; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class GenerateKey extends org.jooq.impl.AbstractRoutine { - - private static final long serialVersionUID = -2093593663; - - /** - * The parameter license_server.generate_key.RETURN_VALUE. - */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.VARCHAR); - - /** - * The parameter license_server.generate_key.license_date. - */ - public static final org.jooq.Parameter LICENSE_DATE = createParameter("license_date", org.jooq.impl.SQLDataType.TIMESTAMP); - - /** - * The parameter license_server.generate_key.email. - */ - public static final org.jooq.Parameter EMAIL = createParameter("email", org.jooq.impl.SQLDataType.CLOB); - - /** - * Create a new routine call instance - */ - public GenerateKey() { - super("generate_key", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.impl.SQLDataType.VARCHAR); - - setReturnParameter(RETURN_VALUE); - addInParameter(LICENSE_DATE); - addInParameter(EMAIL); - } - - /** - * Set the license_date parameter IN value to the routine - */ - public void setLicenseDate(java.sql.Timestamp value) { - setValue(org.jooq.example.jaxrs.db.routines.GenerateKey.LICENSE_DATE, value); - } - - /** - * Set the license_date parameter to the function to be used with a {@link org.jooq.Select} statement - */ - public void setLicenseDate(org.jooq.Field field) { - setField(LICENSE_DATE, field); - } - - /** - * Set the email parameter IN value to the routine - */ - public void setEmail(java.lang.String value) { - setValue(org.jooq.example.jaxrs.db.routines.GenerateKey.EMAIL, value); - } - - /** - * Set the email parameter to the function to be used with a {@link org.jooq.Select} statement - */ - public void setEmail(org.jooq.Field field) { - setField(EMAIL, field); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/License.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/License.java deleted file mode 100644 index 9c7c5bc7ae..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/License.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db.tables; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class License extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1374757615; - - /** - * The singleton instance of license_server.license - */ - public static final org.jooq.example.jaxrs.db.tables.License LICENSE = new org.jooq.example.jaxrs.db.tables.License(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.example.jaxrs.db.tables.records.LicenseRecord.class; - } - - /** - * The column license_server.license.id. - */ - public final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.BIGINT, this); - - /** - * The column license_server.license.license_date. - */ - public final org.jooq.TableField LICENSE_DATE = createField("license_date", org.jooq.impl.SQLDataType.TIMESTAMP, this); - - /** - * The column license_server.license.licensee. - */ - public final org.jooq.TableField LICENSEE = createField("licensee", org.jooq.impl.SQLDataType.CLOB, this); - - /** - * The column license_server.license.license. - */ - public final org.jooq.TableField LICENSE_ = createField("license", org.jooq.impl.SQLDataType.CLOB, this); - - /** - * The column license_server.license.version. - */ - public final org.jooq.TableField VERSION = createField("version", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); - - /** - * Create a license_server.license table reference - */ - public License() { - super("license", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER); - } - - /** - * Create an aliased license_server.license table reference - */ - public License(java.lang.String alias) { - super(alias, org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.example.jaxrs.db.tables.License.LICENSE); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Identity getIdentity() { - return org.jooq.example.jaxrs.db.Keys.IDENTITY_LICENSE; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.UniqueKey getPrimaryKey() { - return org.jooq.example.jaxrs.db.Keys.PK_LICENSE; - } - - /** - * {@inheritDoc} - */ - @Override - public java.util.List> getKeys() { - return java.util.Arrays.>asList(org.jooq.example.jaxrs.db.Keys.PK_LICENSE, org.jooq.example.jaxrs.db.Keys.UK_LICENSE); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.example.jaxrs.db.tables.License as(java.lang.String alias) { - return new org.jooq.example.jaxrs.db.tables.License(alias); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/LogVerify.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/LogVerify.java deleted file mode 100644 index 99bfdc10eb..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/LogVerify.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db.tables; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class LogVerify extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 475379908; - - /** - * The singleton instance of license_server.log_verify - */ - public static final org.jooq.example.jaxrs.db.tables.LogVerify LOG_VERIFY = new org.jooq.example.jaxrs.db.tables.LogVerify(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.example.jaxrs.db.tables.records.LogVerifyRecord.class; - } - - /** - * The column license_server.log_verify.id. - */ - public final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.BIGINT, this); - - /** - * The column license_server.log_verify.licensee. - */ - public final org.jooq.TableField LICENSEE = createField("licensee", org.jooq.impl.SQLDataType.CLOB, this); - - /** - * The column license_server.log_verify.license. - */ - public final org.jooq.TableField LICENSE = createField("license", org.jooq.impl.SQLDataType.CLOB, this); - - /** - * The column license_server.log_verify.request_ip. - */ - public final org.jooq.TableField REQUEST_IP = createField("request_ip", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); - - /** - * The column license_server.log_verify.version. - */ - public final org.jooq.TableField VERSION = createField("version", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); - - /** - * The column license_server.log_verify.match. - */ - public final org.jooq.TableField MATCH = createField("match", org.jooq.impl.SQLDataType.BOOLEAN, this); - - /** - * Create a license_server.log_verify table reference - */ - public LogVerify() { - super("log_verify", org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER); - } - - /** - * Create an aliased license_server.log_verify table reference - */ - public LogVerify(java.lang.String alias) { - super(alias, org.jooq.example.jaxrs.db.LicenseServer.LICENSE_SERVER, org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Identity getIdentity() { - return org.jooq.example.jaxrs.db.Keys.IDENTITY_LOG_VERIFY; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.UniqueKey getPrimaryKey() { - return org.jooq.example.jaxrs.db.Keys.PK_LOG_VERIFY; - } - - /** - * {@inheritDoc} - */ - @Override - public java.util.List> getKeys() { - return java.util.Arrays.>asList(org.jooq.example.jaxrs.db.Keys.PK_LOG_VERIFY); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.example.jaxrs.db.tables.LogVerify as(java.lang.String alias) { - return new org.jooq.example.jaxrs.db.tables.LogVerify(alias); - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LicenseRecord.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LicenseRecord.java deleted file mode 100644 index 20b2173273..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LicenseRecord.java +++ /dev/null @@ -1,249 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db.tables.records; - -import java.sql.Timestamp; - -import org.jooq.Record5; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class LicenseRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.Record5 { - - private static final long serialVersionUID = 1616832387; - - /** - * Setter for license_server.license.id. - */ - public void setId(java.lang.Long value) { - setValue(0, value); - } - - /** - * Getter for license_server.license.id. - */ - public java.lang.Long getId() { - return (java.lang.Long) getValue(0); - } - - /** - * Setter for license_server.license.license_date. - */ - public void setLicenseDate(java.sql.Timestamp value) { - setValue(1, value); - } - - /** - * Getter for license_server.license.license_date. - */ - public java.sql.Timestamp getLicenseDate() { - return (java.sql.Timestamp) getValue(1); - } - - /** - * Setter for license_server.license.licensee. - */ - public void setLicensee(java.lang.String value) { - setValue(2, value); - } - - /** - * Getter for license_server.license.licensee. - */ - public java.lang.String getLicensee() { - return (java.lang.String) getValue(2); - } - - /** - * Setter for license_server.license.license. - */ - public void setLicense(java.lang.String value) { - setValue(3, value); - } - - /** - * Getter for license_server.license.license. - */ - public java.lang.String getLicense() { - return (java.lang.String) getValue(3); - } - - /** - * Setter for license_server.license.version. - */ - public void setVersion(java.lang.String value) { - setValue(4, value); - } - - /** - * Getter for license_server.license.version. - */ - public java.lang.String getVersion() { - return (java.lang.String) getValue(4); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Record1 key() { - return (org.jooq.Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record5 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Row5 fieldsRow() { - return (org.jooq.Row5) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Row5 valuesRow() { - return (org.jooq.Row5) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field1() { - return org.jooq.example.jaxrs.db.tables.License.LICENSE.ID; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field2() { - return org.jooq.example.jaxrs.db.tables.License.LICENSE.LICENSE_DATE; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field3() { - return org.jooq.example.jaxrs.db.tables.License.LICENSE.LICENSEE; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field4() { - return org.jooq.example.jaxrs.db.tables.License.LICENSE.LICENSE_; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field5() { - return org.jooq.example.jaxrs.db.tables.License.LICENSE.VERSION; - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.Long value1() { - return getId(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.sql.Timestamp value2() { - return getLicenseDate(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value3() { - return getLicensee(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value4() { - return getLicense(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value5() { - return getVersion(); - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached LicenseRecord - */ - public LicenseRecord() { - super(org.jooq.example.jaxrs.db.tables.License.LICENSE); - } - - @Override - public Record5 value1(Long value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record5 value2(Timestamp value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record5 value3(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record5 value4(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record5 value5(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record5 values(Long t1, Timestamp t2, String t3, String t4, - String t5) { - // TODO Auto-generated method stub - return null; - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LogVerifyRecord.java b/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LogVerifyRecord.java deleted file mode 100644 index a1c527f0c1..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/java/org/jooq/example/jaxrs/db/tables/records/LogVerifyRecord.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.example.jaxrs.db.tables.records; - -import org.jooq.Record6; - -/** - * This class is generated by jOOQ. - */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.1.0" }, - comments = "This class is generated by jOOQ") -@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class LogVerifyRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.Record6 { - - private static final long serialVersionUID = -675942689; - - /** - * Setter for license_server.log_verify.id. - */ - public void setId(java.lang.Long value) { - setValue(0, value); - } - - /** - * Getter for license_server.log_verify.id. - */ - public java.lang.Long getId() { - return (java.lang.Long) getValue(0); - } - - /** - * Setter for license_server.log_verify.licensee. - */ - public void setLicensee(java.lang.String value) { - setValue(1, value); - } - - /** - * Getter for license_server.log_verify.licensee. - */ - public java.lang.String getLicensee() { - return (java.lang.String) getValue(1); - } - - /** - * Setter for license_server.log_verify.license. - */ - public void setLicense(java.lang.String value) { - setValue(2, value); - } - - /** - * Getter for license_server.log_verify.license. - */ - public java.lang.String getLicense() { - return (java.lang.String) getValue(2); - } - - /** - * Setter for license_server.log_verify.request_ip. - */ - public void setRequestIp(java.lang.String value) { - setValue(3, value); - } - - /** - * Getter for license_server.log_verify.request_ip. - */ - public java.lang.String getRequestIp() { - return (java.lang.String) getValue(3); - } - - /** - * Setter for license_server.log_verify.version. - */ - public void setVersion(java.lang.String value) { - setValue(4, value); - } - - /** - * Getter for license_server.log_verify.version. - */ - public java.lang.String getVersion() { - return (java.lang.String) getValue(4); - } - - /** - * Setter for license_server.log_verify.match. - */ - public void setMatch(java.lang.Boolean value) { - setValue(5, value); - } - - /** - * Getter for license_server.log_verify.match. - */ - public java.lang.Boolean getMatch() { - return (java.lang.Boolean) getValue(5); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Record1 key() { - return (org.jooq.Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record6 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Row6 fieldsRow() { - return (org.jooq.Row6) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Row6 valuesRow() { - return (org.jooq.Row6) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field1() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.ID; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field2() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.LICENSEE; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field3() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.LICENSE; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field4() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.REQUEST_IP; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field5() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.VERSION; - } - - /** - * {@inheritDoc} - */ - @Override - public org.jooq.Field field6() { - return org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY.MATCH; - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.Long value1() { - return getId(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value2() { - return getLicensee(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value3() { - return getLicense(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value4() { - return getRequestIp(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.String value5() { - return getVersion(); - } - - /** - * {@inheritDoc} - */ - @Override - public java.lang.Boolean value6() { - return getMatch(); - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached LogVerifyRecord - */ - public LogVerifyRecord() { - super(org.jooq.example.jaxrs.db.tables.LogVerify.LOG_VERIFY); - } - - @Override - public Record6 value1(Long value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 value2(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 value3(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 value4(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 value5(String value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 value6(Boolean value) { - // TODO Auto-generated method stub - return null; - } - - @Override - public Record6 values(Long t1, String t2, String t3, String t4, - String t5, Boolean t6) { - // TODO Auto-generated method stub - return null; - } -} diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/resources/applicationContext.xml b/jOOQ-examples/jOOQ-jax-rs-example/src/main/resources/applicationContext.xml deleted file mode 100644 index 3d02bf9507..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/resources/applicationContext.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jOOQ-examples/jOOQ-jax-rs-example/src/main/webapp/WEB-INF/web.xml b/jOOQ-examples/jOOQ-jax-rs-example/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6afc863ccd..0000000000 --- a/jOOQ-examples/jOOQ-jax-rs-example/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - contextConfigLocation - classpath:applicationContext.xml - - - org.springframework.web.context.ContextLoaderListener - - - org.springframework.web.context.request.RequestContextListener - - - Jersey Spring Web Application - com.sun.jersey.spi.spring.container.servlet.SpringServlet - - - Jersey Spring Web Application - /* - - \ No newline at end of file