EntityIdRegistry

public class EntityIdRegistry

An abstract layer for managing entity ids.

That is, checking whether something is a well-formed id, generating well-formed ids and more.

This class follows a Strategy Pattern. The actual implemenation can be found in one of the implementations of the EntityIdRegistryStrategy interface.

Author:

Timm Fitschen

Constructors

EntityIdRegistry

public EntityIdRegistry(Transaction<?> t)

EntityIdRegistry

public EntityIdRegistry(EntityIdRegistryStrategy strategy)

EntityIdRegistry

public EntityIdRegistry(String strategy, Transaction<?> t)

Methods

generate

public String generate()

Return a well-formed, new and unused entity id.

matchIdPattern

public boolean matchIdPattern(String id)

Return true if the id is a well-formed id.