예제 #1
0
        private void HandleCustomSQL(XmlNode node, PersistentClass model)
        {
            XmlNode element = node.SelectSingleNode(HbmConstants.nsSqlInsert, namespaceManager);

            if (element != null)
            {
                bool callable = IsCallable(element);
                model.SetCustomSQLInsert(element.InnerText.Trim(), callable, GetResultCheckStyle(element, callable));
            }

            element = node.SelectSingleNode(HbmConstants.nsSqlDelete, namespaceManager);
            if (element != null)
            {
                bool callable = IsCallable(element);
                model.SetCustomSQLDelete(element.InnerText.Trim(), callable, GetResultCheckStyle(element, callable));
            }

            element = node.SelectSingleNode(HbmConstants.nsSqlUpdate, namespaceManager);
            if (element != null)
            {
                bool callable = IsCallable(element);
                model.SetCustomSQLUpdate(element.InnerText.Trim(), callable, GetResultCheckStyle(element, callable));
            }

            element = node.SelectSingleNode(HbmConstants.nsLoader, namespaceManager);
            if (element != null)
                model.LoaderName = XmlHelper.GetAttributeValue(element, "query-ref");
        }