Fixing issues on annotation service

This commit is contained in:
Thomas Georgios Giannos 2024-03-12 13:10:37 +02:00
parent e3ac2394c2
commit 2cbb6297cb
4 changed files with 13 additions and 7 deletions

View File

@ -2,16 +2,24 @@ package gr.cite.annotation.common.validation;
import gr.cite.annotation.convention.ConventionService;
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
import gr.cite.annotation.integrationevent.inbox.annotationentitytouch.AnnotationEntityTouchedIntegrationEvent;
import gr.cite.tools.validation.specification.Specification;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Scope;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
@Component(UuidValidator.ValidatorName)
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class UuidValidator extends BaseValidator<UUID> {
public static final String ValidatorName = "UuidValidator";
private final MessageSource messageSource;
protected UuidValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource) {

View File

@ -19,7 +19,6 @@ public class AnnotationEntity {
public static final String _id = "id";
@Id
@Column(name = "entity_id", columnDefinition = "uuid", nullable = false)
private UUID entityId;

View File

@ -12,19 +12,17 @@ import java.util.UUID;
public class EntityUserEntity {
@Id
@Column(name = "id", columnDefinition = "uuid", updatable = false, nullable = false)
@Column(name = "\"id\"", columnDefinition = "uuid", updatable = false, nullable = false)
private UUID id;
public static final String _id = "id";
@Id
@Column(name = "id", columnDefinition = "uuid", nullable = false)
@Column(name = "\"entity_id\"", columnDefinition = "uuid", nullable = false)
private UUID entityId;
public static final String _entityId = "entityId";
@Id
@Column(name = "id", columnDefinition = "uuid", nullable = false)
@Column(name = "\"user_id\"", columnDefinition = "uuid", nullable = false)
private UUID userId;
public static final String _userId = "userId";

View File

@ -4,6 +4,7 @@ import gr.cite.annotation.common.validation.BaseValidator;
import gr.cite.annotation.common.validation.UuidValidator;
import gr.cite.annotation.convention.ConventionService;
import gr.cite.annotation.errorcode.ErrorThesaurusProperties;
import gr.cite.annotation.integrationevent.TrackedEvent;
import gr.cite.tools.validation.ValidatorFactory;
import gr.cite.tools.validation.specification.Specification;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
@ -16,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.UUID;
public class AnnotationEntityTouchedIntegrationEvent {
public class AnnotationEntityTouchedIntegrationEvent extends TrackedEvent {
private UUID entityId;