-
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.
GRAD2-2637 - Cache institute api data into Redis (#331)
* GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis * GRAD2-2637 - Cache institute api data into Redis
- Loading branch information
1 parent
a5fa5dd
commit 51381f5
Showing
33 changed files
with
1,262 additions
and
217 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
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
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
5 changes: 5 additions & 0 deletions
5
api/src/main/java/ca/bc/gov/educ/api/trax/constant/CacheKey.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,5 @@ | ||
package ca.bc.gov.educ.api.trax.constant; | ||
|
||
public enum CacheKey { | ||
SCHOOL_CACHE, SCHOOL_DETAIL_CACHE, DISTRICT_CACHE, SCHOOL_CATEGORY_CODE_CACHE, SCHOOL_FUNDING_GROUP_CODE_CACHE | ||
} |
5 changes: 5 additions & 0 deletions
5
api/src/main/java/ca/bc/gov/educ/api/trax/constant/CacheStatus.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,5 @@ | ||
package ca.bc.gov.educ.api.trax.constant; | ||
|
||
public enum CacheStatus { | ||
LOADING, READY | ||
} |
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
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
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
39 changes: 39 additions & 0 deletions
39
api/src/main/java/ca/bc/gov/educ/api/trax/exception/ServiceException.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,39 @@ | ||
package ca.bc.gov.educ.api.trax.exception; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class ServiceException extends RuntimeException { | ||
|
||
private int statusCode; | ||
|
||
public ServiceException() { | ||
super(); | ||
} | ||
|
||
public ServiceException(String message) { | ||
super(message); | ||
} | ||
|
||
public ServiceException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ServiceException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
public ServiceException(String message, int value) { | ||
super(message); | ||
this.statusCode = value; | ||
} | ||
|
||
public ServiceException(String s, int value, Exception e) { | ||
super(s, e); | ||
this.statusCode = value; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/institute/SchoolDetail.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,50 @@ | ||
package ca.bc.gov.educ.api.trax.model.dto.institute; | ||
|
||
import ca.bc.gov.educ.api.trax.model.dto.BaseModel; | ||
import ca.bc.gov.educ.api.trax.model.dto.SchoolContact; | ||
import ca.bc.gov.educ.api.trax.model.entity.institute.*; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.redis.core.index.Indexed; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@Component("SchoolDetail") | ||
public class SchoolDetail extends BaseModel { | ||
|
||
private String schoolId; | ||
private String districtId; | ||
private String mincode; | ||
private String independentAuthorityId; | ||
private String schoolNumber; | ||
private String faxNumber; | ||
private String phoneNumber; | ||
private String email; | ||
private String website; | ||
private String displayName; | ||
private String displayNameNoSpecialChars; | ||
private String schoolReportingRequirementCode; | ||
private String schoolOrganizationCode; | ||
private String schoolCategoryCode; | ||
private String facilityTypeCode; | ||
private String openedDate; | ||
private String closedDate; | ||
private boolean canIssueTranscripts; | ||
private boolean canIssueCertificates; | ||
private String createUser; | ||
private String updateUser; | ||
private String createDate; | ||
private String updateDate; | ||
List<SchoolContact> contacts; | ||
List<SchoolAddress> addresses; | ||
List<Note> notes; | ||
List<Grade> grades; | ||
List<SchoolFundingGroup> schoolFundingGroups; | ||
List<NeighborhoodLearning> neighborhoodLearnings; | ||
List<SchoolMove> schoolMoves; | ||
|
||
} |
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
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
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
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
Oops, something went wrong.