public GetObjectByRemoteId ( string id ) : IMappedObject | ||
id | string | /// CMIS Object Id. /// |
return | IMappedObject |
public IMappedObject GetObjectByRemoteId(string id) {
using(var tran = this.engine.GetTransaction()) {
DbCustomSerializer<MappedObject> value = tran.Select<string, DbCustomSerializer<MappedObject>>(MappedObjectsTable, id).Value;
if (value != null) {
MappedObject data = value.Get;
if (data == null) {
return null;
}
return new MappedObject(data);
}
return null;
}
}
public void GetObjectByIdWithNotExistingIdMustReturnNull([Values(true, false)]bool withValidation) { var storage = new MetaDataStorage(this.engine, this.matcher, withValidation); Assert.That(storage.GetObjectByRemoteId("DOESNOTEXIST"), Is.Null); }