public ORecordInternal<T> load() {
if (_database == null)
throw new ODatabaseException("No database assigned to current record");
if (!getIdentity().isValid())
throw new ORecordNotFoundException("The record has no id, probably it's new or transient yet ");
try {
final ORecordInternal<?> result = _database.load(this);
if (result == null)
throw new ORecordNotFoundException("The record with id '" + getIdentity() + "' was not found");
if (result != this) {
// GET CONTENT
// result.toStream();
// fromStream(result.toStream());
}
return (ORecordInternal<T>) result;
} catch (Exception e) {
throw new ORecordNotFoundException("The record with id '" + getIdentity() + "' was not found", e);
}
}