⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 news.java

📁 这个例子举例说明了一个简单的新闻 Portal。新闻内容是从数据源(这里称为 DataSource )传送到 JSP 页
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * DO NOT EDIT!
 *
 * This file was generated by the Breeze XML Studio code generator.
 *
 *        Project: DDJ
 *     Class Name: News
 *           Date: Mon Oct 28 15:40:42 BST 2002
 * Breeze Version: 3.0.0 build 345
 *
 * IMPORTANT: Please see your Breeze license for more information on
 *            where and how this generated code may be used.
 *
 */

package com.ddj.wsstruts.valueobject;


import com.tbf.xml.*;
import com.tbf.util.*;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Vector;

/**
 * News class.
 *
 */
public class News
	implements com.tbf.xml.XmlObject,
	java.io.Serializable {

	/**
	 * Constant for "newsTypeOther" node name.
	 */
	public static final String $NEWS_TYPE_OTHER = "newsTypeOther";

	/**
	 * Constant for "activeLN" node name.
	 */
	public static final String $ACTIVE_LN = "activeLN";

	/**
	 * Constant for "approvedBy" node name.
	 */
	public static final String $APPROVED_BY = "approvedBy";

	/**
	 * Constant for "newsContent" node name.
	 */
	public static final String $NEWS_CONTENT = "newsContent";

	/**
	 * Constant for "dateApproved" node name.
	 */
	public static final String $DATE_APPROVED = "dateApproved";

	/**
	 * Constant for "activeCD" node name.
	 */
	public static final String $ACTIVE_CD = "activeCD";

	/**
	 * Constant for "userName" node name.
	 */
	public static final String $USER_NAME = "userName";

	/**
	 * Constant for "columnNo" node name.
	 */
	public static final String $COLUMN_NO = "columnNo";

	/**
	 * Constant for "durationLN" node name.
	 */
	public static final String $DURATION_LN = "durationLN";

	/**
	 * Constant for "notes" node name.
	 */
	public static final String $NOTES = "notes";

	/**
	 * Constant for "orderBy" node name.
	 */
	public static final String $ORDER_BY = "orderBy";

	/**
	 * Constant for "newsID" node name.
	 */
	public static final String $NEWS_ID = "newsID";

	/**
	 * Constant for "News" node name.
	 */
	public static final String $NEWS = "News";

	/**
	 * Constant for "approvedLN" node name.
	 */
	public static final String $APPROVED_LN = "approvedLN";

	/**
	 * Constant for "durationCD" node name.
	 */
	public static final String $DURATION_CD = "durationCD";

	/**
	 * Constant for "newsTypeLN" node name.
	 */
	public static final String $NEWS_TYPE_LN = "newsTypeLN";

	/**
	 * Constant for "validationErrors" node name.
	 */
	public static final String $VALIDATION_ERRORS = "validationErrors";

	/**
	 * Constant for "approvedCD" node name.
	 */
	public static final String $APPROVED_CD = "approvedCD";

	/**
	 * Constant for "contentTypeLN" node name.
	 */
	public static final String $CONTENT_TYPE_LN = "contentTypeLN";

	/**
	 * Constant for "newsTypeCD" node name.
	 */
	public static final String $NEWS_TYPE_CD = "newsTypeCD";

	/**
	 * Constant for "newsHeading" node name.
	 */
	public static final String $NEWS_HEADING = "newsHeading";

	/**
	 * Constant for "dateSubmitted" node name.
	 */
	public static final String $DATE_SUBMITTED = "dateSubmitted";

	/**
	 * Constant for "contentTypeCD" node name.
	 */
	public static final String $CONTENT_TYPE_CD = "contentTypeCD";


	/**
	 * Declarations for the XML related fields.
	 */
	protected String _newsID = null;
	protected String _activeCD = null;
	protected String _approvedCD = null;
	protected String _approvedBy = null;
	protected String _dateApproved = null;
	protected String _dateSubmitted = null;
	protected String _durationCD = null;
	protected String _contentTypeCD = null;
	protected String _newsContent = null;
	protected String _newsHeading = null;
	protected String _newsTypeCD = null;
	protected String _newsTypeOther = null;
	protected String _notes = null;
	protected String _userName = null;
	protected java.util.Vector _validationErrors = new java.util.Vector(4, 0);
	protected String _approvedLN = null;
	protected String _activeLN = null;
	protected String _durationLN = null;
	protected String _contentTypeLN = null;
	protected String _newsTypeLN = null;
	protected String _orderBy = null;
	protected String _columnNo = null;


	/**
	 * Holds the parent object of this object.
	 */
	XmlObject _parent_ = null;


	/**
	 * Default no args constructor.
	 */
	public News () {
	}


	/**
	 * Creates and populates an instance from the provided parse tree.
	 *
	 * @param  xml  the parse tree
	 */
	public News (XmlElement xml) {
		unmarshal(xml);
	}


	/**
	 * Creates and populates an instance from the provided parse tree.
	 *
	 * @param  xml  the parse tree
	 * @param  parent  the containibg XmlObject
	 */
	public News (XmlElement xml, XmlObject parent) {
		_parent_ = parent;
		unmarshal(xml);
	}


	/**
	 * Get the newsID property.
	 */
	public String getNewsID () {
		return (_newsID);
	}


	/**
	 * Set the newsID property.
	 */
	public void setNewsID (String newValue) {
		_newsID = newValue;
	}


	/**
	 * Checks for whether NewsID is set or not.
	 *
	 * @return true if NewsID is set, false if not
	 */
	 public boolean hasNewsID () {
		return (_newsID != null);
	}


	/**
	 * Discards NewsID's value.
	 */
	 public void deleteNewsID () {
		_newsID = null;
	}


	/**
	 * Get the activeCD property.
	 *
	 * 
	 */
	public String getActiveCD () {
		return (_activeCD);
	}


	/**
	 * Set the activeCD property.
	 *
	 * 
	 */
	public void setActiveCD (String newValue) {
		_activeCD = newValue;
	}


	/**
	 * Checks for whether ActiveCD is set or not.
	 *
	 * @return true if ActiveCD is set, false if not
	 */
	 public boolean hasActiveCD () {
		return (_activeCD != null);
	}


	/**
	 * Discards ActiveCD's value.
	 */
	 public void deleteActiveCD () {
		_activeCD = null;
	}


	/**
	 * Get the approvedCD property.
	 *
	 * 
	 */
	public String getApprovedCD () {
		return (_approvedCD);
	}


	/**
	 * Set the approvedCD property.
	 *
	 * 
	 */
	public void setApprovedCD (String newValue) {
		_approvedCD = newValue;
	}


	/**
	 * Checks for whether ApprovedCD is set or not.
	 *
	 * @return true if ApprovedCD is set, false if not
	 */
	 public boolean hasApprovedCD () {
		return (_approvedCD != null);
	}


	/**
	 * Discards ApprovedCD's value.
	 */
	 public void deleteApprovedCD () {
		_approvedCD = null;
	}


	/**
	 * Get the approvedBy property.
	 *
	 * 
	 */
	public String getApprovedBy () {
		return (_approvedBy);
	}


	/**
	 * Set the approvedBy property.
	 *
	 * 
	 */
	public void setApprovedBy (String newValue) {
		_approvedBy = newValue;
	}


	/**
	 * Checks for whether ApprovedBy is set or not.
	 *
	 * @return true if ApprovedBy is set, false if not
	 */
	 public boolean hasApprovedBy () {
		return (_approvedBy != null);
	}


	/**
	 * Discards ApprovedBy's value.
	 */
	 public void deleteApprovedBy () {
		_approvedBy = null;
	}


	/**
	 * Get the dateApproved property.
	 */
	public String getDateApproved () {
		return (_dateApproved);
	}


	/**
	 * Set the dateApproved property.
	 */
	public void setDateApproved (String newValue) {
		_dateApproved = newValue;
	}


	/**
	 * Checks for whether DateApproved is set or not.
	 *
	 * @return true if DateApproved is set, false if not
	 */
	 public boolean hasDateApproved () {
		return (_dateApproved != null);
	}


	/**
	 * Discards DateApproved's value.
	 */
	 public void deleteDateApproved () {
		_dateApproved = null;
	}


	/**
	 * Get the dateSubmitted property.
	 */
	public String getDateSubmitted () {
		return (_dateSubmitted);
	}


	/**
	 * Set the dateSubmitted property.
	 */
	public void setDateSubmitted (String newValue) {
		_dateSubmitted = newValue;
	}


	/**
	 * Checks for whether DateSubmitted is set or not.
	 *
	 * @return true if DateSubmitted is set, false if not
	 */
	 public boolean hasDateSubmitted () {
		return (_dateSubmitted != null);
	}


	/**
	 * Discards DateSubmitted's value.
	 */
	 public void deleteDateSubmitted () {
		_dateSubmitted = null;
	}


	/**
	 * Get the durationCD property.
	 *
	 * 
	 */
	public String getDurationCD () {
		return (_durationCD);
	}


	/**
	 * Set the durationCD property.
	 *
	 * 
	 */
	public void setDurationCD (String newValue) {
		_durationCD = newValue;
	}


	/**
	 * Checks for whether DurationCD is set or not.
	 *
	 * @return true if DurationCD is set, false if not
	 */
	 public boolean hasDurationCD () {
		return (_durationCD != null);
	}


	/**
	 * Discards DurationCD's value.
	 */
	 public void deleteDurationCD () {
		_durationCD = null;
	}


	/**
	 * Get the contentTypeCD property.
	 *
	 * 
	 */
	public String getContentTypeCD () {
		return (_contentTypeCD);
	}


	/**
	 * Set the contentTypeCD property.
	 *
	 * 
	 */
	public void setContentTypeCD (String newValue) {
		_contentTypeCD = newValue;
	}


	/**
	 * Checks for whether ContentTypeCD is set or not.
	 *
	 * @return true if ContentTypeCD is set, false if not
	 */
	 public boolean hasContentTypeCD () {
		return (_contentTypeCD != null);
	}


	/**
	 * Discards ContentTypeCD's value.
	 */
	 public void deleteContentTypeCD () {
		_contentTypeCD = null;
	}


	/**
	 * Get the newsContent property.
	 */
	public String getNewsContent () {
		return (_newsContent);
	}


	/**
	 * Set the newsContent property.
	 */
	public void setNewsContent (String newValue) {
		_newsContent = newValue;
	}


	/**
	 * Checks for whether NewsContent is set or not.
	 *
	 * @return true if NewsContent is set, false if not
	 */
	 public boolean hasNewsContent () {
		return (_newsContent != null);
	}


	/**
	 * Discards NewsContent's value.
	 */
	 public void deleteNewsContent () {
		_newsContent = null;
	}


	/**
	 * Get the newsHeading property.
	 */
	public String getNewsHeading () {
		return (_newsHeading);
	}


	/**
	 * Set the newsHeading property.
	 */
	public void setNewsHeading (String newValue) {
		_newsHeading = newValue;
	}


	/**
	 * Checks for whether NewsHeading is set or not.
	 *
	 * @return true if NewsHeading is set, false if not
	 */
	 public boolean hasNewsHeading () {
		return (_newsHeading != null);
	}


	/**
	 * Discards NewsHeading's value.
	 */
	 public void deleteNewsHeading () {
		_newsHeading = null;
	}


	/**
	 * Get the newsTypeCD property.
	 *
	 * 
	 */
	public String getNewsTypeCD () {
		return (_newsTypeCD);
	}


	/**
	 * Set the newsTypeCD property.
	 *
	 * 
	 */
	public void setNewsTypeCD (String newValue) {
		_newsTypeCD = newValue;
	}


	/**
	 * Checks for whether NewsTypeCD is set or not.
	 *
	 * @return true if NewsTypeCD is set, false if not
	 */
	 public boolean hasNewsTypeCD () {
		return (_newsTypeCD != null);
	}


	/**
	 * Discards NewsTypeCD's value.
	 */
	 public void deleteNewsTypeCD () {
		_newsTypeCD = null;
	}


	/**
	 * Get the newsTypeOther property.
	 */
	public String getNewsTypeOther () {
		return (_newsTypeOther);
	}


	/**
	 * Set the newsTypeOther property.
	 */
	public void setNewsTypeOther (String newValue) {
		_newsTypeOther = newValue;
	}


	/**
	 * Checks for whether NewsTypeOther is set or not.
	 *
	 * @return true if NewsTypeOther is set, false if not
	 */
	 public boolean hasNewsTypeOther () {
		return (_newsTypeOther != null);
	}


	/**
	 * Discards NewsTypeOther's value.
	 */
	 public void deleteNewsTypeOther () {
		_newsTypeOther = null;
	}


	/**
	 * Get the notes property.
	 */
	public String getNotes () {
		return (_notes);
	}


	/**
	 * Set the notes property.
	 */
	public void setNotes (String newValue) {
		_notes = newValue;
	}


	/**
	 * Checks for whether Notes is set or not.
	 *
	 * @return true if Notes is set, false if not
	 */
	 public boolean hasNotes () {
		return (_notes != null);
	}


	/**
	 * Discards Notes's value.
	 */
	 public void deleteNotes () {
		_notes = null;
	}


	/**
	 * Get the userName property.
	 *
	 * 
	 */
	public String getUserName () {
		return (_userName);
	}


	/**
	 * Set the userName property.
	 *
	 * 
	 */
	public void setUserName (String newValue) {
		_userName = newValue;
	}


	/**
	 * Checks for whether UserName is set or not.
	 *
	 * @return true if UserName is set, false if not
	 */
	 public boolean hasUserName () {
		return (_userName != null);
	}


	/**
	 * Discards UserName's value.
	 */
	 public void deleteUserName () {
		_userName = null;
	}


	/**
	 * Get the validationErrors property.
	 *
	 * 
	 */
	public java.util.Vector getValidationErrors () {
		return (_validationErrors);
	}


	public ValidationError getValidationErrorAt (int index)
			throws IndexOutOfBoundsException {
		return ((ValidationError)_validationErrors.elementAt(index));
	}


	/**
	 * Get the count of elements in the ValidationErrors property.
	 */
	public int getValidationErrorCount () {
		if (_validationErrors == null) {
			return (0);
		}

		return (_validationErrors.size());
	}


	/**
	 * Set the validationErrors property.
	 *
	 * 
	 */
	public void setValidationErrors (java.util.Vector newList) {

		if (newList == null) {
			_validationErrors.removeAllElements();
		} else {
			_validationErrors = (java.util.Vector)newList.clone();
		}
	}


	public void addValidationError (ValidationError obj) {
		if (obj == null) {
			return;
		}

⌨️ 快捷键说明

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