db = getProfiledDatabaseInstance(iRequest);
if (db.getMetadata().getSchema().getClass(urlParts[2]) == null) {
throw new IllegalArgumentException("Invalid class '" + urlParts[2] + "'");
}
final String rid = db.getClusterIdByName(urlParts[2]) + ":" + urlParts[3];
rec = db.load(new ORecordId(rid), fetchPlan);
if (rec == null)
iResponse.send(OHttpUtils.STATUS_NOTFOUND_CODE, "Not Found", OHttpUtils.CONTENT_JSON, "Record with id '" + rid
+ "' was not found.", null);
else if (iRequest.httpMethod.equals("HEAD"))