-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix errors when Orienteer was reload #2
base: master
Are you sure you want to change the base?
Conversation
@@ -39,7 +39,7 @@ protected Object execute(ODatabaseDocument db) { | |||
private static void createClassCache(ODatabaseDocument db) { | |||
classCache = new HashMap<>(); | |||
for (OClass oClass : db.getMetadata().getSchema().getClasses()) { | |||
if (OTelegramModule.TELEGRAM_SEARCH.getValue(oClass)) { | |||
if (OTelegramCustomAttributes.TELEGRAM_SEARCH.getOrCreate().getValue(oClass)) { |
There was a problem hiding this comment.
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_SEARCH.getOrCreate().getName()); | ||
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) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
No description provided.