return entityMappers.get(version).mapToKey(entity);
}
@Override
public ENTITY mapToEntity(Result result) {
ManagedSchemaEntityVersion versionRecord = managedSchemaEntityVersionEntityMapper
.mapToEntity(result);
int resultVersion = 0;
if (versionRecord != null) {
resultVersion = versionRecord.getSchemaVersion();
}
if (entityMappers.containsKey(resultVersion)) {
return entityMappers.get(resultVersion).mapToEntity(result);
} else {
schemaManager.refreshManagedSchemaCache(tableName, entityName);