Class IdRef<E>
- java.lang.Object
-
- com.devonfw.module.basic.common.api.reference.GenericIdRef<Long,E>
-
- com.devonfw.module.basic.common.api.reference.IdRef<E>
-
- Type Parameters:
E
- generic type of the referencedentity
.
- All Implemented Interfaces:
Ref<Long,E>
,Serializable
public class IdRef<E> extends GenericIdRef<Long,E>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> IdRef<E>
of(long id)
static <E extends GenericEntity<Long>>
IdRef<E>of(E entity)
static <E> IdRef<E>
of(Long id)
-
Methods inherited from class com.devonfw.module.basic.common.api.reference.GenericIdRef
equals, getId, hashCode, toString
-
-
-
-
Method Detail
-
of
public static <E extends GenericEntity<Long>> IdRef<E> of(E entity)
- Type Parameters:
E
- generic type of the referencedGenericEntity
.- Parameters:
entity
- theGenericEntity
to reference.- Returns:
- the
IdRef
pointing to the givenGenericEntity
ornull
if theGenericEntity
or itsID
isnull
.
-
of
public static <E> IdRef<E> of(Long id)
- Type Parameters:
E
- generic type of the referencedGenericEntity
.- Parameters:
id
- theID
to wrap.- Returns:
- the
IdRef
pointing to an entity with the specifiedID
ornull
if the givenID
wasnull
.
-
of
public static <E> IdRef<E> of(long id)
- Type Parameters:
E
- generic type of the referencedGenericEntity
.- Parameters:
id
- theID
to wrap.- Returns:
- the
IdRef
pointing to an entity with the specifiedID
.
-
-