package com.msobkow.admobile.advdb.rec;

/* *********************************************************************
 *
 *	Copyright (C) 2008 Mark Sobkow
 *
 *	All rights reserved.
 *
 *	These coded instructions and any software which contains them, or
 *	is derived from them, is provided "AS IS" and any express or implied
 *	warranties, including, but not limited to, the implied warranties of
 *	merchantability and fitness for a particular purpose are disclaimed.
 *	In no event shall Mark Sobkow be liable for any direct, indirect,
 *	incidental, special, exemplary, or consequential damages, including,
 *	but not limited to, procurement of substitute goods or services; the
 *	loss of use, data, or profits; or business interruption, however
 *	caused and on any theory of liability, whether in contract, strict
 *	liability, or tort (including negligence or otherwise) arising in
 *	any way out of the use of this software, even if advised of the
 *	possibility of such damage.
 *
 *	MARK SOBKOW MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
 *	SUITABILITY OF THIS SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
 *	BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
 *	FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. MARK SOBKOW
 *	SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A
 *	RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
 *	DERIVATIVES.
 *
 ***********************************************************************/


import java.io.Serializable;
import java.util.List;
import java.util.Calendar;

/**
 *	AdvDbActionCodeBean implements data attribute mapping for the
 *	table advdb.action_code
 *	using XDoclet2 and Hibernate 3.
 *	<p>
 *	Note that if you are setting a required attribute that is implemented
 *	by an object (e.g. String, Timestamp), the setter will throw an exception
 *	when you try to set it to a <tt>null</tt> value because the copy
 *	constructors expect a value to copy.
 *	<p>
 *	Range checking will similarly fail if you don't pass an appropriate object
 *	to the setter.
 *	<p>
 *	If it's the <i>database</i> that has bad data, the information is still set
 *	into the I/O buffer because the EJB2 I/Os directly access the attributes
 *	rather than going through the getters and setters.  Not only is this more
 *	efficient, it allows the code to bring bad data forward from the database
 *	to the application so that it can be corrected and updated.
 *
 *	@hibernate.mapping
 *		auto-import="true"
 *		default-access="field"
 *		package="com.msobkow.admobile.advdb.rec"
 *	@hibernate.class
 *		mutable="true"
 *		optimistic-lock="all"
 *		catalog="advdb"
 *		schema="advdb"
 *		table="action_code"
 *		dynamic-insert="true"
 *		dynamic-update="true"
 *		lazy="true"
 *	@hibernate.cache
 *		usage="nonstrict-read-write"
 */
public class AdvDbActionCodeBean
	implements Serializable
{

	/**
	 *	The Unique class Id for this object.
	 */
	public long			serialVersionUID = 20080401164800002L;

	/**
	 *	Id maps the database column action_code.Id.
	 *
	 *	@hibernate.composite-id
	 *		unsaved-value="none"
	 *		access="field"
	 */
	AdvDbActionCodePKeyBean pKey;

	/**
	 *	Value maps the database column action_code.Value.
	 *
	 *	@hibernate.property
	 *		optimistic-lock="true"
	 *		type="long"
	 *		name="Value"
	 *		lazy="false"
	 *		not-null="false"
	 *		access="field"
	 */
	Long	value;

	/**
	 *	ItemDescrId maps the database column action_code.item_descr_id.
	 *
	 *	@hibernate.property
	 *		optimistic-lock="true"
	 *		type="long"
	 *		name="item_descr_id"
	 *		lazy="false"
	 *		not-null="true"
	 *		access="field"
	 */
	long	itemDescrId;

	public AdvDbActionCodeBean() {
		super();
		pKey = null;
		value = null;
		itemDescrId = -1L;
	}

	public void resetAttributes() {
		pKey = null;
		value = null;
		itemDescrId = -1L;
	}

	public AdvDbActionCodePKeyBean getPKey() {
		return( pKey );
	}

	public void setId( AdvDbActionCodePKeyBean value ) {
		pKey = value;
	}

	public Long getValue() {
		return( value );
	}

	public void setValue( Long value ) {
		value = value;
	}

	public long getItemDescrId() {
		return( itemDescrId );
	}

	public void setItemDescrId( long value ) {
		itemDescrId = value;
	}
}

