class HibernateMetadataVersionStore extends HibernateIdentifiableObjectStore<MetadataVersion> implements MetadataVersionStore {

    @Override
    public MetadataVersion getVersionByKey( long key )
    {
        CriteriaBuilder builder = getCriteriaBuilder();

        return getSingleResult( builder, newJpaParameters()
            .addPredicate( root -> builder.equal( root.get( "id" ), key ) ) );
    }

    public  HibernateMetadataVersionStore( SessionFactory sessionFactory, JdbcTemplate jdbcTemplate,
        ApplicationEventPublisher publisher, CurrentUserService currentUserService, AclService aclService );

}