this.acmd = objectProvider.getClassMetaData();
this.storeManager = storeManager;
this.mconn = mconn;
this.table = storeManager.getTable(objectProvider.getClassMetaData());
if (pkValue != null) {
QueryResult qr = ((PartnerConnection) mconn.getConnection()).query(
new ForceQueryUtils(objectProvider.getExecutionContext(), mconn, null, null, null, null)
.buildQueryWithPK(table, objectProvider.getClassMetaData(), fieldNumbers, (String) pkValue, 0));
if (qr.getSize() == 0) {
throw new NucleusObjectNotFoundException();
}
this.sobject = qr.getRecords()[0];
} else {
this.sobject = new SObject();
}
this.query = query;