Class TechId
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.shared.basic.TechId
-
- All Implemented Interfaces:
IIdHolder,java.io.Serializable
@JsonObject("TechId") public class TechId extends java.lang.Object implements IIdHolder, java.io.SerializableTechnical identifier of an entity.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TechId()TechId(IIdAndCodeHolder identifiable)TechId(java.lang.Long id)TechId(java.lang.Number id)
-
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 ofTechIds.static TechIdcreate(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 TechIdcreateWildcardTechId()Creates aTechIdwhich string representation matches all technical identifiers.booleanequals(java.lang.Object obj)java.lang.LonggetId()Returns the technical ID of this instance.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
TechId
public TechId()
-
TechId
public TechId(java.lang.Long id)
-
TechId
public TechId(java.lang.Number id)
-
TechId
public TechId(IIdAndCodeHolder identifiable)
-
-
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 ofTechIds.- See Also:
create(IIdHolder)
-
getId
public java.lang.Long getId()
Description copied from interface:IIdHolderReturns the technical ID of this instance.
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-