java.lang.Object
ch.systemsx.cisd.openbis.generic.shared.basic.TechId
All Implemented Interfaces:
ICustomIdHolder<Long>, IIdHolder, Serializable

@JsonObject("TechId") public class TechId extends Object implements IIdHolder, Serializable
Technical identifier of an entity.
See Also:
  • Constructor Details

    • TechId

      public TechId()
    • TechId

      public TechId(Long id)
    • TechId

      public TechId(Number id)
    • TechId

      public TechId(IIdAndCodeHolder identifiable)
  • Method Details

    • 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 List<TechId> createList(long... ids)
      Convenience method for getting a list of technical ids from given array of longs.
    • createList

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

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

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

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

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

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