Skip to content

Commit

Permalink
Merge pull request #232 from bcgov/feature/schoolNumGen
Browse files Browse the repository at this point in the history
Change for school number generation
mightycox authored Jan 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 678d6a1 + bbd200f commit 00e025d
Showing 6 changed files with 107 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -3,15 +3,10 @@
public final class Constants {

private Constants() {}
public static final String PUBLIC ="PUBLIC";
public static final String YUKON ="YUKON";
public static final String STANDARD ="STANDARD";
public static final String NINETY = "90";
public static final String NINETYNINE = "99";
public static final String NINETYSIX = "96";
public static final String NINETYFIVE = "95";
public static final String NINETYFOUR = "94";
public static final String NINETYSEVEN = "97";
public static final String LOWERBOUND = "000";
public static final String TWENTYFIVE = "25";
public static final String UPPERBOUND = "999";
Original file line number Diff line number Diff line change
@@ -4,17 +4,18 @@

public enum FacilityCategoryLookup {

ENTRY1(new String[] {"DIST_LEARN", "DISTONLINE", "ALT_PROGS"}, new String[]{Constants.PUBLIC, Constants.YUKON, "INDEPEND"}),
ENTRY2(new String[] {Constants.STANDARD}, new String[]{Constants.PUBLIC, Constants.YUKON}),
ENTRY3(new String[] {Constants.STANDARD}, new String[]{"OFFSHORE", "INDEPEND"}),
ENTRY4(new String[] {Constants.STANDARD}, new String[]{"INDP_FNS", "FED_BAND"}),
ENTRY5(new String[] {"CONT_ED"}, new String[]{Constants.PUBLIC}),
ENTRY6(new String[] {"STRONG_CEN", "STRONG_OUT", "JUSTB4PRO"}, new String[]{"EAR_LEARN"}),
ENTRY7(new String[] {"SHORT_PRP", "LONG_PRP" }, new String[]{Constants.PUBLIC}),
ENTRY8(new String[] {"SUMMER"}, new String[]{Constants.PUBLIC, Constants.YUKON}),
ENTRY9(new String[] {"YOUTH"}, new String[]{Constants.PUBLIC}),
ENTRY10(new String[] {"POST_SEC"}, new String[]{"POST_SEC"})
;
ENTRY1(new String[] {FacilityTypeCodes.DIST_LEARN.getCode(), FacilityTypeCodes.DISTONLINE.getCode(), FacilityTypeCodes.ALT_PROGS.getCode()},
new String[]{SchoolCategoryCodes.PUBLIC.getCode(), SchoolCategoryCodes.YUKON.getCode()}),
ENTRY2(new String[] {FacilityTypeCodes.STANDARD.getCode()}, new String[]{SchoolCategoryCodes.PUBLIC.getCode(), SchoolCategoryCodes.YUKON.getCode()}),
ENTRY3(new String[] {FacilityTypeCodes.DIST_LEARN.getCode(), FacilityTypeCodes.STANDARD.getCode()}, new String[]{SchoolCategoryCodes.OFFSHORE.getCode(), SchoolCategoryCodes.INDEPEND.getCode()}),
ENTRY4(new String[] {FacilityTypeCodes.STANDARD.getCode()}, new String[]{SchoolCategoryCodes.INDP_FNS.getCode(), SchoolCategoryCodes.FED_BAND.getCode()}),
ENTRY5(new String[] {FacilityTypeCodes.CONT_ED.getCode()}, new String[]{SchoolCategoryCodes.PUBLIC.getCode()}),
ENTRY6(new String[] {FacilityTypeCodes.STRONG_CEN.getCode(), FacilityTypeCodes.STRONG_OUT.getCode(), FacilityTypeCodes.JUSTB4PRO.getCode()},
new String[]{SchoolCategoryCodes.EAR_LEARN.getCode()}),
ENTRY7(new String[] {FacilityTypeCodes.SHORT_PRP.getCode(), FacilityTypeCodes.LONG_PRP.getCode() }, new String[]{SchoolCategoryCodes.PUBLIC.getCode()}),
ENTRY8(new String[] {FacilityTypeCodes.SUMMER.getCode()}, new String[]{SchoolCategoryCodes.PUBLIC.getCode(), SchoolCategoryCodes.YUKON.getCode()}),
ENTRY9(new String[] {FacilityTypeCodes.YOUTH.getCode()}, new String[]{SchoolCategoryCodes.PUBLIC.getCode()}),
ENTRY10(new String[] {FacilityTypeCodes.POST_SEC.getCode()}, new String[]{SchoolCategoryCodes.POST_SEC.getCode()});

private final String[] facilityCodes;
private final String[] mappedCategories;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package ca.bc.gov.educ.api.institute.constants.v1;

import lombok.Getter;

/**
* The enum for school's facility type codes
*/
@Getter
public enum FacilityTypeCodes {
PROVINCIAL("PROVINCIAL"),
DIST_CONT("DIST_CONT"),
ELEC_DELIV("ELEC_DELIV"),
STANDARD("STANDARD"),
CONT_ED("CONT_ED"),
DIST_LEARN("DIST_LEARN"),
ALT_PROGS("ALT_PROGS"),
STRONG_CEN("STRONG_CEN"),
STRONG_OUT("STRONG_OUT"),
SHORT_PRP("SHORT_PRP"),
LONG_PRP("LONG_PRP"),
SUMMER("SUMMER"),
YOUTH("YOUTH"),
DISTONLINE("DISTONLINE"),
POST_SEC("POST_SEC"),
JUSTB4PRO("JUSTB4PRO");

private final String code;
FacilityTypeCodes(String code) { this.code = code; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ca.bc.gov.educ.api.institute.constants.v1;

import lombok.Getter;

/**
* The enum for school category codes
*/
@Getter
public enum SchoolCategoryCodes {
IMM_DATA("IMM_DATA"),
CHILD_CARE("CHILD_CARE"),
MISC("MISC"),
PUBLIC("PUBLIC"),
INDEPEND("INDEPEND"),
FED_BAND("FED_BAND"),
OFFSHORE("OFFSHORE"),
EAR_LEARN("EAR_LEARN"),
YUKON("YUKON"),
POST_SEC("POST_SEC"),
INDP_FNS("INDP_FNS");

private final String code;
SchoolCategoryCodes(String code) { this.code = code; }
}
Loading

0 comments on commit 00e025d

Please sign in to comment.