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- theGenericEntityto reference.- Returns:
- the
IdRefpointing to the givenGenericEntityornullif theGenericEntityor itsIDisnull.
-
of
public static <E> IdRef<E> of(Long id)
- Type Parameters:
E- generic type of the referencedGenericEntity.- Parameters:
id- theIDto wrap.- Returns:
- the
IdRefpointing to an entity with the specifiedIDornullif the givenIDwasnull.
-
of
public static <E> IdRef<E> of(long id)
- Type Parameters:
E- generic type of the referencedGenericEntity.- Parameters:
id- theIDto wrap.- Returns:
- the
IdRefpointing to an entity with the specifiedID.
-
-