Package io.jmix.core

Interface IdSerialization

All Known Implementing Classes:
IdSerializationImpl

public interface IdSerialization
Provides conversion of Id to and from the string representation.

Format of the serialized id is <entityName>.<idJson> where <entityName> is the entity name and <idJson> is JSON representation of the entity's id.

For example:

     app_UuidEntity."4e4c5ca2-9a6e-43aa-8e67-3572b674f7c0"

     app_LongIdEntity.1234

     app_CompositeKeyEntity.{"entityId":10,"tenant":"abc"}
 
  • Method Summary

    Modifier and Type
    Method
    Description
    idToString(Id<?> entityId)
    Converts Id to string.
    <T> Id<T>
    Restores Id from string.
  • Method Details

    • idToString

      String idToString(Id<?> entityId)
      Converts Id to string.
    • stringToId

      <T> Id<T> stringToId(String ref)
      Restores Id from string.