Set<Category> categorySet = new HashSet<Category>();
if (objectKey instanceof CategoryKey) {
List<ObjectLink> links = ObjectLink.findByTypeAndRightAndLikeLeftObjectKey(
CATEGORY_LINKTYPE, objectKey, CATEGORY_CHILD_PREFIX);
for (ObjectLink curLink : links) {
CategoryKey curCatKey = (CategoryKey) curLink
.getLeftObjectKey();
Category curCategory = getCategoryByUUID(curCatKey.getIDInType());
if (curCategory != null) {
categorySet.add(curCategory);
}
}
}