Introduction

Table of Contents

Business

Development

Core

Entity Definitions

PollAnswerEntityDefinition

The PollAnswerEntityDefinition extends the AbstractEntityDefinition and the AbstractNameableEntityDefinition:

asciidoctor diagram PollAnswerEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

question

stores the poll’s question, an instance of PollQuestionEntityDefinition

votes

stores a set of the poll’s votes, instances of PollVoteEntityDefinition

asciidoctor diagram PollQuestionEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

answers

stores a set of the poll’s answers, instances of PollAnswerEntityDefinition

multiSelect

stores information if the poll’s answers are multi-selection or not

PollVoteEntityDefinition

The PollVoteEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram PollVoteEntityDefinition

The defined property here is answers - it stores the poll’s answers, instances of PollAnswerEntityDefinition

asciidoctor diagram MiniCartWidgetEntityDefinition

The defined property here is question. It stores the poll’s question - an instance of PollQuestionEntityDefinition.

Spring Data JPA Repositories

PollAnswerRepository

The PollAnswerRepository extends the BaseEntityRepository:

asciidoctor diagram PollAnswerRepository

This is the corresponding Spring Data JPA repository for the PollAnswerEntityDefinition.

PollQuestionRepository

The PollQuestionRepository extends the BaseEntityRepository :

asciidoctor diagram PollQuestionRepository

This is the corresponding Spring Data JPA repository for the PollQuestionEntityDefinition.

PollVoteRepository

The PollVoteRepository extends the BaseEntityRepository:

asciidoctor diagram PollVoteRepository

This is the corresponding Spring Data JPA repository for the PollVoteEntityDefinition.

PollWidgetRepository

The PollWidgetRepository extends the ActivatableRepository and the BaseEntityRepository:

asciidoctor diagram PollWidgetRepository

Integration

The integration with the Nemesis platform is pretty straight-forward - just need to add the widget in your classpath:

<dependency>
    <groupId>io.nemesis.platform.module.widget</groupId>
    <artifactId>nemesis-widget-poll</artifactId>
</dependency>