Exemplo n.º 1
0
        public bool UpdateObject(object keyValue, string[] newSerializedOtherFields)
        {
            KClass target = new KClass(keyValue, OOD.Types.GetInternalType(keyValue.GetType()));

            target.SerializedOtherData = new DClass(newSerializedOtherFields);
            return(m_tree.UpdateData(target));
        }
Exemplo n.º 2
0
        public bool UpdateTopNodeSId(string className, uint newTopNodeSId)
        {
            ClassEntry oldValue = Search(className);

            if (oldValue != null)
            {
                //update cache
                ((ClassEntry)m_cid_cache[oldValue.CId]).SetTopNodeSId(newTopNodeSId);
                //update the b-tree file
                KCatalog newKey = new KCatalog(className);
                newKey.ClassInfo = new DCatalog(oldValue.CId, oldValue.FieldNames, newTopNodeSId);
                if (m_tree.UpdateData(newKey) == false)
                {
                    throw new OOD.Exception.ProgramLogicError(
                              this,
                              "Update operation failed for class info b-tree.");
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public bool UpdateAddr(uint segId, uint offset, int length)
        {
            KSegId updatedKey = new KSegId(segId, new DSegAddr(offset, length));

            return(m_tree.UpdateData(updatedKey));
        }