Interface EntityPersistence.Factory

Enclosing interface:
EntityPersistence

public static interface EntityPersistence.Factory

Provides the EntityPersistence of entity types in a domain, the default of every editor of those types, whoever creates it. One set on an editor via EntityEditor.persistence() overrides it for that editor.

Found via ServiceLoader, the first one supporting the domain, resolved once per domain.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EntityPersistence
    The default persistence, stateless, using the default implementation of each method.
  • Method Summary

    Modifier and Type
    Method
    Description
    persistence(EntityType entityType)
    Called for each editor created for an entity type, of a supported domain.
    boolean
    supports(DomainType domainType)
     
  • Field Details

    • DEFAULT

      static final EntityPersistence DEFAULT
      The default persistence, stateless, using the default implementation of each method.
  • Method Details

    • persistence

      EntityPersistence persistence(EntityType entityType)
      Called for each editor created for an entity type, of a supported domain.
      Parameters:
      entityType - the entity type
      Returns:
      the persistence of the given entity type, DEFAULT for the default
    • supports

      boolean supports(DomainType domainType)
      Parameters:
      domainType - the domain type
      Returns:
      true if this factory provides the persistence of entity types in the given domain