Interface EntityReferenceFactory
public interface EntityReferenceFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreateEntityReference
(String typeName, Object identifier) static EntityReference
safeCreateEntityReference
(EntityReferenceFactory factory, String typeName, Object identifier, Consumer<Exception> exceptionSink)
-
Method Details
-
createEntityReference
- Parameters:
typeName
- The name of the entity type.identifier
- The identifier of the entity.- Returns:
- A reference to the entity.
- Throws:
RuntimeException
- If something goes wrong (exception while rendering an identifier, ...)
-
safeCreateEntityReference
static EntityReference safeCreateEntityReference(EntityReferenceFactory factory, String typeName, Object identifier, Consumer<Exception> exceptionSink) - Parameters:
factory
- The factory for entity references.typeName
- The name of the entity type.identifier
- The identifier of the entity.exceptionSink
- A sink for exceptions thrown during the execution of this method. Any exception thrown while creating the entity reference should beput into
that sink and should not be propagated.- Returns:
- A reference to the entity, or null if an exception was thrown while creating the entity reference.
-