public static Object loadObject(ValueMapping vm, OpenJPAStateManager sm,
JDBCStore store, JDBCFetchConfiguration fetch, Result res,
Joins joins, Column[] cols, boolean objectValueRequiresLoad)
throws SQLException {
if (cols.length == 0)
throw new InvalidStateException(_loc.get("cant-project-owned",
vm));
Object val = loadDataStore(vm, res, joins, cols);
if (objectValueRequiresLoad)
return vm.getHandler().toObjectValue(vm, val, sm, store, fetch);