mardi 19 février 2019

Receiving data from database by static identifiers (Example in Java)

Well, i have a question about application design. My Application allows to create tickets in jira. We have prepared some clone tickets, my application should clone and replace the placeholders in these tickets. We have a bunch of tickets sorted by their types, for example we have a setup, mobile or a customization template type. We stores this types in database and they refer to the actual template issues.

My question is how to receive the templates from database in the best way. So the user can select any setup template he wants from a drop down menu. In the moment i get the template types in a hard coded way, by their primary key and display their referred templates in the user interface.

this.setup = super.getTemplateTypeDAO().getByPrimaryKey(1);
this.mobile = super.getTemplateTypeDAO().getByPrimaryKey(3);
setup.getJiraTemplates(); //displayed in user interface

Is this a normal approach for this or should i define a configuration file for these template types?

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire