Hi,
I'm working on a Confluence Server plugin using CustomContentEntityObjects as outlined in https://bitbucket.org/resah/confluence-custom-content-example. Creating and storing the entities works like a charm and I can use HQL to fetch them using several different fields of CustomContentEntityObject (e.g. title or body).
However, I cannot for the life of me, figure out how to find objects using ContentProperties. As an example I have this code when setting the property:
contentEntityObject.getProperties().setLongProperty(PAGE_ID_KEY, page.getId());
// ...
customContentManager.saveContentEntity(contentEntityObject, SAVE_CONTEXT);
How can I retrieve this object using the page id?
Kind regards,
Christopher
Hi,
I belive you can find the Content properties using getLongProperty:
contentEntityObject.getProperties().getLongProperty(String name, long defaultValue)
I knew that already. My goal was to retrieve CustomContentEntityObjects using HQL without having to do additional filtering in Java. See my answer to this question for a solution.
Well, scratch that. The language filter does not permit submitting my source code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.