[#3050] DefaultRecordMapperProvider should implement Serializable

This commit is contained in:
Lukas Eder 2014-02-14 16:31:49 +01:00
parent 425b887d2d
commit 528b568634
3 changed files with 15 additions and 4 deletions

View File

@ -1485,7 +1485,7 @@ xxxxxx xxxxx xxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxx
xxxxxx x xxxxx xxxxxxx x
xx xxxxx xxx xxxx xxxx xxx xxxx xxxx
xx xxxxxxx xxxxxxxxxx xxxxxxxxxxxx x
xx xxxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxx x
xxxxxxxxxxxxxxxxxxxx
xxxxxx xxxxx
x
@ -1507,8 +1507,8 @@ xxxxxx xxxxx xxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx
xx xxx xxxxxxxxxxx xxxx xxxxxx xxxx xxxx xxxxxxxxxxx xxxxxxx xxxx
xxxxxxxxxxxxxxx xxxxxxxxxxxxxx
xx xxx xxxxxxxxxxx xxxx xxxxxx xxxx xxxx xxxxxxxxxxx xxxx xxxx xxxx xxxxxxxxxxxxxxx xxxx xxxxx
xxxxxxxxxxxxxxxxxxxxxxx x xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x
x

View File

@ -40,6 +40,8 @@
*/
package org.jooq.impl;
import java.io.Serializable;
import org.jooq.Configuration;
import org.jooq.Record;
import org.jooq.RecordMapper;
@ -52,7 +54,12 @@ import org.jooq.RecordType;
*
* @author Lukas Eder
*/
public class DefaultRecordMapperProvider implements RecordMapperProvider {
public class DefaultRecordMapperProvider implements RecordMapperProvider, Serializable {
/**
* Generated UID
*/
private static final long serialVersionUID = -5333521849740568028L;
private final Configuration configuration;

View File

@ -1523,6 +1523,10 @@ final class Utils {
@SuppressWarnings("unchecked")
static final <V> V run(Configuration configuration, CachedOperation<V> operation, String type, Object... keys) {
// If no configuration is provided take the default configuration that loads the default Settings
if (configuration == null)
configuration = new DefaultConfiguration();
// Shortcut caching when the relevant Settings flag isn't set.
if (!reflectionCaching(configuration.settings()))
return operation.call();