java - Store Report names in an Interface , Enum , or as constant inside the report handler class? -
java - Store Report names in an Interface , Enum , or as constant inside the report handler class? -
for every study have special handler class study store study name private constant within handler class.
i utilize study name key study specific configuration reports configuration file.
i thought changing , store study names in enum , other approach have in mind utilize qualified name of handler class key in configuration file.
i need know approach improve : interface , enum , handler class constant or utilize class name key in configuration file instead of study name
please advice
i using enums , have used them often. have store info somewhere, why not set can find it!
do this:
public enum study { sales("sale report", "select * some_view"), profit("profit report", "select * some_other_view"); final string reportname; final string sql; private report(string reportname, string sql) { this.reportname = reportname; this.sql = sql; } public string getreportname() { homecoming reportname; } public string getsql() { homecoming sql; } } java design-patterns reporting-services jasper-reports constants
Comments
Post a Comment