)
throws CannotCreateHandlingEventException
{
if( voyage == null && handlingEventType.requiresVoyage() )
{
throw new CannotCreateHandlingEventException( "Voyage is required for handling event type " + handlingEventType );
}
else if( voyage != null && handlingEventType.prohibitsVoyage() )
{
throw new CannotCreateHandlingEventException( "Voyage is not allowed with handling event type " + handlingEventType );
}
UnitOfWork uow = uowf.currentUnitOfWork();
EntityBuilder<HandlingEvent> handlingEventBuilder = uow.newEntityBuilder( HandlingEvent.class );
handlingEventBuilder.instance().registrationTime().set( registrationTime );