objectnotfoundexception.cs

来自「工作流的基本资料(文档资料」· CS 代码 · 共 59 行

CS
59
字号
using System;

namespace NetBpm.Util.DB
{
	public class ObjectNotFoundException : DbException
	{
		private Type _objectType = null;
		private object _id = null;
		private String _query = null;
		private Object[] _values = null;

		public Type ObjectType
		{
			get { return this._objectType; }
			set { this._objectType = value; }
		}

		public object Id
		{
			get { return this._id; }
			set { this._id = value; }
		}

		public String Query
		{
			get { return this._query; }
			set { this._query = value; }
		}

		public Object[] Values
		{
			get { return this._values; }
			set { this._values = value; }
		}

		public ObjectNotFoundException(String query) : base("no object in database for query '" + query + "'")
		{
			this._query = query;
		}

		public ObjectNotFoundException(String query, Object valueObject) : base("no object in database for query '" + query + "' : " + valueObject)
		{
			this._query = query;
			this._values = new Object[] {valueObject};
		}

		public ObjectNotFoundException(String query, Object[] values) : base("no object in database for query '" + query + "' : " + values)
		{
			this._query = query;
			this._values = values;
		}

		public ObjectNotFoundException(Type objectType, object id) : base(objectType.FullName + " not found in database with id '" + id + "'")
		{
			this._objectType = objectType;
			this._id = id;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?