Skip to content

Commit

Permalink
refactor(jee): javax.validation --> jakarta.validation
Browse files Browse the repository at this point in the history
refs #1691
  • Loading branch information
jo-elimu committed Jul 28, 2024
1 parent 1e4773c commit 01e273c
Show file tree
Hide file tree
Showing 57 changed files with 58 additions and 63 deletions.
9 changes: 2 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,11 @@
<artifactId>aspectjweaver</artifactId>
<version>1.9.22.1</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.7.Final</version>
<version>7.0.0.Final</version>
</dependency>


Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/DbMigration.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class DbMigration extends BaseEntity {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class Device extends BaseEntity {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/admin/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.BaseEntity;
import ai.elimu.model.contributor.Contributor;
import ai.elimu.model.v2.enums.content.LiteracySkill;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/admin/ApplicationVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.BaseEntity;
import ai.elimu.model.contributor.Contributor;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/analytics/LearningEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@MappedSuperclass
public abstract class LearningEvent extends BaseEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.Letter;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class LetterLearningEvent extends LearningEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.StoryBook;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class StoryBookLearningEvent extends LearningEvent {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Content.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.BaseEntity;
import ai.elimu.model.v2.enums.content.ContentStatus;
import ai.elimu.model.enums.PeerReviewStatus;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Emoji.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

@Entity
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Letter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

@Entity
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Number.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OrderColumn;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;

@Entity
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Sound.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.OneToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import ai.elimu.model.content.multimedia.Audio;
import ai.elimu.model.v2.enums.content.sound.ConsonantPlace;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/StoryBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import ai.elimu.model.content.multimedia.Image;
import ai.elimu.model.enums.ContentLicense;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/StoryBookChapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import ai.elimu.model.BaseEntity;
import ai.elimu.model.content.multimedia.Image;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class StoryBookChapter extends BaseEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OrderColumn;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class StoryBookParagraph extends BaseEntity {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Syllable.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OrderColumn;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class Syllable extends Content {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/Word.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OrderColumn;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.v2.enums.content.SpellingConsistency;
import ai.elimu.model.v2.enums.content.WordType;
import javax.persistence.ManyToOne;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/multimedia/Audio.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Lob;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.v2.enums.content.AudioFormat;
import javax.persistence.ManyToOne;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/multimedia/Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Lob;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.v2.enums.content.ImageFormat;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import ai.elimu.model.content.Content;
import ai.elimu.model.content.Letter;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/content/multimedia/Video.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Lob;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.v2.enums.content.VideoFormat;

@Entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ai.elimu.model.content.multimedia.Audio;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class AudioContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.model.contributor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link Audio} which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.BaseEntity;
import java.util.Calendar;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* Parent class for various types of content contribution events.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/model/contributor/Contributor.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import javax.persistence.FetchType;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;
import ai.elimu.model.enums.Role;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ai.elimu.model.content.multimedia.Image;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class ImageContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.Letter;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class LetterContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.LetterSound;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class LetterSoundContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.model.contributor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link LetterSound} which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ai.elimu.model.content.Number;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class NumberContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.model.contributor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link Number} which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link ContributionEvent} of another {@link Contributor}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.Sound;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class SoundContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class StoryBookContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link StoryBook} which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ai.elimu.model.content.Word;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Entity
public class WordContributionEvent extends ContributionEvent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.model.contributor;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* An event where a {@link Contributor} peer-reviews a {@link Word} which
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.web.admin.application;

import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import jakarta.validation.Valid;

import org.apache.logging.log4j.Logger;
import ai.elimu.dao.ApplicationDao;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;
import javax.servlet.http.HttpSession;
import javax.validation.Valid;
import jakarta.validation.Valid;
import org.apache.logging.log4j.Logger;
import ai.elimu.dao.ApplicationDao;
import ai.elimu.dao.ApplicationVersionDao;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.web.content.emoji;

import java.util.Calendar;
import javax.validation.Valid;
import jakarta.validation.Valid;

import org.apache.logging.log4j.Logger;
import ai.elimu.dao.EmojiDao;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Calendar;
import java.util.List;
import javax.validation.Valid;
import jakarta.validation.Valid;

import org.apache.logging.log4j.Logger;
import ai.elimu.dao.EmojiDao;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.web.content.letter;

import java.util.Calendar;
import javax.validation.Valid;
import jakarta.validation.Valid;

import org.apache.logging.log4j.Logger;
import ai.elimu.dao.LetterContributionEventDao;
Expand Down
Loading

0 comments on commit 01e273c

Please sign in to comment.