private void UserCurrencyUpdate(UserCurrency agent, bool full)
 {
     if (full)
         m_gd.Update(_REALM,
                     new Dictionary<string, object>
                         {
                             {"LandInUse", agent.LandInUse},
                             {"Tier", agent.Tier},
                             {"IsGroup", agent.IsGroup},
                             {"Amount", agent.Amount},
                             {"StipendsBalance", agent.StipendsBalance}
                         }, null,
                     new QueryFilter()
                         {
                             andFilters =
                                 new Dictionary<string, object>
                                     {
                                         {"PrincipalID", agent.PrincipalID}
                                     }
                         }
                     , null, null);
     else
         m_gd.Update(_REALM,
                     new Dictionary<string, object>
                         {
                             {"LandInUse", agent.LandInUse},
                             {"Tier", agent.Tier},
                             {"IsGroup", agent.IsGroup}
                         }, null,
                     new QueryFilter()
                         {
                             andFilters =
                                 new Dictionary<string, object>
                                     {
                                         {"PrincipalID", agent.PrincipalID}
                                     }
                         }
                     , null, null);
 }
        public UserCurrency GetUserCurrency(UUID agentId)
        {
            object remoteValue = DoRemoteByURL("CurrencyServerURI", agentId);
            if (remoteValue != null || m_doRemoteOnly)
                return (UserCurrency) remoteValue;

            Dictionary<string, object> where = new Dictionary<string, object>(1);
            where["PrincipalID"] = agentId;
            List<string> query = m_gd.Query(new string[] {"*"}, _REALM, new QueryFilter()
                                                                            {
                                                                                andFilters = where
                                                                            }, null, null, null);

            UserCurrency currency = new UserCurrency();
            if (query.Count == 0)
            {
                UserCurrencyCreate(agentId);
                return currency;
            }
            currency.FromArray(query);
            return currency;
        }
        public bool UserCurrencyUpdate(UserCurrency agent)
        {
            object remoteValue = DoRemoteByURL("CurrencyServerURI", agent);
            if (remoteValue != null || m_doRemoteOnly)
                return (bool) remoteValue;

            UserCurrencyUpdate(agent, false);
            return true;
        }