prepared database for bookmark service
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core;
|
||||
|
||||
import de.srsoftware.tools.jdbc.Query;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import static de.srsoftware.tools.jdbc.Condition.equal;
|
||||
import static de.srsoftware.tools.jdbc.Query.replaceInto;
|
||||
import static de.srsoftware.tools.jdbc.Query.update;
|
||||
@@ -14,8 +10,12 @@ import static java.lang.System.Logger.Level.ERROR;
|
||||
import static java.lang.System.Logger.Level.INFO;
|
||||
import static java.text.MessageFormat.format;
|
||||
|
||||
import de.srsoftware.tools.jdbc.Query;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public abstract class BaseDb {
|
||||
private final System.Logger LOG = System.getLogger(getClass().getInterfaces()[0].getSimpleName());
|
||||
protected final System.Logger LOG = System.getLogger(getClass().getInterfaces()[0].getSimpleName());
|
||||
|
||||
protected final Connection db;
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core.api;
|
||||
|
||||
public interface BookmarkService {
|
||||
}
|
||||
@@ -3,9 +3,6 @@ package de.srsoftware.umbrella.core.api;
|
||||
|
||||
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.model.Note;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public interface NoteService {
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core.model;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.Map;
|
||||
|
||||
import static de.srsoftware.umbrella.core.Constants.*;
|
||||
import static de.srsoftware.umbrella.core.Util.markdown;
|
||||
import static java.time.ZoneOffset.UTC;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
public record Note(long id, String module, long entityId, long authorId, String text, LocalDateTime timestamp) implements Mappable {
|
||||
public static Note of(ResultSet rs) throws SQLException {
|
||||
return new Note(
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core.model;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import static de.srsoftware.umbrella.core.Constants.CODE;
|
||||
import static de.srsoftware.umbrella.core.Constants.NAME;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static de.srsoftware.umbrella.core.Constants.CODE;
|
||||
import static de.srsoftware.umbrella.core.Constants.NAME;
|
||||
|
||||
public record Status(String name, int code) implements Mappable {
|
||||
public static final Status PENDING = new Status("PENDING", 10); // was 40
|
||||
public static final Status OPEN = new Status("OPEN",20); // was 10
|
||||
|
||||
Reference in New Issue
Block a user