Skip to content

Fix errors when Orienteer was reload#2

Open
vitalii-honchar wants to merge 4 commits into
OrienteerBAP:masterfrom
vitalii-honchar:master
Open

Fix errors when Orienteer was reload#2
vitalii-honchar wants to merge 4 commits into
OrienteerBAP:masterfrom
vitalii-honchar:master

Conversation

@vitalii-honchar
Copy link
Copy Markdown
Member

No description provided.

classCache = new HashMap<>();
for (OClass oClass : db.getMetadata().getSchema().getClasses()) {
if (OTelegramModule.TELEGRAM_SEARCH.getValue(oClass)) {
if (OTelegramCustomAttributes.TELEGRAM_SEARCH.getOrCreate().getValue(oClass)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we discussed that I thought that you will use CustomAttributes and add "getOrCreate()" method there instead of creating separate class OTelegramCustomAttributes. Any problems with dynamic loading in that case? If no - lets get rid of OTelegramCustomAttributes.

propertiesList.add(OTelegramCustomAttributes.TELEGRAM_DOCUMENTS_LIST.getOrCreate().getName());
propertiesList.add(OTelegramCustomAttributes.TELEGRAM_CLASS_DESCRIPTION.getOrCreate().getName());
propertiesList.add(OTelegramCustomAttributes.TELEGRAM_SEARCH_QUERY.getOrCreate().getName());
structureTable = new OrienteerStructureTable<OClass, String>("attributes", model, propertiesList) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically you can use CustomAttribute instead of String here.

/**
* @author Vitaliy Gonchar
*/
public enum OTelegramCustomAttributes {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented below. It seems to be quite dummy file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants