internal virtual void Refresh()
        {
            ClassMetadata newFieldType = DetectFieldType();

            if (newFieldType != null && newFieldType.Equals(_fieldType))
            {
                return;
            }
            _reflectField = null;
            _state        = FieldMetadataState.Unavailable;
        }
        public static IDictionary TypesFor(LocalObjectContainer db, Sharpen.Util.ISet ids
                                           )
        {
            IDictionary           id2clazzes = new Hashtable();
            ClassMetadataIterator iter       = db.ClassCollection().Iterator();

            while (iter.MoveNext())
            {
                for (IEnumerator idIter = ids.GetEnumerator(); idIter.MoveNext();)
                {
                    int           id    = ((int)idIter.Current);
                    ClassMetadata clazz = iter.CurrentClass();
                    BTree         btree = BTreeClassIndexStrategy.Btree(clazz);
                    if (btree.Search(db.SystemTransaction(), id) != null)
                    {
                        Sharpen.Util.ISet clazzes = ((Sharpen.Util.ISet)id2clazzes[id]);
                        if (clazzes == null)
                        {
                            clazzes        = new HashSet();
                            id2clazzes[id] = clazzes;
                        }
                        clazzes.Add(clazz);
                    }
                }
            }
            IDictionary id2clazz = new Hashtable();

            for (IEnumerator idIter = id2clazzes.Keys.GetEnumerator(); idIter.MoveNext();)
            {
                int id = ((int)idIter.Current);
                Sharpen.Util.ISet clazzes      = ((Sharpen.Util.ISet)id2clazzes[id]);
                ClassMetadata     mostSpecific = null;
                for (IEnumerator curClazzIter = clazzes.GetEnumerator(); curClazzIter.MoveNext();)
                {
                    ClassMetadata curClazz = ((ClassMetadata)curClazzIter.Current);
                    for (IEnumerator cmpClazzIter = clazzes.GetEnumerator(); cmpClazzIter.MoveNext();)
                    {
                        ClassMetadata cmpClazz = ((ClassMetadata)cmpClazzIter.Current);
                        if (curClazz.Equals(cmpClazz._ancestor))
                        {
                            goto OUTER_continue;
                        }
                    }
                    mostSpecific = curClazz;
                    break;
                    OUTER_continue :;
                }
                OUTER_break :;
                id2clazz[id] = mostSpecific;
            }
            return(id2clazz);
        }
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (GetType() != obj.GetType())
     {
         return(false);
     }
     return(_classMetadata.Equals(((Db4objects.Db4o.Internal.StoredClassImpl)obj)._classMetadata
                                  ));
 }