@Override
    public CasEvent saveInternal(final CasEvent event) {
        val transactionTemplate = new TransactionTemplate(this.transactionManager);
        return transactionTemplate.execute((TransactionCallback<CasEvent>) ts -> {
            val jpaEvent = new JpaCasEvent();
            jpaEvent.setId(event.getId());
            jpaEvent.setCreationTime(event.getCreationTime());
            jpaEvent.setPrincipalId(event.getPrincipalId());
            jpaEvent.setProperties(event.getProperties());
            jpaEvent.setType(event.getType());
            return entityManager.merge(jpaEvent);
        });
    }
This is {@link JpaCasEventRepository} that stores event data into a RDBMS database.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-events-jpa/src/main/java/org/apereo/cas/support/events/jpa/JpaCasEventRepository.java