public virtual object LoadObject(Net.Vpc.Upa.Entity e, object id, bool record, Net.Vpc.Upa.Impl.Persistence.Result.LoaderContext context) { Net.Vpc.Upa.NamedId cacheId = new Net.Vpc.Upa.NamedId(id, e.GetName()); Net.Vpc.Upa.Impl.Util.CacheMap <Net.Vpc.Upa.NamedId, object> referencesCache = context.GetReferencesCache(); object existingValue = referencesCache.Get(cacheId); if (existingValue == null && !referencesCache.ContainsKey(cacheId)) { Net.Vpc.Upa.Query query = e.CreateQueryBuilder().ById(id).SetHints(context.GetHints()); existingValue = record ? ((object)(query.GetRecord())) : query.GetEntity <object>(); referencesCache.Put(cacheId, existingValue); } return(existingValue); }
public override bool Equals(object o) { if (this == o) { return(true); } if (!(o is Net.Vpc.Upa.NamedId)) { return(false); } Net.Vpc.Upa.NamedId namedId = (Net.Vpc.Upa.NamedId)o; if (id != null ? !id.Equals(namedId.id) : namedId.id != null) { return(false); } return(!(name != null ? !name.Equals(namedId.name) : namedId.name != null)); }