private <F extends Field<ENTITY>> Object toDatabaseType(F field, ENTITY entity) {
        final Object javaValue = field.getter().apply(entity);
        
        @SuppressWarnings("unchecked")
        final Object dbValue = ((TypeMapper<Object, Object>) field.typeMapper()).toDatabaseType(javaValue);
        
        return dbValue;
    }
Default implementation of the {@link SqlPersistence}-interface.

@param <ENTITY>  the entity type

@author  Emil Forslund
@author  Dan Lawesson
@since   3.0.1
runtime-parent/runtime-core/src/main/java/com/speedment/runtime/core/internal/component/sql/SqlPersistenceProviderImpl.java