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.Serializable
Technical 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 ofTechId
s.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 aTechId
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()
-
-
-
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 ofTechId
s.- See Also:
create(IIdHolder)
-
getId
public java.lang.Long getId()
Description copied from interface:IIdHolder
Returns the technical ID of this instance.
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-