Class EntityTypeKey<T>

  • Direct Known Subclasses:
    EntityTypeKeyImpl

    public abstract class EntityTypeKey<T>
    extends java.lang.Object
    Name of the entity type.
    • Constructor Detail

      • EntityTypeKey

        public EntityTypeKey()
    • Method Detail

      • create

        public static <T> EntityTypeKey<T> create​(java.lang.Class<T> messageClass,
                                                  java.lang.String name)
      • name

        public abstract java.lang.String name()
      • asScala

        public EntityTypeKey<T> asScala()
        INTERNAL API
        Returns:
        (undocumented)
      • persistenceIdFrom

        public abstract PersistenceId persistenceIdFrom​(java.lang.String entityId)
        Constructs a PersistenceId from this EntityTypeKey and the given entityId by concatenating them with | separator.

        The | separator is also used in Lagom's scaladsl.PersistentEntity but no separator is used in Lagom's javadsl.PersistentEntity. For compatibility with Lagom's javadsl.PersistentEntity you should use "" as the separator in EntityTypeKey.withEntityIdSeparator.

        Parameters:
        entityId - (undocumented)
        Returns:
        (undocumented)
      • withEntityIdSeparator

        public abstract EntityTypeKey<T> withEntityIdSeparator​(java.lang.String separator)
        Specify a custom separator for compatibility with old naming conventions. The separator is used between the EntityTypeKey and the entityId when constructing a persistenceId with EntityTypeKey.persistenceIdFrom.

        The default | separator is also used in Lagom's scaladsl.PersistentEntity but no separator is used in Lagom's javadsl.PersistentEntity. For compatibility with Lagom's javadsl.PersistentEntity you should use "" as the separator here.

        Parameters:
        separator - (undocumented)
        Returns:
        (undocumented)