Interface IdMask

  • All Superinterfaces:
    CustomBean
    All Known Implementing Classes:
    AbstractIdMask, IdMaskCipher, NoOpIdMask

    public interface IdMask
    extends CustomBean
    Interface for an id mask. The mask is applied whenever an entity identifier (by heuristic, any data of type Long or long) is sent to a client (converting from entities to VO's, DTO's) and removed when sending back (converting from VO's, DTO's to entities). Also, service method arguments of type Long have the mask removed, while method results of type Long have the mask applied automatically.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long apply​(long id)
      Applies the mask for the given identifier
      Long apply​(Long id)
      Applies the mask for the given object identifier
      Long apply​(Object object)
      Applies the mask for the given object if it is a Long.
      long remove​(long id)
      Removes the mask from the given identifier
      Long remove​(Long id)
      Removes the mask from the given object identifier
      Long remove​(Object object)
      Removes the mask from the given object if it is a Long.
    • Method Detail

      • apply

        long apply​(long id)
        Applies the mask for the given identifier
      • apply

        Long apply​(Long id)
        Applies the mask for the given object identifier
      • apply

        Long apply​(Object object)
        Applies the mask for the given object if it is a Long. Otherwise, returns as is
      • remove

        long remove​(long id)
        Removes the mask from the given identifier
      • remove

        Long remove​(Long id)
        Removes the mask from the given object identifier
      • remove

        Long remove​(Object object)
        Removes the mask from the given object if it is a Long. Otherwise, returns as is