You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/06/19 16:45:25 UTC

svn commit: r191346 [8/16] - in /ibatis/trunk/cs/npetshop2: ./ External-bin/ NPetshop.Domain/ NPetshop.Domain/Accounts/ NPetshop.Domain/Billing/ NPetshop.Domain/Catalog/ NPetshop.Domain/Shopping/ NPetshop.Persistence/ NPetshop.Persistence/Ddl/ NPetshop...

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Account.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Account.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Account.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Account.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,63 @@
+
+using System;
+
+namespace NPetshop.Domain.Accounts
+{
+	/// <summary>
+	/// Business entity used to model user account
+	/// </summary>
+	[Serializable]
+	public class Account 
+	{
+
+		#region Private Fields
+		private string _login = string.Empty;
+		private string _password = string.Empty;
+		private string _email = string.Empty;
+		private string _status = string.Empty;
+		private Address _address = new Address();
+		private Profile _profile = new Profile();
+		#endregion
+
+		#region Properties 
+		public string Login
+		{
+			get{return _login;} 
+			set{_login = value;}
+		}
+
+		public string Password 
+		{
+			get{return _password;} 
+			set{_password = value;}
+		}
+
+		public string Email 
+		{
+			get{return _email;} 
+			set{_email = value;}
+		}
+
+		public string Status 
+		{
+			get{return _status;} 
+			set{_status = value;}
+		}
+
+		public Address Address
+		{
+			get{return _address;} 
+			set{_address = value;}
+		}
+
+
+		public Profile Profile
+		{
+			get{return _profile;} 
+			set{_profile = value;}
+		}
+
+		#endregion
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Address.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Address.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Address.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Address.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,82 @@
+using System;
+
+
+namespace NPetshop.Domain.Accounts
+{
+	/// <summary>
+	/// Business entity used to model an address
+	/// </summary>
+	[Serializable]
+	public class Address 
+	{
+
+		#region Private Fields
+		private string _firstName;
+		private string _lastName;
+		private string _address1;
+		private string _address2;
+		private string _city;
+		private string _state;
+		private string _zip;
+		private string _country;
+		private string _phone;
+		#endregion
+
+		#region Properties 
+
+		public string FirstName 
+		{
+			get { return _firstName; }
+			set { _firstName = value; }
+		}
+
+		public string LastName 
+		{
+			get { return _lastName; }
+			set { _lastName = value; }
+		}
+
+		public string Address1 
+		{
+			get { return _address1; }
+			set { _address1 = value; }
+		}
+
+		public string Address2 
+		{
+			get { return _address2; }
+			set { _address2 = value; }
+		}
+
+		public string City 
+		{
+			get { return _city; }
+			set { _city = value; }
+		}
+
+		public string State 
+		{
+			get { return _state; }
+			set { _state = value; }
+		}
+
+		public string Zip 
+		{
+			get { return _zip; }
+			set { _zip = value; }
+		}
+
+		public string Country 
+		{
+			get { return _country; }
+			set { _country = value; }
+		}
+
+		public string Phone 
+		{
+			get { return _phone; }
+			set { _phone = value; }
+		}
+		#endregion
+	}
+}
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Profile.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Profile.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Profile.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Accounts/Profile.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,55 @@
+
+using System;
+
+using NPetshop.Domain.Catalog;
+
+namespace NPetshop.Domain.Accounts
+{
+	/// <summary>
+	///  Business entity used to model user profile
+	/// </summary>
+	public class Profile
+	{
+
+		#region Private Fields
+		private Category _favouriteCategory = null;
+		private string _favoriteLanguage = string.Empty;
+		private bool _isShowFavorites = false;
+		private bool _isShowBanners = false;
+		private string _bannerName  = string.Empty;
+		#endregion
+
+		#region Properties
+
+		public Category FavouriteCategory
+		{
+			get{return _favouriteCategory;} 
+			set{_favouriteCategory = value;}
+		}
+
+		public string FavoriteLanguage
+		{
+			get{return _favoriteLanguage;} 
+			set{_favoriteLanguage = value;}
+		}
+
+		public bool IsShowFavorites
+		{
+			get{return _isShowFavorites;} 
+			set{_isShowFavorites = value;}
+		}
+
+		public bool IsShowBanners
+		{
+			get{return _isShowBanners;} 
+			set{_isShowBanners = value;}
+		}
+
+		public string BannerName
+		{
+			get{return _bannerName;} 
+			set{_bannerName = value;}
+		}
+		#endregion
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/AssemblyInfo.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/AssemblyInfo.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/AssemblyInfo.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/AssemblyInfo.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/CreditCard.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/CreditCard.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/CreditCard.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/CreditCard.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,56 @@
+using System;
+
+
+namespace NPetshop.Domain.Billing
+{
+
+	/// <summary>
+	/// Business entity used to model credit card information.
+	/// </summary>
+	[Serializable]
+	public class CreditCard{
+
+		#region Private Fields
+		private string _cardType;
+		private string _cardNumber;
+		private string _cardExpiration;
+		#endregion
+
+		#region Properties 
+		/// <summary>
+		/// Default constructor
+		/// </summary>
+		public CreditCard()
+		{
+		}
+
+		/// <summary>
+		/// Constructor with specified initial values
+		/// </summary>
+		/// <param name="cardType">Card type, e.g. Visa, Master Card, American Express</param>
+		/// <param name="cardNumber">Number on the card</param>
+		/// <param name="cardExpiration">Expiry Date, form  MM/YY</param>
+		public CreditCard(string cardType, string cardNumber, string cardExpiration){
+			this._cardType = cardType;
+			this._cardNumber = cardNumber;
+			this._cardExpiration = cardExpiration;
+		}
+
+		// Properties
+		public string CardType {
+			get { return _cardType; }
+			set { _cardType = value; }
+		}
+
+		public string CardNumber {
+			get { return _cardNumber; }
+			set { _cardNumber = value; }
+		}
+
+		public string CardExpiration {
+			get { return _cardExpiration; }
+			set { _cardExpiration = value; }
+		}
+		#endregion
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/LineItem.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/LineItem.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/LineItem.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/LineItem.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,91 @@
+
+using System;
+
+using NPetshop.Domain.Shopping;
+using NPetshop.Domain.Catalog;
+
+namespace NPetshop.Domain.Billing
+{
+	/// <summary>
+	/// Business entity used to model an order line item
+	/// </summary>
+	public class LineItem
+	{
+
+		#region Private Fields
+		private Order _order = null;
+		private Item _item = null;
+		private int _lineNumber = 0;
+		private int _quantity = 0;
+		private decimal _total = 0.0m;
+		#endregion
+
+		#region Constructors
+		public LineItem() { }
+
+		public LineItem(int lineNumber, ShoppingCartLine cartItem) 
+		{
+			_lineNumber = lineNumber;
+			this.Quantity = cartItem.Quantity;
+			this.Item = cartItem.Item;
+		}
+		#endregion
+
+		#region Properties
+
+		public Order Order
+		{
+			get{return _order;} 
+			set{_order = value;}
+		}
+
+		public int LineNumber 
+		{
+			get{return _lineNumber;} 
+			set{_lineNumber = value;}
+		}
+
+		public decimal Total 
+		{
+			get{return _total;} 
+		}
+
+		public Item Item
+		{
+			get{return _item;} 
+			set
+			{
+				_item = value;
+				CalculateTotal();
+			}
+		}
+
+
+		public int Quantity 
+		{
+			get{return _quantity;} 
+			set
+			{
+				_quantity = value;
+				CalculateTotal();
+			}		
+		}
+		#endregion
+
+		#region Private methods
+
+		private void CalculateTotal() 
+		{
+			if (_item != null) 
+			{
+				_total = this.Item.ListPrice * this.Quantity;
+			} 
+			else 
+			{
+				_total = 0.0m;
+			}
+		}
+		#endregion
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/Order.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/Order.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/Order.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Billing/Order.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,115 @@
+
+using System;
+using System.Collections;
+
+using NPetshop.Domain.Accounts;
+using NPetshop.Domain.Shopping;
+
+namespace NPetshop.Domain.Billing
+{
+
+	/// <summary>
+	/// Business entity used to model an order
+	/// </summary>
+	[Serializable]
+	public class Order 
+	{
+
+		#region Private Fields
+		private int _id;
+		private Account _account;
+		private DateTime _orderDate;
+		private CreditCard _creditCard = new CreditCard();
+		private Address _billingAddress = new Address();
+		private Address _shippingAddress = new Address();
+		private decimal _totalPrice;
+		private IList _lineItems = new ArrayList();
+		#endregion
+
+		#region Properties 
+
+
+		public int Id 
+		{
+			get{return _id;} 
+			set{_id = value;}
+		}
+
+		public Account Account 
+		{
+			get{return _account;} 
+			set{_account = value;}
+		}
+
+
+		public DateTime OrderDate 
+		{
+			get{return _orderDate;} 
+			set{_orderDate = value;}
+		}
+
+		public CreditCard CreditCard 
+		{
+			get{return _creditCard;} 
+			set{_creditCard = value;}
+		}
+
+
+		public Address BillingAddress 
+		{
+			get{return _billingAddress;} 
+			set{_billingAddress = value;}
+		}
+
+		public Address ShippingAddress 
+		{
+			get{return _shippingAddress;} 
+			set{_shippingAddress = value;}
+		}
+
+		public decimal TotalPrice 
+		{
+			get{return _totalPrice;} 
+			set{_totalPrice = value;}
+		}
+
+		public IList LineItems 
+		{
+			get{return _lineItems;} 
+			set{_lineItems = value;}
+		}
+		#endregion
+
+		public Order(Account account, ShoppingCart cart, Address address) 
+		{
+			_account = account;
+			_orderDate = DateTime.Now;
+
+			_shippingAddress = address;
+			_billingAddress = address;
+
+			_totalPrice = cart.Total;
+
+			IEnumerator enumerator = cart.GetAllLines();
+			while( enumerator.MoveNext() )
+			{
+				ShoppingCartLine cartLine = (ShoppingCartLine) enumerator.Current;
+				AddLineItem( cartLine );
+			}
+		}		
+		
+		#region Public Methods
+
+		public void AddLineItem(ShoppingCartLine cartItem) 
+		{
+			LineItem lineItem = new LineItem(_lineItems.Count + 1, cartItem);
+			AddLineItem(lineItem);
+		}
+
+		public void AddLineItem(LineItem lineItem) 
+		{
+			_lineItems.Add(lineItem);
+		}
+		#endregion
+	}
+}
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Category.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Category.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Category.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Category.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+
+namespace NPetshop.Domain.Catalog
+{
+
+	/// <summary>
+	/// Business entity used to model category
+	/// </summary>
+	[Serializable]
+	public class Category 
+	{
+
+		#region Private Fields
+		private string _Id;
+		private string _name;
+		private string _description;
+		private IList _products = new ArrayList();
+		#endregion
+
+		#region Properties 
+		public string Id 
+		{
+			get{return _Id;} 
+			set{_Id = value;}
+		}
+
+		public string Name 
+		{
+			get{return _name;} 
+			set{_name = value;}
+		}
+
+
+		public string Description 
+		{
+			get{return _description;} 
+			set{_description = value;}
+		}
+
+		public IList Products 
+		{
+			get{return _products;}
+			set{_products = value;}
+		}
+		#endregion
+	}
+}
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Item.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Item.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Item.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Item.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,84 @@
+using System;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+
+namespace NPetshop.Domain.Catalog
+{
+	/// <summary>
+	/// Summary description for Item.
+	/// </summary>
+	public class Item
+	{
+		#region Private Fields
+		private string _id;
+		private decimal _listPrice;
+		private decimal _unitCost;
+		private string _currency;
+		private string _photo;
+		private int _quantity;
+		private string _attribute1;
+		private Product _product;
+		private Supplier _supplier;
+		#endregion
+
+		#region Properties
+		public string Attribute1 
+		{
+			get{return _attribute1;} 
+			set{_attribute1 = value;}
+		}
+
+		public int Quantity 
+		{
+			get{return _quantity;} 
+			set{_quantity = value;}
+		}
+
+		public string Id 
+		{
+			get{return _id;} 
+			set{_id = value;}
+		}
+
+		public decimal ListPrice 
+		{
+			get{return _listPrice;} 
+			set{_listPrice = value;}
+		}
+
+		public decimal UnitCost 
+		{
+			get{return _unitCost;} 
+			set{_unitCost = value;}
+		}
+
+		public string Currency 
+		{
+			get{return _currency;} 
+			set{_currency = value;}
+		}
+
+		public Product Product 
+		{
+			get{return _product;}
+			set{_product = value;}
+		}
+
+		public Supplier Supplier 
+		{
+			get{return _supplier;}
+			set{_supplier = value;}
+		}
+
+		public string Photo 
+		{
+			set {_photo = value;}
+			get {return _photo;}
+		}
+
+		
+		#endregion
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Product.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Product.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Product.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Product.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,46 @@
+using System;
+
+namespace NPetshop.Domain.Catalog
+{
+
+	/// <summary>
+	/// Business entity used to model a product
+	/// </summary>
+	[Serializable]
+	public class Product {
+
+		#region Private Fields
+		private string _id;
+		private string _name;
+		private string _description;
+		private Category _category;
+		#endregion
+
+		#region Properties
+		public string Id 
+		{
+			set{_id = value;}
+			get { return _id; }
+		}
+
+		public string Name 
+		{
+			set{_name = value;}
+			get { return _name; }
+		}
+
+		public string Description 
+		{
+			set{_description = value;}
+			get { return _description; }
+		}		
+		
+		public Category Category 
+		{
+			set{_category = value;}
+			get{return _category;}
+		}
+		#endregion
+
+	}
+}
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Supplier.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Supplier.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Supplier.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Catalog/Supplier.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,40 @@
+using System;
+
+using NPetshop.Domain.Accounts;
+
+namespace NPetshop.Domain.Catalog
+{
+	/// <summary>
+	/// Summary description for Supplier.
+	/// </summary>
+	public class Supplier
+	{
+		#region Private Fields
+		private int _id;
+		private string _name;
+		private Address _address = new Address();
+		#endregion
+
+		#region Properties
+
+		public int Id 
+		{
+			get{return _id;} 
+			set{_id = value;}
+		}
+
+		public string Name 
+		{
+			get{return _name;} 
+			set{_name = value;}
+		}
+
+		public Address Address 
+		{
+			get{return _address;} 
+			set{_address = value;}
+		}
+		
+		#endregion
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj Sun Jun 19 07:45:17 2005
@@ -0,0 +1,164 @@
+<VisualStudioProject>
+    <CSHARP
+        ProjectType = "Local"
+        ProductVersion = "7.10.3077"
+        SchemaVersion = "2.0"
+        ProjectGuid = "{7D1DA776-6341-43C8-B9C7-8FA344996665}"
+    >
+        <Build>
+            <Settings
+                ApplicationIcon = ""
+                AssemblyKeyContainerName = ""
+                AssemblyName = "NPetshop.Domain"
+                AssemblyOriginatorKeyFile = ""
+                DefaultClientScript = "JScript"
+                DefaultHTMLPageLayout = "Grid"
+                DefaultTargetSchema = "IE50"
+                DelaySign = "false"
+                OutputType = "Library"
+                PreBuildEvent = ""
+                PostBuildEvent = ""
+                RootNamespace = "NPetshop.Domain"
+                RunPostBuildEvent = "OnBuildSuccess"
+                StartupObject = ""
+            >
+                <Config
+                    Name = "Debug"
+                    AllowUnsafeBlocks = "false"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "DEBUG;TRACE"
+                    DocumentationFile = ""
+                    DebugSymbols = "true"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "false"
+                    OutputPath = "bin\Debug\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "4"
+                />
+                <Config
+                    Name = "Release"
+                    AllowUnsafeBlocks = "false"
+                    BaseAddress = "285212672"
+                    CheckForOverflowUnderflow = "false"
+                    ConfigurationOverrideFile = ""
+                    DefineConstants = "TRACE"
+                    DocumentationFile = ""
+                    DebugSymbols = "false"
+                    FileAlignment = "4096"
+                    IncrementalBuild = "false"
+                    NoStdLib = "false"
+                    NoWarn = ""
+                    Optimize = "true"
+                    OutputPath = "bin\Release\"
+                    RegisterForComInterop = "false"
+                    RemoveIntegerChecks = "false"
+                    TreatWarningsAsErrors = "false"
+                    WarningLevel = "4"
+                />
+            </Settings>
+            <References>
+                <Reference
+                    Name = "System"
+                    AssemblyName = "System"
+                    HintPath = "D:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
+                />
+                <Reference
+                    Name = "System.Drawing"
+                    AssemblyName = "System.Drawing"
+                    HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
+                />
+                <Reference
+                    Name = "IBatisNet.Common"
+                    AssemblyName = "IBatisNet.Common"
+                    HintPath = "..\External-bin\IBatisNet.Common.dll"
+                />
+            </References>
+        </Build>
+        <Files>
+            <Include>
+                <File
+                    RelPath = "AssemblyInfo.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Sequence.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "ToDo.txt"
+                    BuildAction = "Content"
+                />
+                <File
+                    RelPath = "Accounts\Account.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Accounts\Address.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Accounts\Profile.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Billing\CreditCard.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Billing\LineItem.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Billing\Order.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Catalog\Category.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Catalog\Item.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Catalog\Product.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Catalog\Supplier.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Shopping\ShoppingCart.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Shopping\ShoppingCartLine.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+            </Include>
+        </Files>
+    </CSHARP>
+</VisualStudioProject>
+

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj.user
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj.user?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj.user (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/NPetshop.Domain.csproj.user Sun Jun 19 07:45:17 2005
@@ -0,0 +1,48 @@
+<VisualStudioProject>
+    <CSHARP LastOpenVersion = "7.10.3077" >
+        <Build>
+            <Settings ReferencePath = "H:\iBATIS\trunk\cs\npetshop2\External-bin\;E:\Projet\iBatis\trunk\cs\npetshop2\External-bin\" >
+                <Config
+                    Name = "Debug"
+                    EnableASPDebugging = "false"
+                    EnableASPXDebugging = "false"
+                    EnableUnmanagedDebugging = "false"
+                    EnableSQLServerDebugging = "false"
+                    RemoteDebugEnabled = "false"
+                    RemoteDebugMachine = ""
+                    StartAction = "Project"
+                    StartArguments = ""
+                    StartPage = ""
+                    StartProgram = ""
+                    StartURL = ""
+                    StartWorkingDirectory = ""
+                    StartWithIE = "false"
+                />
+                <Config
+                    Name = "Release"
+                    EnableASPDebugging = "false"
+                    EnableASPXDebugging = "false"
+                    EnableUnmanagedDebugging = "false"
+                    EnableSQLServerDebugging = "false"
+                    RemoteDebugEnabled = "false"
+                    RemoteDebugMachine = ""
+                    StartAction = "Project"
+                    StartArguments = ""
+                    StartPage = ""
+                    StartProgram = ""
+                    StartURL = ""
+                    StartWorkingDirectory = ""
+                    StartWithIE = "false"
+                />
+            </Settings>
+        </Build>
+        <OtherProjectSettings
+            CopyProjectDestinationFolder = ""
+            CopyProjectUncPath = ""
+            CopyProjectOption = "0"
+            ProjectView = "ProjectFiles"
+            ProjectTrust = "0"
+        />
+    </CSHARP>
+</VisualStudioProject>
+

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Sequence.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Sequence.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Sequence.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Sequence.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,42 @@
+using System;
+
+namespace NPetshop.Domain
+{
+
+	[Serializable]
+	public class Sequence 
+	{
+
+		#region Private Fields
+		private String _name;
+		private int _nextId;
+		#endregion
+
+		/* Constructors */
+
+		public Sequence() { }
+
+		public Sequence(String name, int nextId) 
+		{
+			this._name = name;
+			this._nextId = nextId;
+		}
+
+		#region Properties 
+
+		public string Name 
+		{
+			set{_name = value;}
+			get { return _name; }
+		}
+
+
+		public int NextId
+		{
+			set{_nextId = value;}
+			get { return _nextId; }
+		}
+		#endregion
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCart.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCart.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCart.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCart.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,127 @@
+
+using System;
+using System.Collections;
+
+using IBatisNet.Common.Pagination;
+using NPetshop.Domain.Catalog;
+
+namespace NPetshop.Domain.Shopping
+{
+
+	[Serializable]
+	public class ShoppingCart : IEnumerable	
+	{
+		#region Private Fields
+		private IPaginatedList _cartLines = new PaginatedArrayList(4);
+		#endregion
+
+		#region Properties
+
+		public IPaginatedList Lines 
+		{
+			get{ return _cartLines; }
+		}
+
+		public bool IsEmpty
+		{
+			get{ return _cartLines.Count == 0; }
+		}
+
+		public decimal Total
+		{
+			get
+			{
+				decimal total = 0;
+				IEnumerator lines = GetAllLines();
+				while (lines.MoveNext())
+				{
+					ShoppingCartLine line = (ShoppingCartLine) lines.Current;
+					total += line.Total;
+				}
+				return total;
+			}
+		}
+		#endregion
+
+		#region Pulbic methods
+		public IEnumerator GetEnumerator()
+		{
+			return _cartLines.GetEnumerator();
+		}
+
+		public IEnumerator GetAllLines() 
+		{
+			ArrayList allItems = new ArrayList();
+			int index = _cartLines.PageIndex;
+			_cartLines.GotoPage(0);
+
+			foreach(ShoppingCartLine line in _cartLines)
+			{
+				allItems.Add(line);
+			}
+			while (_cartLines.NextPage()) 
+			{
+				foreach(ShoppingCartLine line in _cartLines)
+				{
+					allItems.Add(line);
+				}
+			}
+			
+			_cartLines.GotoPage(index);
+			return allItems.GetEnumerator();
+		}
+
+		public void Add(ShoppingCartLine newLine){
+			ShoppingCartLine existingLine = FindLine(newLine);
+			if (existingLine != null) 
+			{
+				existingLine.Quantity += newLine.Quantity;
+			}
+			else 
+			{
+				_cartLines.Add(newLine);
+			}
+		}
+
+		public void Add(Item item){
+			ShoppingCartLine existingLine = FindLine(item);
+			if (existingLine != null) 
+			{
+				existingLine.Quantity += 1;
+			}
+			else 
+			{
+				_cartLines.Add(new ShoppingCartLine(item));
+			}
+		}
+		
+		public void RemoveLine(ShoppingCartLine otherLine){
+			RemoveLine(otherLine.Item);
+		}
+
+		public void RemoveLine(Item item){
+			foreach (ShoppingCartLine line in _cartLines)
+			{
+				if (line.Item.Product.Name  == item.Product.Name)
+				{
+					_cartLines.Remove(line);
+					break;
+				}
+			}
+		}
+
+		public ShoppingCartLine FindLine(ShoppingCartLine otherLine){
+			return FindLine(otherLine.Item);
+		}
+
+		public ShoppingCartLine FindLine(Item item){
+			foreach (ShoppingCartLine line in _cartLines){
+				if (line.Item.Product.Name == item.Product.Name){
+					return line;
+				}
+			}
+			return null;
+		}
+		#endregion
+	}
+}
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCartLine.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCartLine.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCartLine.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Domain/Shopping/ShoppingCartLine.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,90 @@
+
+using System;
+
+using NPetshop.Domain.Catalog;
+
+namespace NPetshop.Domain.Shopping
+{
+
+	[Serializable]
+	public class ShoppingCartLine  
+	{
+		#region Private Fields
+		private Item _item = null;
+		private bool _isInStock = false;
+		private int _quantity = -1;
+		private decimal _total = 0;
+		#endregion
+		
+		#region Constructors
+		public ShoppingCartLine(Item item)
+		{
+			this.Item = item;
+			this.Quantity = 1;
+		}
+
+		public ShoppingCartLine(Item item, int quantity)
+		{
+			this.Item = item;
+			this.Quantity = quantity;
+		}
+		#endregion
+
+		#region Properties 
+		public Item Item 
+		{
+			get { return _item; }
+			set 
+			{ 
+				_item = value; 
+				CalculateTotal();
+			}
+		}
+
+		public int Quantity
+		{
+			get { return _quantity; }
+			set 
+			{ 
+				_quantity = value;
+				CalculateTotal();
+			}
+		}
+
+		public bool IsInStock
+		{
+			get { return _isInStock; }
+			set { _isInStock = value; }
+		}
+
+		public decimal Total 
+		{
+			get { return _total; }
+		}
+
+		#endregion
+
+		#region Public methods
+		public void IncrementQuantity() 
+		{
+			_quantity++;
+			CalculateTotal();
+		}
+		#endregion
+
+		#region Private methods
+		private void CalculateTotal()
+		{
+			if (_item != null) 
+			{
+				_total = _quantity * _item.ListPrice; 
+			}
+			else 
+			{
+				_total = 0;
+			}
+		}
+		#endregion
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/AssemblyInfo.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/AssemblyInfo.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/AssemblyInfo.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/AssemblyInfo.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DBUser.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DBUser.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DBUser.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DBUser.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,16 @@
+USE [NPetshop]
+
+if not exists (select * from master.dbo.syslogins where loginname = N'NPetshop')
+BEGIN
+	declare @logindb nvarchar(132),  @loginpass nvarchar(132), @loginlang nvarchar(132) 
+	select @logindb = N'NPetshop', @loginpass=N'ibatisnet', @loginlang = N'us_english'
+	exec sp_addlogin N'NPetshop', @loginpass, @logindb, @loginlang
+END
+GO
+
+if not exists (select * from dbo.sysusers where name = N'NPetshop' and uid < 16382)
+	EXEC sp_grantdbaccess N'NPetshop', N'NPetshop'
+GO
+
+exec sp_addrolemember N'db_owner', N'NPetshop'
+GO
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DataLoad.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DataLoad.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DataLoad.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/DataLoad.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,86 @@
+
+INSERT INTO [Suppliers] VALUES (1, 'XYZ Pets', 'AC', '600 Avon Way', '', 'Los Angeles', 'CA', '94024', '212-947-0797')
+INSERT INTO [Suppliers] VALUES (2, 'ABC Pets', 'AC', '700 Abalone Way', '', 'San Francisco', 'CA', '94024', '415-947-0797')
+
+INSERT INTO [Categories] VALUES ('FISH', 'Fish', NULL)
+INSERT INTO [Categories] VALUES ('DOGS', 'Dogs', NULL)
+INSERT INTO [Categories] VALUES ('REPTILES', 'Reptiles', NULL)
+INSERT INTO [Categories] VALUES ('CATS', 'Cats', NULL)
+INSERT INTO [Categories] VALUES ('BIRDS', 'Birds', NULL)
+
+INSERT INTO [Products] VALUES ('FI-SW-01', 'FISH', 'Angelfish', 'Saltwater fish from Australia')
+INSERT INTO [Products] VALUES ('FI-SW-02', 'FISH', 'Tiger Shark', 'Saltwater fish from Australia')
+INSERT INTO [Products] VALUES ('FI-FW-01', 'FISH', 'Koi', 'Freshwater fish from Japan')
+INSERT INTO [Products] VALUES ('FI-FW-02', 'FISH', 'Goldfish', 'Freshwater fish from China')
+INSERT INTO [Products] VALUES ('K9-BD-01', 'DOGS', 'Bulldog', 'Friendly dog from England')
+INSERT INTO [Products] VALUES ('K9-PO-02', 'DOGS', 'Poodle', 'Cute dog from France')
+INSERT INTO [Products] VALUES ('K9-DL-01', 'DOGS', 'Dalmation', 'Great dog for a fire station')
+INSERT INTO [Products] VALUES ('K9-RT-01', 'DOGS', 'Golden Retriever', 'Great family dog')
+INSERT INTO [Products] VALUES ('K9-RT-02', 'DOGS', 'Labrador Retriever', 'Great hunting dog')
+INSERT INTO [Products] VALUES ('K9-CW-01', 'DOGS', 'Chihuahua', 'Great companion dog')
+INSERT INTO [Products] VALUES ('RP-SN-01', 'REPTILES', 'Rattlesnake', 'Doubles as a watch dog')
+INSERT INTO [Products] VALUES ('RP-LI-02', 'REPTILES', 'Iguana', 'Friendly green friend')
+INSERT INTO [Products] VALUES ('FL-DSH-01', 'CATS', 'Manx', 'Great for reducing mouse populations')
+INSERT INTO [Products] VALUES ('FL-DLH-02', 'CATS', 'Persian', 'Friendly house cat, doubles as a princess')
+INSERT INTO [Products] VALUES ('AV-CB-01', 'BIRDS', 'Amazon Parrot', 'Great companion for up to 75 years')
+INSERT INTO [Products] VALUES ('AV-SB-02', 'BIRDS', 'Finch', 'Great stress reliever')
+
+INSERT INTO [Items] VALUES ('EST-1', 'FI-SW-01', 16.50, 10.00, 1, 'P', 'Large', NULL, NULL, NULL, NULL,'fish1.jpg')
+INSERT INTO [Items] VALUES ('EST-2', 'FI-SW-01', 16.50, 10.00, 1, 'P', 'Small', NULL, NULL, NULL, NULL,'fish1.jpg')
+INSERT INTO [Items] VALUES ('EST-3', 'FI-SW-02', 18.50, 12.00, 1, 'P', 'Toothless', NULL, NULL, NULL, NULL,'fish2.jpg')
+INSERT INTO [Items] VALUES ('EST-4', 'FI-FW-01', 18.50, 12.00, 1, 'P', 'Spotted', NULL, NULL, NULL, NULL,'fish3.jpg')
+INSERT INTO [Items] VALUES ('EST-5', 'FI-FW-01', 18.50, 12.00, 1, 'P', 'Spotless', NULL, NULL, NULL, NULL,'fish3.jpg')
+INSERT INTO [Items] VALUES ('EST-6', 'K9-BD-01', 18.50, 12.00, 1, 'P', 'Male Adult', NULL, NULL, NULL, NULL,'dog1.jpg')
+INSERT INTO [Items] VALUES ('EST-7', 'K9-BD-01', 18.50, 12.00, 1, 'P', 'Female Puppy', NULL, NULL, NULL, NULL,'dog1.jpg')
+INSERT INTO [Items] VALUES ('EST-8', 'K9-PO-02', 18.50, 12.00, 1, 'P', 'Male Puppy', NULL, NULL, NULL, NULL,'dog2.jpg')
+INSERT INTO [Items] VALUES ('EST-9', 'K9-DL-01', 18.50, 12.00, 1, 'P', 'Spotless Male Puppy', NULL, NULL, NULL, NULL,'dog3.jpg')
+INSERT INTO [Items] VALUES ('EST-10', 'K9-DL-01', 18.50, 12.00, 1, 'P', 'Spotted Adult Female', NULL, NULL, NULL, NULL,'dog3.jpg')
+INSERT INTO [Items] VALUES ('EST-11', 'RP-SN-01', 18.50, 12.00, 1, 'P', 'Venomless', NULL, NULL, NULL, NULL,'reptile1.jpg')
+INSERT INTO [Items] VALUES ('EST-12', 'RP-SN-01', 18.50, 12.00, 1, 'P', 'Rattleless', NULL, NULL, NULL, NULL,'reptile1.jpg')
+INSERT INTO [Items] VALUES ('EST-13', 'RP-LI-02', 18.50, 12.00, 1, 'P', 'Green Adult', NULL, NULL, NULL, NULL,'reptile2.jpg')
+INSERT INTO [Items] VALUES ('EST-14', 'FL-DSH-01', 58.50, 12.00, 1, 'P', 'Tailless', NULL, NULL, NULL, NULL,'cat1.jpg')
+INSERT INTO [Items] VALUES ('EST-15', 'FL-DSH-01', 23.50, 12.00, 1, 'P', 'Tailed', NULL, NULL, NULL, NULL,'cat1.jpg')
+INSERT INTO [Items] VALUES ('EST-16', 'FL-DLH-02', 93.50, 12.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'cat2.jpg')
+INSERT INTO [Items] VALUES ('EST-17', 'FL-DLH-02', 93.50, 12.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'cat2.jpg')
+INSERT INTO [Items] VALUES ('EST-18', 'AV-CB-01', 193.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'bird1.jpg')
+INSERT INTO [Items] VALUES ('EST-19', 'AV-SB-02', 15.50, 2.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'bird2.jpg')
+INSERT INTO [Items] VALUES ('EST-20', 'FI-FW-02', 5.50, 2.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'fish4.jpg')
+INSERT INTO [Items] VALUES ('EST-21', 'FI-FW-02', 5.29, 1.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'fish4.jpg')
+INSERT INTO [Items] VALUES ('EST-22', 'K9-RT-02', 135.50, 100.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog5.jpg')
+INSERT INTO [Items] VALUES ('EST-23', 'K9-RT-02', 145.49, 100.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog5.jpg')
+INSERT INTO [Items] VALUES ('EST-24', 'K9-RT-02', 255.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog5.jpg')
+INSERT INTO [Items] VALUES ('EST-25', 'K9-RT-02', 325.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog5.jpg')
+INSERT INTO [Items] VALUES ('EST-26', 'K9-CW-01', 125.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog6.jpg')
+INSERT INTO [Items] VALUES ('EST-27', 'K9-CW-01', 155.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog6.jpg')
+INSERT INTO [Items] VALUES ('EST-28', 'K9-RT-01', 155.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog4.jpg')
+
+INSERT INTO [Inventories] VALUES ('EST-1', 10000)
+INSERT INTO [Inventories] VALUES ('EST-2', 10000)
+INSERT INTO [Inventories] VALUES ('EST-3', 10000)
+INSERT INTO [Inventories] VALUES ('EST-4', 10000)
+INSERT INTO [Inventories] VALUES ('EST-5', 10000)
+INSERT INTO [Inventories] VALUES ('EST-6', 10000)
+INSERT INTO [Inventories] VALUES ('EST-7', 10000)
+INSERT INTO [Inventories] VALUES ('EST-8', 10000)
+INSERT INTO [Inventories] VALUES ('EST-9', 10000)
+INSERT INTO [Inventories] VALUES ('EST-10', 10000)
+INSERT INTO [Inventories] VALUES ('EST-11', 10000)
+INSERT INTO [Inventories] VALUES ('EST-12', 10000)
+INSERT INTO [Inventories] VALUES ('EST-13', 10000)
+INSERT INTO [Inventories] VALUES ('EST-14', 10000)
+INSERT INTO [Inventories] VALUES ('EST-15', 10000)
+INSERT INTO [Inventories] VALUES ('EST-16', 10000)
+INSERT INTO [Inventories] VALUES ('EST-17', 10000)
+INSERT INTO [Inventories] VALUES ('EST-18', 10000)
+INSERT INTO [Inventories] VALUES ('EST-19', 10000)
+INSERT INTO [Inventories] VALUES ('EST-20', 10000)
+INSERT INTO [Inventories] VALUES ('EST-21', 10000)
+INSERT INTO [Inventories] VALUES ('EST-22', 10000)
+INSERT INTO [Inventories] VALUES ('EST-23', 10000)
+INSERT INTO [Inventories] VALUES ('EST-24', 10000)
+INSERT INTO [Inventories] VALUES ('EST-25', 10000)
+INSERT INTO [Inventories] VALUES ('EST-26', 10000)
+INSERT INTO [Inventories] VALUES ('EST-27', 10000)
+INSERT INTO [Inventories] VALUES ('EST-28', 10000)
+
+INSERT INTO [Sequences] (Sequence_Name, Sequence_NextId) VALUES ('OrderNum', 0)
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/Schema.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/Schema.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/Schema.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MSSQL/Schema.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,345 @@
+IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'NPetshop')
+	DROP DATABASE [NPetshop]
+GO
+
+CREATE DATABASE [NPetshop]  
+ COLLATE Latin1_General_CI_AS
+GO
+
+exec sp_dboption N'NPetshop', N'autoclose', N'true'
+GO
+
+exec sp_dboption N'NPetshop', N'bulkcopy', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'trunc. log', N'true'
+GO
+
+exec sp_dboption N'NPetshop', N'torn page detection', N'true'
+GO
+
+exec sp_dboption N'NPetshop', N'read only', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'dbo use', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'single', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'autoshrink', N'true'
+GO
+
+exec sp_dboption N'NPetshop', N'ANSI null default', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'recursive triggers', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'ANSI nulls', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'concat null yields null', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'cursor close on commit', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'default to local cursor', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'quoted identifier', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'ANSI warnings', N'false'
+GO
+
+exec sp_dboption N'NPetshop', N'auto create statistics', N'true'
+GO
+
+exec sp_dboption N'NPetshop', N'auto update statistics', N'true'
+GO
+
+if( ( (@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion & 0xffff >= 724) ) or ( (@@microsoftversion / power(2, 24) = 7) and (@@microsoftversion & 0xffff >= 1082) ) )
+	exec sp_dboption N'NPetshop', N'db chaining', N'false'
+GO
+
+use [NPetshop]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Products_Categories]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
+ALTER TABLE [dbo].[Products] DROP CONSTRAINT FK_Products_Categories
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Inventories_Items]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
+ALTER TABLE [dbo].[Inventories] DROP CONSTRAINT FK_Inventories_Items
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Items_Products]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
+ALTER TABLE [dbo].[Items] DROP CONSTRAINT FK_Items_Products
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Items_Suppliers]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
+ALTER TABLE [dbo].[Items] DROP CONSTRAINT FK_Items_Suppliers
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Categories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Categories]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Inventories]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Inventories]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Items]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Items]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Products]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Products]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Suppliers]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Suppliers]
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sequences]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
+drop table [dbo].[Sequences]
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Categories]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [dbo].[Categories] (
+	[Category_Id] [varchar] (10) NOT NULL ,
+	[Category_Name] [varchar] (80) NULL ,
+	[Category_Description] [varchar] (255) NULL 
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[Categories] WITH NOCHECK ADD 
+	CONSTRAINT [PK_Categories] PRIMARY KEY  CLUSTERED 
+	(
+		[Category_Id]
+	)  ON [PRIMARY] 
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Products]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [dbo].[Products] (
+	[Product_Id] [varchar] (10) NOT NULL ,
+	[Category_Id] [varchar] (10) NOT NULL ,
+	[Product_Name] [varchar] (80) NULL ,
+	[Product_Description] [varchar] (255) NULL 
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[Products] WITH NOCHECK ADD 
+	CONSTRAINT [PK_Products] PRIMARY KEY  CLUSTERED 
+	(
+		[Product_Id]
+	)  ON [PRIMARY] 
+GO
+
+ALTER TABLE [dbo].[Products] ADD 
+	CONSTRAINT [FK_Products_Categories] FOREIGN KEY 
+	(
+		[Category_Id]
+	) REFERENCES [dbo].[Categories] (
+		[Category_Id]
+	)
+GO
+
+-- --------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Suppliers]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [Suppliers] (
+	[Supplier_Id] int PRIMARY KEY,
+	[Supplier_Name] varchar(80) NULL,
+	[Supplier_Status] varchar(2) NOT NULL,
+	[Supplier_Addr1] varchar(80) NULL,
+	[Supplier_Addr2] varchar(80) NULL,
+	[Supplier_City] varchar(80) NULL,
+	[Supplier_State] varchar(80) NULL,
+	[Supplier_Zip] varchar(5) NULL,
+	[Supplier_Phone] varchar(40) NULL 
+)
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Items] 
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [Items] (
+	[Item_Id] varchar(10) PRIMARY KEY,
+	[Product_Id] varchar(10) NOT NULL REFERENCES [Products]([Product_Id]),
+	[Item_ListPrice] decimal(10, 2) NULL,
+	[Item_UnitCost] decimal(10, 2) NULL,
+	[Supplier_Id] int NULL REFERENCES [Suppliers]([Supplier_Id]),
+	[Item_Status] varchar(2) NULL,
+	[Item_Attr1] varchar(80) NULL,
+	[Item_Attr2] varchar(80) NULL,
+	[Item_Attr3] varchar(80) NULL,
+	[Item_Attr4] varchar(80) NULL,
+	[Item_Attr5] varchar(80) NULL,
+	[Item_Photo] varchar(80) NULL
+)
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Inventories] 
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [Inventories] (
+	[Item_Id] [varchar] (10) NOT NULL REFERENCES Items([Item_Id]),
+	[Inventory_Quantity] [int] NOT NULL 
+) ON [PRIMARY]
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Accounts]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [Accounts] (
+	[Account_Id] varchar(20) PRIMARY KEY,
+	[Account_Email] varchar(80) NOT NULL,
+	[Account_FirstName] varchar(80) NOT NULL,
+	[Account_LastName] varchar(80) NOT NULL,
+	[Account_Status] varchar(2) NULL,
+	[Account_Addr1] varchar(80) NOT NULL,
+	[Account_Addr2] varchar(80) NULL,
+	[Account_City] varchar(80) NOT NULL,
+	[Account_State] varchar(80) NOT NULL,
+	[Account_Zip] varchar(20) NOT NULL,
+	[Account_Country] varchar(20) NOT NULL,
+	[Account_Phone] varchar(20) NOT NULL
+)
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Profiles]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [Profiles] (
+	[Account_Id] varchar(20) PRIMARY KEY,
+	[Profile_LangPref] varchar(80) NOT NULL,
+	[Profile_FavCategory] varchar(10) NULL,
+	[Profile_MyListOpt] bit NULL,
+	[Profile_BannerOpt] bit NULL
+)
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [SignsOn]
+-- -------------------------------------------------------------------------------------------------*/
+
+CREATE TABLE [SignsOn] (
+	[Account_Id] varchar(20) PRIMARY KEY,
+	[SignOn_Password] varchar(20) NOT NULL
+)
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Orders]
+-- -------------------------------------------------------------------------------------------------*/
+CREATE TABLE [Orders] (
+	[Order_Id] [int] NOT NULL ,
+	[Account_ID] varchar(20) NOT NULL ,
+	[Order_Date] datetime NOT NULL ,
+	[Order_ShipToFirstName] varchar(80) NOT NULL ,
+	[Order_ShipToLastName] varchar(80) NOT NULL ,
+	[Order_ShipAddr1] varchar(80) NOT NULL ,
+	[Order_ShipAddr2] varchar(80) NULL ,
+	[Order_ShipCity] varchar(80) NOT NULL ,
+	[Order_ShipState] varchar(80) NOT NULL ,
+	[Order_ShipZip] varchar(20) NOT NULL ,
+	[Order_ShipCountry] varchar(20) NOT NULL ,
+	[Order_BillToFirstName] varchar(80) NOT NULL ,
+	[Order_BillToLastName] varchar(80) NOT NULL ,
+	[Order_BillAddr1] varchar(80) NOT NULL ,
+	[Order_BillAddr2] varchar(80) NULL ,
+	[Order_BillCity] varchar(80) NOT NULL ,
+	[Order_BillState] varchar(80) NOT NULL ,
+	[Order_BillZip] varchar(20) NOT NULL ,
+	[Order_BillCountry] varchar(20) NOT NULL ,
+	[Order_TotalPrice] decimal(10, 2) NOT NULL ,
+	[Order_CreditCard] varchar(20) NOT NULL ,
+	[Order_ExprDate] varchar(7) NOT NULL ,
+	[Order_CardType] varchar(40) NOT NULL 
+) ON [PRIMARY]
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [LinesItem]
+-- -------------------------------------------------------------------------------------------------
+CREATE TABLE [LinesItem] (
+	[Order_Id] int NOT NULL ,
+	[LineItem_LineNum] int NOT NULL ,
+	[Item_Id] varchar(10) NOT NULL ,
+	[LineItem_Quantity] int NOT NULL ,
+	[LineItem_UnitPrice] decimal(10, 2) NOT NULL 
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [LinesItem] WITH NOCHECK ADD 
+	CONSTRAINT [PkLineItem] PRIMARY KEY  CLUSTERED 
+	(
+		[Order_Id],
+		[LineItem_LineNum]
+	)  ON [PRIMARY] 
+GO
+
+ALTER TABLE [Orders] WITH NOCHECK ADD 
+	 PRIMARY KEY  CLUSTERED 
+	(
+		[Order_Id]
+	)  ON [PRIMARY] 
+GO
+
+ALTER TABLE [LinesItem] ADD 
+	 FOREIGN KEY 
+	(
+		[Order_Id]
+	) REFERENCES [Orders] (
+		[Order_Id]
+	),
+	CONSTRAINT [FK_LinesItem_Items] FOREIGN KEY 
+	(
+		[Item_Id]
+	) REFERENCES [Items] (
+		[Item_Id]
+	)
+GO
+
+ALTER TABLE [Orders] ADD 
+	CONSTRAINT [FK_Orders_Accounts] FOREIGN KEY 
+	(
+		[Account_ID]
+	) REFERENCES [Accounts] (
+		[Account_Id]
+	)
+GO
+
+CREATE INDEX [IxItem] ON [Items]([Product_Id], [Item_Id], [Item_ListPrice], [Item_Attr1])
+GO
+
+-- ---------------------------------------------------------------------------------------------------
+-- CREATE TABLE [Sequences]
+-- -------------------------------------------------------------------------------------------------
+CREATE TABLE [dbo].[Sequences] (
+	[Sequence_Name] [varchar] (30) NOT NULL ,
+	[Sequence_NextId] [int] NOT NULL 
+) ON [PRIMARY]
+GO
+
+ALTER TABLE [dbo].[Sequences] WITH NOCHECK ADD 
+	CONSTRAINT [PK_Sequences] PRIMARY KEY  CLUSTERED 
+	(
+		[Sequence_Name]
+	)  ON [PRIMARY] 
+GO
+
+ALTER TABLE [dbo].[Sequences] ADD 
+	CONSTRAINT [DF_Sequences_Sequence_NextId] DEFAULT (0) FOR [Sequence_NextId]
+GO

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DBUser.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DBUser.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DBUser.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DBUser.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,2 @@
+-- Create a new user, grant her rights, and set her password.
+grant select, insert, update, delete ON npetshop.* TO npetshop@'localhost' IDENTIFIED BY 'ibatis'  ;
\ No newline at end of file

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DataLoad.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DataLoad.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DataLoad.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/DataLoad.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,121 @@
+
+USE `npetshop`;
+
+#
+# Dumping data for table `accounts`
+#
+INSERT INTO `accounts` (Account_Id, Account_Email, Account_FirstName, Account_LastName, Account_Status, Account_Addr1, Account_Addr2, Account_City, Account_State, Account_Zip, Account_Country, Account_Phone) VALUES ('w', 'w', 'w', 'w', '', 'w', 'w', 'w', 'New York', 'w', 'Canada', 'w');
+
+#
+# Dumping data for table `categories`
+#
+INSERT INTO `categories` (Category_Id, Category_Name, Category_Description) VALUES ('BIRDS', 'Birds', NULL);
+INSERT INTO `categories` (Category_Id, Category_Name, Category_Description) VALUES ('CATS', 'Cats', NULL);
+INSERT INTO `categories` (Category_Id, Category_Name, Category_Description) VALUES ('DOGS', 'Dogs', NULL);
+INSERT INTO `categories` (Category_Id, Category_Name, Category_Description) VALUES ('FISH', 'Fish', NULL);
+INSERT INTO `categories` (Category_Id, Category_Name, Category_Description) VALUES ('REPTILES', 'Reptiles', NULL);
+
+#
+# Dumping data for table `inventories`
+#
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-1', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-2', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-3', 555);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-4', 9999);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-5', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-6', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-7', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-8', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-9', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-10', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-11', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-12', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-13', 9999);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-14', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-15', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-16', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-17', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-18', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-19', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-20', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-21', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-22', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-23', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-24', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-25', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-26', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-27', 10000);
+INSERT INTO `inventories` (Item_Id, Inventory_Quantity) VALUES ('EST-28', 10000);
+
+#
+# Dumping data for table `items`
+#
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-1', 'FI-SW-01', 16.50, 10.00, 1, 'P', 'Large', NULL, NULL, NULL, NULL,'fish1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-2', 'FI-SW-01', 16.50, 10.00, 1, 'P', 'Small', NULL, NULL, NULL, NULL,'fish1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-3', 'FI-SW-02', 18.50, 12.00, 1, 'P', 'Toothless', NULL, NULL, NULL, NULL,'fish2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-4', 'FI-FW-01', 18.50, 12.00, 1, 'P', 'Spotted', NULL, NULL, NULL, NULL,'fish3.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-5', 'FI-FW-01', 18.50, 12.00, 1, 'P', 'Spotless', NULL, NULL, NULL, NULL,'fish3.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-6', 'K9-BD-01', 18.50, 12.00, 1, 'P', 'Male Adult', NULL, NULL, NULL, NULL,'dog1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-7', 'K9-BD-01', 18.50, 12.00, 1, 'P', 'Female Puppy', NULL, NULL, NULL, NULL,'dog1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-8', 'K9-PO-02', 18.50, 12.00, 1, 'P', 'Male Puppy', NULL, NULL, NULL, NULL,'dog2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-9', 'K9-DL-01', 18.50, 12.00, 1, 'P', 'Spotless Male Puppy', NULL, NULL, NULL, NULL,'dog3.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-10', 'K9-DL-01', 18.50, 12.00, 1, 'P', 'Spotted Adult Female', NULL, NULL, NULL, NULL,'dog3.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-11', 'RP-SN-01', 18.50, 12.00, 1, 'P', 'Venomless', NULL, NULL, NULL, NULL,'reptile1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-12', 'RP-SN-01', 18.50, 12.00, 1, 'P', 'Rattleless', NULL, NULL, NULL, NULL,'reptile1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-13', 'RP-LI-02', 18.50, 12.00, 1, 'P', 'Green Adult', NULL, NULL, NULL, NULL,'reptile2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-14', 'FL-DSH-01', 58.50, 12.00, 1, 'P', 'Tailless', NULL, NULL, NULL, NULL,'cat1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-15', 'FL-DSH-01', 23.50, 12.00, 1, 'P', 'Tailed', NULL, NULL, NULL, NULL,'cat1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-16', 'FL-DLH-02', 93.50, 12.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'cat2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-17', 'FL-DLH-02', 93.50, 12.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'cat2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-18', 'AV-CB-01', 193.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'bird1.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-19', 'AV-SB-02', 15.50, 2.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'bird2.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-20', 'FI-FW-02', 5.50, 2.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'fish4.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-21', 'FI-FW-02', 5.29, 1.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'fish4.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-22', 'K9-RT-02', 135.50, 100.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog5.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-23', 'K9-RT-02', 145.49, 100.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog5.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-24', 'K9-RT-02', 255.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog5.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-25', 'K9-RT-02', 325.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog5.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-26', 'K9-CW-01', 125.50, 92.00, 1, 'P', 'Adult Male', NULL, NULL, NULL, NULL,'dog6.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-27', 'K9-CW-01', 155.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog6.jpg');
+INSERT INTO `items` (Item_Id, Product_Id, Item_ListPrice, Item_UnitCost, Supplier_Id, Item_Status, Item_Attr1, Item_Attr2, Item_Attr3, Item_Attr4, Item_Attr5, Item_Photo) VALUES ('EST-28', 'K9-RT-01', 155.29, 90.00, 1, 'P', 'Adult Female', NULL, NULL, NULL, NULL,'dog4.jpg');
+
+#
+# Dumping data for table `products`
+#
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('AV-CB-01', 'BIRDS', 'Amazon Parrot', 'Great companion for up to 75 years');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('AV-SB-02', 'BIRDS', 'Finch', 'Great stress reliever');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FI-FW-01', 'FISH', 'Koi', 'Freshwater fish from Japan');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FI-FW-02', 'FISH', 'Goldfish', 'Freshwater fish from China');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FI-SW-01', 'FISH', 'Angelfish', 'Saltwater fish from Australia');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FI-SW-02', 'FISH', 'Tiger Shark', 'Saltwater fish from Australia');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FL-DLH-02', 'CATS', 'Persian', 'Friendly house cat, doubles as a princess');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('FL-DSH-01', 'CATS', 'Manx', 'Great for reducing mouse populations');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-BD-01', 'DOGS', 'Bulldog', 'Friendly dog from England');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-CW-01', 'DOGS', 'Chihuahua', 'Great companion dog');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-DL-01', 'DOGS', 'Dalmation', 'Great dog for a fire station');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-PO-02', 'DOGS', 'Poodle', 'Cute dog from France');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-RT-01', 'DOGS', 'Golden Retriever', 'Great family dog');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('K9-RT-02', 'DOGS', 'Labrador Retriever', 'Great hunting dog');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('RP-LI-02', 'REPTILES', 'Iguana', 'Friendly green friend');
+INSERT INTO `products` (Product_Id, Category_Id, Product_Name, Product_Description) VALUES ('RP-SN-01', 'REPTILES', 'Rattlesnake', 'Doubles as a watch dog');
+
+#
+# Dumping data for table `profiles`
+#
+INSERT INTO `profiles` (Account_Id, Profile_LangPref, Profile_FavCategory, Profile_MyListOpt, Profile_BannerOpt) VALUES ('w', 'Japanese', 'DOGS', 1, 1);
+
+#
+# Dumping data for table `sequences`
+#
+INSERT INTO `sequences` (Sequence_Name, Sequence_NextId) VALUES ('OrderNum', 0);
+
+#
+# Dumping data for table `signson`
+#
+INSERT INTO `signson` (Account_Id, SignOn_Password) VALUES ('ibatis', 'ibatis');
+
+#
+# Dumping data for table `suppliers`
+#
+INSERT INTO `suppliers` (Supplier_Id, Supplier_Name, Supplier_Status, Supplier_Addr1, Supplier_Addr2, Supplier_City, Supplier_State, Supplier_Zip, Supplier_Phone) VALUES (1, 'XYZ Pets', 'AC', '600 Avon Way', '', 'Los Angeles', 'CA', '94024', '212-947-0797');
+INSERT INTO `suppliers` (Supplier_Id, Supplier_Name, Supplier_Status, Supplier_Addr1, Supplier_Addr2, Supplier_City, Supplier_State, Supplier_Zip, Supplier_Phone) VALUES (2, 'ABC Pets', 'AC', '700 Abalone Way', '', 'San Francisco', 'CA', '94024', '415-947-0797');

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/Schema.sql
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/Schema.sql?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/Schema.sql (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Ddl/MySql/Schema.sql Sun Jun 19 07:45:17 2005
@@ -0,0 +1,156 @@
+# MySQL dump 
+#
+# Host: localhost    Database: npetshop
+# ------------------------------------------------------
+
+#CREATE DATABASE `npetshop`;
+USE `npetshop`;
+
+#
+# Table structure for table `accounts`
+#
+CREATE TABLE `accounts` (
+  `Account_Id` varchar(20) default NULL,
+  `Account_Email` varchar(80) default NULL,
+  `Account_FirstName` varchar(80) default NULL,
+  `Account_LastName` varchar(80) default NULL,
+  `Account_Status` char(2) default NULL,
+  `Account_Addr1` varchar(80) default NULL,
+  `Account_Addr2` varchar(80) default NULL,
+  `Account_City` varchar(80) default NULL,
+  `Account_State` varchar(80) default NULL,
+  `Account_Zip` varchar(20) default NULL,
+  `Account_Country` varchar(20) default NULL,
+  `Account_Phone` varchar(20) default NULL
+) ;
+
+#
+# Table structure for table `categories`
+#
+CREATE TABLE `categories` (
+  `Category_Id` varchar(10) default NULL,
+  `Category_Name` varchar(80) default NULL,
+  `Category_Description` varchar(255) default NULL
+) ;
+
+#
+# Table structure for table `inventories`
+#
+CREATE TABLE `inventories` (
+  `Item_Id` varchar(10) default NULL,
+  `Inventory_Quantity` int default NULL
+) ;
+
+#
+# Table structure for table `items`
+#
+CREATE TABLE `items` (
+  `Item_Id` varchar(10) default NULL,
+  `Product_Id` varchar(10) default NULL,
+  `Item_ListPrice` decimal(10,2) default NULL,
+  `Item_UnitCost` decimal(10,2) default NULL,
+  `Supplier_Id` int default NULL,
+  `Item_Status` char(2) default NULL,
+  `Item_Attr1` varchar(80) default NULL,
+  `Item_Attr2` varchar(80) default NULL,
+  `Item_Attr3` varchar(80) default NULL,
+  `Item_Attr4` varchar(80) default NULL,
+  `Item_Attr5` varchar(80) default NULL,
+  `Item_Photo` varchar(80) default NULL
+) ;
+
+
+#
+# Table structure for table `linesitem`
+#
+CREATE TABLE `linesitem` (
+  `Order_Id` int default NULL,
+  `LineItem_LineNum` int default NULL,
+  `Item_Id` varchar(10) default NULL,
+  `LineItem_Quantity` int default NULL,
+  `LineItem_UnitPrice` decimal(10,2) default NULL
+) ;
+
+#
+# Table structure for table `orders`
+#
+CREATE TABLE `orders` (
+  `Order_Id` int NOT NULL default '0',
+  `Account_ID` varchar(20) default NULL,
+  `Order_Date` date default NULL,
+  `Order_ShipToFirstName` varchar(80) default NULL,
+  `Order_ShipToLastName` varchar(80) default NULL,
+  `Order_ShipAddr1` varchar(80) default NULL,
+  `Order_ShipAddr2` varchar(80) default NULL,
+  `Order_ShipCity` varchar(80) default NULL,
+  `Order_ShipState` varchar(80) default NULL,
+  `Order_ShipZip` varchar(20) default NULL,
+  `Order_ShipCountry` varchar(20) default NULL,
+  `Order_BillToFirstName` varchar(80) default NULL,
+  `Order_BillToLastName` varchar(80) default NULL,
+  `Order_BillAddr1` varchar(80) default NULL,
+  `Order_BillAddr2` varchar(80) default NULL,
+  `Order_BillCity` varchar(80) default NULL,
+  `Order_BillState` varchar(80) default NULL,
+  `Order_BillZip` varchar(20) default NULL,
+  `Order_BillCountry` varchar(20) default NULL,
+  `Order_TotalPrice` decimal(10,2) default NULL,
+  `Order_CreditCard` varchar(20) default NULL,
+  `Order_ExprDate` varchar(7) default NULL,
+  `Order_CardType` varchar(40) default NULL,
+  PRIMARY KEY  (`Order_Id`)
+) ;
+
+#
+# Table structure for table `products`
+#
+CREATE TABLE `products` (
+  `Product_Id` varchar(10) default NULL,
+  `Category_Id` varchar(10) default NULL,
+  `Product_Name` varchar(80) default NULL,
+  `Product_Description` varchar(255) default NULL
+) ;
+
+#
+# Table structure for table `profiles`
+#
+CREATE TABLE `profiles` (
+  `Account_Id` varchar(20) default NULL,
+  `Profile_LangPref` varchar(80) default NULL,
+  `Profile_FavCategory` varchar(10) default NULL,
+  `Profile_MyListOpt` bool default NULL,
+  `Profile_BannerOpt` bool default NULL
+) ;
+
+#
+# Table structure for table `sequences`
+#
+CREATE TABLE `sequences` (
+  `Sequence_Name` varchar(30) default NULL,
+  `Sequence_NextId` int default NULL
+) ;
+
+
+#
+# Table structure for table `signson`
+#
+CREATE TABLE `signson` (
+  `Account_Id` varchar(20) default NULL,
+  `SignOn_Password` varchar(20) default NULL
+) ;
+
+#
+# Table structure for table `suppliers`
+#
+CREATE TABLE `suppliers` (
+  `Supplier_Id` int default NULL,
+  `Supplier_Name` varchar(80) default NULL,
+  `Supplier_Status` char(2) default NULL,
+  `Supplier_Addr1` varchar(80) default NULL,
+  `Supplier_Addr2` varchar(80) default NULL,
+  `Supplier_City` varchar(80) default NULL,
+  `Supplier_State` varchar(80) default NULL,
+  `Supplier_Zip` varchar(5) default NULL,
+  `Supplier_Phone` varchar(40) default NULL
+) ;
+

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Accounts/IAccountDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Accounts/IAccountDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Accounts/IAccountDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Accounts/IAccountDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,24 @@
+
+using System;
+using System.Collections;
+
+using NPetshop.Domain.Accounts;
+
+namespace NPetshop.Persistence.Interfaces.Accounts
+{
+	/// <summary>
+	/// Summary description for IAccountDao.
+	/// </summary>
+	public interface IAccountDao
+	{
+		Account GetAccount(string login);
+
+		IList GetUsernameList();
+
+		Account GetAccount(string login, string password);
+
+		void InsertAccount(Account account);
+
+		void UpdateAccount(Account account);
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Billing/IOrderDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Billing/IOrderDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Billing/IOrderDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Billing/IOrderDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,22 @@
+
+using System;
+using System.Collections;
+
+using NPetshop.Domain.Catalog;
+using NPetshop.Domain.Billing;
+using IBatisNet.Common.Pagination;
+
+namespace NPetshop.Persistence.Interfaces.Billing
+{
+	/// <summary>
+	/// Summary description for IOrderDao.
+	/// </summary>
+	public interface IOrderDao
+	{
+		IPaginatedList GetOrdersByUsername(string userName);
+
+		Order GetOrder(int orderId);
+
+		void InsertOrder(Order order);
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/ICategoryDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/ICategoryDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/ICategoryDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/ICategoryDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,19 @@
+
+using System;
+using System.Collections;
+
+using NPetshop.Domain.Catalog;
+
+namespace NPetshop.Persistence.Interfaces.Catalog
+{
+	/// <summary>
+	/// Summary description for ICategoryDao.
+	/// </summary>
+	public interface ICategoryDao
+	{
+		IList GetCategoryList();
+
+		Category GetCategory(string categoryId);
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IItemDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IItemDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IItemDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IItemDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,24 @@
+
+using System;
+
+using NPetshop.Domain.Catalog;
+using NPetshop.Domain.Billing;
+using IBatisNet.Common.Pagination;
+
+namespace NPetshop.Persistence.Interfaces.Catalog
+{
+	/// <summary>
+	/// Summary description for IItemDao.
+	/// </summary>
+	public interface IItemDao
+	{
+		void UpdateQuantity(Order order);
+
+		bool IsItemInStock(string itemId);
+
+		IPaginatedList GetItemListByProduct(string productId);
+
+		Item GetItem(string itemId);
+
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IProductDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IProductDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IProductDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/Catalog/IProductDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,20 @@
+
+using System;
+
+using NPetshop.Domain.Catalog;
+using IBatisNet.Common.Pagination;
+
+namespace NPetshop.Persistence.Interfaces.Catalog
+{
+	/// <summary>
+	/// Summary description for IProductDao.
+	/// </summary>
+	public interface IProductDao
+	{
+		IPaginatedList GetProductListByCategory(string categoryId);
+
+		Product GetProduct(string productId);
+
+		IPaginatedList SearchProductList(string keywords);
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/ISequenceDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/ISequenceDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/ISequenceDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/Interfaces/ISequenceDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,14 @@
+
+using System;
+
+
+namespace NPetshop.Persistence.Interfaces
+{
+	/// <summary>
+	/// Summary description for ISequenceDao.
+	/// </summary>
+	public interface ISequenceDao
+	{
+		int GetNextId(string name);
+	}
+}

Added: ibatis/trunk/cs/npetshop2/NPetshop.Persistence/MapperDao/Accounts/AccountSqlMapDao.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/npetshop2/NPetshop.Persistence/MapperDao/Accounts/AccountSqlMapDao.cs?rev=191346&view=auto
==============================================================================
--- ibatis/trunk/cs/npetshop2/NPetshop.Persistence/MapperDao/Accounts/AccountSqlMapDao.cs (added)
+++ ibatis/trunk/cs/npetshop2/NPetshop.Persistence/MapperDao/Accounts/AccountSqlMapDao.cs Sun Jun 19 07:45:17 2005
@@ -0,0 +1,56 @@
+
+using System;
+using System.Collections;
+
+using NPetshop.Domain.Accounts;
+using NPetshop.Persistence.Interfaces.Accounts;
+using NPetshop.Persistence.MapperDao;
+
+namespace NPetshop.Persistence.MapperDao.Accounts
+{
+	/// <summary>
+	/// Summary description for AccountSqlMapDao
+	/// </summary>
+	public class AccountSqlMapDao : BaseSqlMapDao, IAccountDao
+	{
+		#region IAccountDao Members
+
+		public Account GetAccount(string login)
+		{
+			return (ExecuteQueryForObject("GetAccountByUsername", login) as Account);
+		}
+
+		public IList GetUsernameList()
+		{
+			return ExecuteQueryForList("GetUsernameList", null);
+		}
+
+		public Account GetAccount(string login, string password)
+		{
+			Account account = new Account();
+			account.Login = login;
+			account.Password = password;
+			return (ExecuteQueryForObject("GetAccountByLoginAndPassword", account) as Account);
+		}
+
+		public void InsertAccount(Account account)
+		{
+			ExecuteInsert("InsertAccount", account);
+			ExecuteInsert("InsertProfile", account);
+			ExecuteInsert("InsertSignon", account);
+		}
+
+		public void UpdateAccount(Account account)
+		{
+			ExecuteUpdate("UpdateAccount", account);
+			ExecuteUpdate("UpdateProfile", account);
+
+			if (account.Password.Length > 0) 
+			{
+				ExecuteUpdate("UpdateSignon", account);
+			}
+		}
+
+		#endregion
+	}
+}