Class UuidInstantId<E>

  • Type Parameters:
    E - the generic type of the identified entity.
    All Implemented Interfaces:
    Id<E>

    public class UuidInstantId<E>
    extends AbstractInstantId<E,​UUID>
    Implementation of AbstractInstantId using UUID as primary key. Can be used in two scenarios:
    • Your data store uses UUIDs natively as primary key (e.g. apache cassandra supports this). In such case you will always directly use a UUID as the actual primary key.
    • You may need to express a link to a transient entity. Then you can temporary assign a UUID to the entity on the client and link it via such ID. On the server-side the actual UuidInstantId will then be replaced with the actual ID while persisting the data.
    Since:
    1.0.0