Fixed a regression based on the ServiceType toString implementation.

The DB code relied on the ServiceType toString matching the enum name. Moved
the displayable value to a dedicated field and reference it in the UI.
This commit is contained in:
Jonathan Bernard
2015-03-23 04:04:58 -05:00
parent 73be769483
commit fb722a898e
3 changed files with 8 additions and 12 deletions

View File

@ -3,9 +3,9 @@ package com.jdbernard.nlsongs.model;
public enum ServiceType {
SUN_AM("Sunday AM"), SUN_PM("Sunday PM"), WED("Wednesday");
private String displayName;
private final String displayName;
ServiceType(String displayName) { this.displayName = displayName; }
@Override public String toString() { return this.displayName; }
public String getDisplayName() { return this.displayName; }
}