This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 84ec3363b537736e5cf2676f054d81f7c42ad3d4
Author: Benoit TELLIER <[email protected]>
AuthorDate: Fri Nov 10 10:44:59 2023 +0100

    JAMES-2586 Merge PostgresSubscriptionTable and PostgresSubscriptionModule
---
 .../postgres/user/PostgresSubscriptionDAO.java     |  6 ++--
 .../postgres/user/PostgresSubscriptionModule.java  | 12 +++++---
 .../postgres/user/PostgresSubscriptionTable.java   | 34 ----------------------
 3 files changed, 11 insertions(+), 41 deletions(-)

diff --git 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionDAO.java
 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionDAO.java
index 9bce0047d0..91b4baa2fe 100644
--- 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionDAO.java
+++ 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionDAO.java
@@ -19,9 +19,9 @@
 
 package org.apache.james.mailbox.postgres.user;
 
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.MAILBOX;
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.TABLE_NAME;
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.USER;
+import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionModule.MAILBOX;
+import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionModule.TABLE_NAME;
+import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionModule.USER;
 
 import org.apache.james.backends.postgres.utils.PostgresExecutor;
 
diff --git 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionModule.java
 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionModule.java
index 11ea9a2f3e..54ce1cc49d 100644
--- 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionModule.java
+++ 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionModule.java
@@ -19,16 +19,20 @@
 
 package org.apache.james.mailbox.postgres.user;
 
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.MAILBOX;
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.TABLE_NAME;
-import static 
org.apache.james.mailbox.postgres.user.PostgresSubscriptionTable.USER;
-
 import org.apache.james.backends.postgres.PostgresIndex;
 import org.apache.james.backends.postgres.PostgresModule;
 import org.apache.james.backends.postgres.PostgresTable;
+import org.jooq.Field;
+import org.jooq.Record;
+import org.jooq.Table;
 import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
 
 public interface PostgresSubscriptionModule {
+
+    Field<String> MAILBOX = DSL.field("mailbox", 
SQLDataType.VARCHAR(255).notNull());
+    Field<String> USER = DSL.field("user_name", 
SQLDataType.VARCHAR(255).notNull());
+    Table<Record> TABLE_NAME = DSL.table("subscription");
     PostgresTable TABLE = PostgresTable.name(TABLE_NAME.getName())
         .createTableStep(((dsl, tableName) -> dsl.createTable(tableName)
             .column(MAILBOX)
diff --git 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionTable.java
 
b/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionTable.java
deleted file mode 100644
index ad703e4d26..0000000000
--- 
a/mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/user/PostgresSubscriptionTable.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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.                                           *
- ****************************************************************/
-
-package org.apache.james.mailbox.postgres.user;
-
-import org.jooq.Field;
-import org.jooq.Record;
-import org.jooq.Table;
-import org.jooq.impl.DSL;
-import org.jooq.impl.SQLDataType;
-
-public interface PostgresSubscriptionTable {
-
-    Field<String> MAILBOX = DSL.field("mailbox", 
SQLDataType.VARCHAR(255).notNull());
-    Field<String> USER = DSL.field("user_name", 
SQLDataType.VARCHAR(255).notNull());
-    Table<Record> TABLE_NAME = DSL.table("subscription");
-
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to