-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add exception classes, and DAO layer (#5)
make spotless add exception handler make spotless resolve modelParameter
- Loading branch information
Showing
8 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ava/com/llm_service/llm_service/controller/conversation/ConversationControllerMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.llm_service.llm_service.controller.conversation; | ||
|
||
import com.llm_service.llm_service.model.Conversation; | ||
import org.mapstruct.Mapper; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface ConversationControllerMapper { | ||
ConversationResponse map(Conversation conversation); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...om/llm_service/llm_service/exception/conversation/ConversationAlreadyExistsException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.llm_service.llm_service.exception.conversation; | ||
|
||
import java.util.UUID; | ||
|
||
public class ConversationAlreadyExistsException extends Exception { | ||
public ConversationAlreadyExistsException(UUID id) { | ||
super("Conversation with id " + id + " already exists"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ava/com/llm_service/llm_service/exception/conversation/ConversationNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.llm_service.llm_service.exception.conversation; | ||
|
||
import java.util.UUID; | ||
|
||
public class ConversationNotFoundException extends Exception { | ||
public ConversationNotFoundException(UUID id) { | ||
super("Conversation with id " + id + " is not found"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
.../src/main/java/com/llm_service/llm_service/exception/user/UserAlreadyExistsException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.llm_service.llm_service.exception.user; | ||
|
||
import java.util.UUID; | ||
|
||
public class UserAlreadyExistsException extends Exception { | ||
public UserAlreadyExistsException(UUID id) { | ||
super("User with id " + id + " already exists"); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/src/main/java/com/llm_service/llm_service/exception/user/UserNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.llm_service.llm_service.exception.user; | ||
|
||
import java.util.UUID; | ||
|
||
public class UserNotFoundException extends Exception { | ||
public UserNotFoundException(UUID id) { | ||
super("User with id " + id + " is not found"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters