Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titlegetConversationgetConversationWithQuery
collapsetrue
    ObjectDataSenderBuilder query = new ObjectDataSenderBuilder();
    query.setObjectName(Conversation.CONVERSATION_QUERY_OBJECT_NAME);
    query.addAttribute(ConversationAttributes.ID, conversationId);
    ObjectDataSenderBuilder messages = new ObjectDataSenderBuilder(ConversationChildren.MESSAGES.getLabel(), true);
    messages.addAttribute(BasicPaginationEnum.FIRST, 10);
    messages.addPageInfo();
    messages.addField(MessageFields.CONTENT_TYPE);
    messages.addField(MessageFields.ANNOTATIONS);
    messages.addChild(new BasicCreatedByUpdatedByDataSenderBuilder(MessageChildren.CREATED_BY));
    messages.addChild(new BasicCreatedByUpdatedByDataSenderBuilder(MessageChildren.UPDATED_BY));
    query.addChild(messages);

	Conversation conversation = client.getConversationWithQuery(new ConversationGraphQLQuery(query));