/*
 * Copyright (C) 2004-2006  exedio GmbH (www.exedio.com)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package com.exedio.cope.badquery;

import com.exedio.cope.ItemAttribute;


public class QueryItem extends SuperItem
{
	public static final ItemAttribute<SuperItem> item = newItemAttribute(FINAL, SuperItem.class);
	
	/**

	 **
	 * Creates a new QueryItem with all the attributes initially needed.
	 * @param code the initial value for attribute {@link #code}.
	 * @param item the initial value for attribute {@link #item}.
	 * @throws com.exedio.cope.LengthViolationException if code violates its length constraint.
	 * @throws com.exedio.cope.MandatoryViolationException if code, item is null.
	 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.
	 *       It can be customized with the tags <tt>@cope.constructor public|package|protected|private|none</tt> in the class comment and <tt>@cope.initial</tt> in the comment of attributes.
	 */
	public QueryItem(
				final java.lang.String code,
				final SuperItem item)
			throws
				com.exedio.cope.LengthViolationException,
				com.exedio.cope.MandatoryViolationException
	{
		this(new com.exedio.cope.SetValue[]{
			QueryItem.code.map(code),
			QueryItem.item.map(item),
		});
	}/**

	 **
	 * Creates a new QueryItem and sets the given attributes initially.
	 * This constructor is called by {@link com.exedio.cope.Type#newItem Type.newItem}.
	 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.
	 *       It can be customized with the tag <tt>@cope.generic.constructor public|package|protected|private|none</tt> in the class comment.
	 */
	private QueryItem(final com.exedio.cope.SetValue[] initialAttributes)
	{
		super(initialAttributes);
	}/**

	 **
	 * Reactivation constructor. Used for internal purposes only.
	 * @see com.exedio.cope.Item#Item(com.exedio.cope.util.ReactivationConstructorDummy,int)
	 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.
	 */
	private QueryItem(com.exedio.cope.util.ReactivationConstructorDummy d,final int pk)
	{
		super(d,pk);
	}/**

	 **
	 * Returns the value of the persistent attribute {@link #item}.
	 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.
	 *       It can be customized with the tag <tt>@cope.getter public|package|protected|private|none|non-final|boolean-as-is</tt> in the comment of the attribute.
	 */
	public final SuperItem getItem()
	{
		return QueryItem.item.get(this);
	}/**

	 **
	 * The persistent type information for queryItem.
	 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.
	 *       It can be customized with the tag <tt>@cope.type public|package|protected|private|none</tt> in the class comment.
	 */
	public static final com.exedio.cope.Type<QueryItem> TYPE = newType(QueryItem.class)
;}

@@ -855,20 +855,22 @@
 io.cope.
-Item
+String
 Attribut
@@ -873,17 +873,16 @@
 ibute;%0A%0A
-%0A
 public c
@@ -937,20 +937,22 @@
 c final 
-Item
+String
 Attribut
@@ -956,66 +956,44 @@
 bute
-%3CSuperItem%3E item = newItemAttribute(FINAL, SuperItem.class
+ name = new StringAttribute(OPTIONAL
 );%0A%09
@@ -1141,71 +1141,8 @@
 e%7D.%0A
-%09 * @param item the initial value for attribute %7B@link #item%7D.%0A
 %09 * 
@@ -1297,14 +1297,8 @@
 code
-, item
  is 
@@ -1673,34 +1673,8 @@
 code
-,%0A%09%09%09%09final SuperItem item
 )%0A%09%09
@@ -1850,37 +1850,8 @@
 e),%0A
-%09%09%09QueryItem.item.map(item),%0A
 %09%09%7D)
@@ -2853,20 +2853,20 @@
 %7B@link #
-item
+name
 %7D.%0A%09 * @
@@ -3167,63 +3167,569 @@
 nal 
-Sup
+java.lang.String getName()%0A%09%7B%0A%09%09return Qu
 er
+y
 Item
- getItem()%0A%09%7B%0A%09%09return QueryItem.item.g
+.name.get(this);%0A%09%7D/**%0A%0A%09 **%0A%09 * Sets a new value for the persistent attribute %7B@link #name%7D.%0A%09 * @cope.generated This feature has been generated by the cope instrumentor and will be overwritten by the build process.%0A%09 *       It can be customized with the tag %3Ctt%3E@cope.setter public%7Cpackage%7Cprotected%7Cprivate%7Cnone%7Cnon-final%3C/tt%3E in the comment of the attribute.%0A%09 */%0A%09public final void setName(final java.lang.String name)%0A%09%09%09throws%0A%09%09%09%09com.exedio.cope.LengthViolationException%0A%09%7B%0A%09%09QueryItem.name.s
 et(this
+,name
 );%0A%09

remove QueryItem#item