JNoSQL Book
  • Eclipse JNoSQL
  • LANGS
  • Eclipse JNoSQL one API to many NoSQL databases
    • About me
    • A principal ideia atrás da AP
    • Por que Diana?
    • Bibliografia
    • Credits
    • Introdução ao Diana
      • Value
      • Criando o seu próprio Writer and Reader
      • Element Entity
      • Document
      • Column
      • Entidade
      • ColumnFamilyEntity
      • DocumentEntity
      • KeyValueEntity
      • Manager
      • Column Manage
      • Document Manage
      • Bucket Manager
      • Factory
      • Column Family Manager Factory
      • Document Family Manager Factory
      • Bucket Manager Factory
      • Configuration
      • Document Configuration
      • Column Configuration
      • Key Value Configuration
    • Diversidade nos Bancos não relacionais
      • Utilizando drivers para com o Diana
    • Introdução ao Artemis
      • Anotações para o Modelo
      • Classes templates
      • Template de Documentos
      • Template de Família de Colunas
      • Template de Chave valor
      • CrudRepository
      • Lidando com os eventos da persistência
      • Bean Validation
    • Componentes do Artemis
      • Workflow
      • EventManager
      • Converter
      • As classes respositórios
    • SUMMARY
    • introduction
  • Eclipse JNoSQL one API para vários bancos NoSQL
    • introduction
    • The main idea behind the API
      • Why Diana?
    • Diana Introduction
      • Value
      • Make custom Writer and Reader
      • Element Entity
      • Document
      • Column
      • Entity
      • ColumnFamilyEntity
      • DocumentEntity
      • KeyValueEntity
      • Manager
      • Document Manager
      • Column Manager
      • Bucket Manager
      • Factory
      • [[Column Family Manager Factory](en/part2/chapter2_5_1.md)
      • Document Collection Factory
      • Bucket Manager Factory
      • Configuration
      • Document Configuration
      • Column Configuration
      • Key Value Configuration
    • The diversity on NoSQL databases
      • Using Diana drivers
      • Implementing a Document Driver
    • Artemis introduction
      • Models Annotation
      • Template classes
      • Document Template
      • Column Family Template
      • Key-value Template
      • Repository
      • Persistence events
      • Bean Validation
    • Artemis components
      • Workflow
      • EventManager
      • Converter
      • The repository class
    • SUMMARY
    • README
    • credits
    • About me
  • LICENSE
Powered by GitBook
On this page
  1. Eclipse JNoSQL one API para vários bancos NoSQL
  2. Artemis introduction

Template classes

PreviousModels AnnotationNextDocument Template

Last updated 6 years ago

The template offers convenience operations to create, update, delete, query and provides a mapping between your domain objects and Diana API. The templates classes have the goal to persist an Entity Model through Diana API. It has three components:

  • Converter: That converts the Entity to a communication level API.

  • EntityManager: The EntityManager from Diana.

  • Workflow: That defines the workflow when either save or update an entity These events are useful when you, eg., want to validate data before be saved. See the following picture:

The default workflow has four events:

  1. firePreEntity: The Object received from Artemis.

  2. firePreEntityDataBaseType: Just like the previous event, however, to a specific database, in other words, each database has a particular event.

  3. firePreAPI: The object converted to a communication layer.

  4. firePostAPI: The entity connection as a response from the database.

  5. firePostEntity: The entity model from the API low level from the firePostAPI.

  6. firePostEntityDataBaseType: Just like the previous event, however, to a specific database, in other words, each database has a particular event.