if (!(doc instanceof ODocument)) throw new IllegalArgumentException(rid +" is a rid not referencing a valid Document");
try{
checkModelDocument((ODocument)doc);
}catch(InvalidModelException e){
//the rid may reference a ORecordBytes which is not a ODocument
throw new InvalidModelException("the rid " + rid + " is not valid belong to the collection " + this.MODEL_NAME);
}
if (Logger.isTraceEnabled()) Logger.trace("Method End");
return (ODocument)doc;
}