Class TechId

  • All Implemented Interfaces:
    IIdHolder, java.io.Serializable

    @JsonObject("TechId")
    public class TechId
    extends java.lang.Object
    implements IIdHolder, java.io.Serializable
    Technical identifier of an entity.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.Long> asLongs​(java.util.Collection<TechId> techIds)
      Convenience method for getting a list of long ids from given list of TechIds.
      static TechId create​(IIdHolder idHolder)  
      static java.util.List<TechId> createList​(long... ids)
      Convenience method for getting a list of technical ids from given array of longs.
      static java.util.List<TechId> createList​(java.util.Collection<? extends IIdHolder> idHolders)
      Convenience method for getting a list of technical ids from given list of objects with identifiers.
      static java.util.List<TechId> createList​(java.util.List<java.lang.Long> ids)
      Convenience method for getting a list of technical ids from collection of longs.
      static TechId createWildcardTechId()
      Creates a TechId which string representation matches all technical identifiers.
      boolean equals​(java.lang.Object obj)  
      java.lang.Long getId()
      Returns the technical ID of this instance.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TechId

        public TechId()
      • TechId

        public TechId​(java.lang.Long id)
      • TechId

        public TechId​(java.lang.Number id)
    • Method Detail

      • create

        public static TechId create​(IIdHolder idHolder)
        Returns:
        Technical id with id from given idHolder or null if the holder does not provide any id.
      • createList

        public static java.util.List<TechId> createList​(long... ids)
        Convenience method for getting a list of technical ids from given array of longs.
      • createList

        public static java.util.List<TechId> createList​(java.util.List<java.lang.Long> ids)
        Convenience method for getting a list of technical ids from collection of longs.
      • createList

        public static java.util.List<TechId> createList​(java.util.Collection<? extends IIdHolder> idHolders)
        Convenience method for getting a list of technical ids from given list of objects with identifiers.
        See Also:
        create(IIdHolder)
      • asLongs

        public static java.util.List<java.lang.Long> asLongs​(java.util.Collection<TechId> techIds)
        Convenience method for getting a list of long ids from given list of TechIds.
        See Also:
        create(IIdHolder)
      • getId

        public java.lang.Long getId()
        Description copied from interface: IIdHolder
        Returns the technical ID of this instance.
        Specified by:
        getId in interface IIdHolder
        Returns:
        null if there is no Id.
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • createWildcardTechId

        public static TechId createWildcardTechId()
        Creates a TechId which string representation matches all technical identifiers.