<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FEJB3%2FShopping_cart</id>
		<title>Java/EJB3/Shopping cart - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FEJB3%2FShopping_cart"/>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/EJB3/Shopping_cart&amp;action=history"/>
		<updated>2026-04-06T20:53:25Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/EJB3/Shopping_cart&amp;diff=7749&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/EJB3/Shopping_cart&amp;diff=7749&amp;oldid=prev"/>
				<updated>2010-06-01T06:50:20Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:50, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/EJB3/Shopping_cart&amp;diff=7748&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/EJB3/Shopping_cart&amp;diff=7748&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:45Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== EJB Tutorial from JBoss: simple shopping cart ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
File: Order.java&lt;br /&gt;
/*&lt;br /&gt;
 * JBoss, Home of Professional Open Source.&lt;br /&gt;
 * Copyright 2006, Red Hat Middleware LLC, and individual contributors&lt;br /&gt;
 * as indicated by the @author tags. See the copyright.txt file in the&lt;br /&gt;
 * distribution for a full listing of individual contributors.&lt;br /&gt;
 *&lt;br /&gt;
 * This is free software; you can redistribute it and/or modify it&lt;br /&gt;
 * under the terms of the GNU Lesser General Public License as&lt;br /&gt;
 * published by the Free Software Foundation; either version 2.1 of&lt;br /&gt;
 * the License, or (at your option) any later version.&lt;br /&gt;
 *&lt;br /&gt;
 * This software is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&lt;br /&gt;
 * Lesser General Public License for more details.&lt;br /&gt;
 *&lt;br /&gt;
 * You should have received a copy of the GNU Lesser General Public&lt;br /&gt;
 * License along with this software; if not, write to the Free&lt;br /&gt;
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA&lt;br /&gt;
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.&lt;br /&gt;
 */&lt;br /&gt;
package org.jboss.tutorial.entity.bean;&lt;br /&gt;
import javax.persistence.CascadeType;&lt;br /&gt;
import javax.persistence.Entity;&lt;br /&gt;
import javax.persistence.FetchType;&lt;br /&gt;
import javax.persistence.GeneratedValue; import javax.persistence.GenerationType;&lt;br /&gt;
import javax.persistence.Id;&lt;br /&gt;
import javax.persistence.OneToMany;&lt;br /&gt;
import javax.persistence.Table;&lt;br /&gt;
import javax.persistence.Id;&lt;br /&gt;
import javax.persistence.CascadeType;&lt;br /&gt;
import javax.persistence.FetchType;&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.Collection;&lt;br /&gt;
@Entity&lt;br /&gt;
@Table(name = &amp;quot;PURCHASE_ORDER&amp;quot;)&lt;br /&gt;
public class Order implements java.io.Serializable&lt;br /&gt;
{&lt;br /&gt;
   private int id;&lt;br /&gt;
   private double total;&lt;br /&gt;
   private Collection&amp;lt;LineItem&amp;gt; lineItems;&lt;br /&gt;
   @Id @GeneratedValue(strategy=GenerationType.AUTO)&lt;br /&gt;
   public int getId()&lt;br /&gt;
   {&lt;br /&gt;
      return id;&lt;br /&gt;
   }&lt;br /&gt;
   public void setId(int id)&lt;br /&gt;
   {&lt;br /&gt;
      this.id = id;&lt;br /&gt;
   }&lt;br /&gt;
   public double getTotal()&lt;br /&gt;
   {&lt;br /&gt;
      return total;&lt;br /&gt;
   }&lt;br /&gt;
   public void setTotal(double total)&lt;br /&gt;
   {&lt;br /&gt;
      this.total = total;&lt;br /&gt;
   }&lt;br /&gt;
   public void addPurchase(String product, int quantity, double price)&lt;br /&gt;
   {&lt;br /&gt;
      if (lineItems == null) lineItems = new ArrayList&amp;lt;LineItem&amp;gt;();&lt;br /&gt;
      LineItem item = new LineItem();&lt;br /&gt;
      item.setOrder(this);&lt;br /&gt;
      item.setProduct(product);&lt;br /&gt;
      item.setQuantity(quantity);&lt;br /&gt;
      item.setSubtotal(quantity * price);&lt;br /&gt;
      lineItems.add(item);&lt;br /&gt;
      total += quantity * price;&lt;br /&gt;
   }&lt;br /&gt;
   @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy=&amp;quot;order&amp;quot;)&lt;br /&gt;
   public Collection&amp;lt;LineItem&amp;gt; getLineItems()&lt;br /&gt;
   {&lt;br /&gt;
      return lineItems;&lt;br /&gt;
   }&lt;br /&gt;
   public void setLineItems(Collection&amp;lt;LineItem&amp;gt; lineItems)&lt;br /&gt;
   {&lt;br /&gt;
      this.lineItems = lineItems;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
File: ShoppingCart.java&lt;br /&gt;
/*&lt;br /&gt;
 * JBoss, Home of Professional Open Source.&lt;br /&gt;
 * Copyright 2006, Red Hat Middleware LLC, and individual contributors&lt;br /&gt;
 * as indicated by the @author tags. See the copyright.txt file in the&lt;br /&gt;
 * distribution for a full listing of individual contributors.&lt;br /&gt;
 *&lt;br /&gt;
 * This is free software; you can redistribute it and/or modify it&lt;br /&gt;
 * under the terms of the GNU Lesser General Public License as&lt;br /&gt;
 * published by the Free Software Foundation; either version 2.1 of&lt;br /&gt;
 * the License, or (at your option) any later version.&lt;br /&gt;
 *&lt;br /&gt;
 * This software is distributed in the hope that it will be useful,&lt;br /&gt;
 * but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&lt;br /&gt;
 * Lesser General Public License for more details.&lt;br /&gt;
 *&lt;br /&gt;
 * You should have received a copy of the GNU Lesser General Public&lt;br /&gt;
 * License along with this software; if not, write to the Free&lt;br /&gt;
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA&lt;br /&gt;
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.&lt;br /&gt;
 */&lt;br /&gt;
package org.jboss.tutorial.entity.bean;&lt;br /&gt;
import javax.ejb.Remove;&lt;br /&gt;
/**&lt;br /&gt;
 * Comment&lt;br /&gt;
 *&lt;br /&gt;
 * @author&lt;/div&gt;</summary>
			</entry>

	</feed>