From fe06243bdad4c6b6bbcf3f006b903009ef7e16b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Wed, 6 Jan 2021 11:38:16 +0100 Subject: [PATCH] Added new enums and desription MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .../java/com/plannaplan/types/GroupType.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/buisnesslogic/src/main/java/com/plannaplan/types/GroupType.java b/buisnesslogic/src/main/java/com/plannaplan/types/GroupType.java index 67fe6d3..3b57aa8 100755 --- a/buisnesslogic/src/main/java/com/plannaplan/types/GroupType.java +++ b/buisnesslogic/src/main/java/com/plannaplan/types/GroupType.java @@ -1,9 +1,23 @@ package com.plannaplan.types; /** - * GroupType contains types: LECTURE, CLASS + * GroupType contains types: LECTURE, CLASS, LAB, SEMINAR, CONSERVATORY, PRATICE */ public enum GroupType { - LECTURE, CLASS + LECTURE("Wykład"), CLASS("Ćwiczenia"), LAB("Laboratorium"), SEMINAR("Seminarium"),CONSERVATORY("Konwersatorium"), PRATICE("Praktyka"); + + public final String type; + private GroupType(String type) { + this.type = type; + } + + public final static GroupType getType(String type) { + for (GroupType d : values()) { + if (d.type.equals(type)) { + return d; + } + } + return null; + } } \ No newline at end of file