📄 news.java
字号:
_validationErrors.addElement(obj);
}
public void setValidationErrorAt (ValidationError obj, int index)
throws IndexOutOfBoundsException {
if (obj == null) {
return;
}
_validationErrors.setElementAt(obj, index);
}
public void removeValidationError (ValidationError obj) {
if (obj == null) {
return;
}
_validationErrors.removeElement(obj);
}
public void removeValidationErrorAt (int index)
throws IndexOutOfBoundsException {
_validationErrors.removeElementAt(index);
}
protected void setValidationErrors (XmlElement xml) {
_validationErrors.removeAllElements();
xml = xml.getChildAt(0);
while (xml != null &&
ValidationError.matches(xml, this)) {
Object obj = new ValidationError(xml, this);
_validationErrors.addElement(obj);
xml = xml.next();
}
}
/**
* Get the approvedLN property.
*/
public String getApprovedLN () {
return (_approvedLN);
}
/**
* Set the approvedLN property.
*/
public void setApprovedLN (String newValue) {
_approvedLN = newValue;
}
/**
* Checks for whether ApprovedLN is set or not.
*
* @return true if ApprovedLN is set, false if not
*/
public boolean hasApprovedLN () {
return (_approvedLN != null);
}
/**
* Discards ApprovedLN's value.
*/
public void deleteApprovedLN () {
_approvedLN = null;
}
/**
* Get the activeLN property.
*/
public String getActiveLN () {
return (_activeLN);
}
/**
* Set the activeLN property.
*/
public void setActiveLN (String newValue) {
_activeLN = newValue;
}
/**
* Checks for whether ActiveLN is set or not.
*
* @return true if ActiveLN is set, false if not
*/
public boolean hasActiveLN () {
return (_activeLN != null);
}
/**
* Discards ActiveLN's value.
*/
public void deleteActiveLN () {
_activeLN = null;
}
/**
* Get the durationLN property.
*/
public String getDurationLN () {
return (_durationLN);
}
/**
* Set the durationLN property.
*/
public void setDurationLN (String newValue) {
_durationLN = newValue;
}
/**
* Checks for whether DurationLN is set or not.
*
* @return true if DurationLN is set, false if not
*/
public boolean hasDurationLN () {
return (_durationLN != null);
}
/**
* Discards DurationLN's value.
*/
public void deleteDurationLN () {
_durationLN = null;
}
/**
* Get the contentTypeLN property.
*/
public String getContentTypeLN () {
return (_contentTypeLN);
}
/**
* Set the contentTypeLN property.
*/
public void setContentTypeLN (String newValue) {
_contentTypeLN = newValue;
}
/**
* Checks for whether ContentTypeLN is set or not.
*
* @return true if ContentTypeLN is set, false if not
*/
public boolean hasContentTypeLN () {
return (_contentTypeLN != null);
}
/**
* Discards ContentTypeLN's value.
*/
public void deleteContentTypeLN () {
_contentTypeLN = null;
}
/**
* Get the newsTypeLN property.
*/
public String getNewsTypeLN () {
return (_newsTypeLN);
}
/**
* Set the newsTypeLN property.
*/
public void setNewsTypeLN (String newValue) {
_newsTypeLN = newValue;
}
/**
* Checks for whether NewsTypeLN is set or not.
*
* @return true if NewsTypeLN is set, false if not
*/
public boolean hasNewsTypeLN () {
return (_newsTypeLN != null);
}
/**
* Discards NewsTypeLN's value.
*/
public void deleteNewsTypeLN () {
_newsTypeLN = null;
}
/**
* Get the orderBy property.
*
*
*/
public String getOrderBy () {
return (_orderBy);
}
/**
* Set the orderBy property.
*
*
*/
public void setOrderBy (String newValue) {
_orderBy = newValue;
}
/**
* Checks for whether OrderBy is set or not.
*
* @return true if OrderBy is set, false if not
*/
public boolean hasOrderBy () {
return (_orderBy != null);
}
/**
* Discards OrderBy's value.
*/
public void deleteOrderBy () {
_orderBy = null;
}
/**
* Get the columnNo property.
*
*
*/
public String getColumnNo () {
return (_columnNo);
}
/**
* Set the columnNo property.
*
*
*/
public void setColumnNo (String newValue) {
_columnNo = newValue;
}
/**
* Checks for whether ColumnNo is set or not.
*
* @return true if ColumnNo is set, false if not
*/
public boolean hasColumnNo () {
return (_columnNo != null);
}
/**
* Discards ColumnNo's value.
*/
public void deleteColumnNo () {
_columnNo = null;
}
/**
* Gets the XML tag name for this object.
*/
public String getXmlTagName () {
return ($NEWS);
}
/**
* Gets the XML tag name for this class.
*/
public static String getClassXmlTagName () {
return ($NEWS);
}
/**
* Checks this object to see if it will produce valid XML.
*/
public boolean isValid () {
return (true);
}
/**
* Checks the XML to see whether it matches the
* XML contents of this class.
*/
public static boolean matches (XmlElement xml, XmlObject parent) {
if (xml == null) {
return (false);
}
return (xml.matches($NEWS, _nsm_, parent));
}
/**
* This method unmarshals an XML document instance
* into an instance of this class.
*/
public static News unmarshal (
InputStream in) throws Exception {
News obj = new News();
ObjectFactory.unmarshal(obj, in);
return (obj);
}
/**
* Populates this object with the values from the
* parsed XML.
* @deprecated will be removed in a future release.
* Use {@link #unmarshal(XmlElement)}.
*/
public void fromXml (XmlElement xml) {
unmarshal(xml);
}
/**
* Populates this object with the values from the
* parsed XML.
*
* @since 2.5
*/
public void unmarshal (XmlElement xml) {
if (xml == null) {
return;
}
if (!xml.matches($NEWS, this)) {
return;
}
Vector doc_namespaces = xml.getDeclaredNamespaces();
if (doc_namespaces != null) {
_doc_declared_namespaces_ = (Vector)doc_namespaces.clone();
}
/*
* Get the contained XmlElement, this is what we process
*/
xml = xml.getChildAt(0);
if (xml == null) {
return;
}
if (xml.matches($NEWS_ID, this)) {
setNewsID(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($ACTIVE_CD, this)) {
setActiveCD(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($APPROVED_CD, this)) {
setApprovedCD(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($APPROVED_BY, this)) {
setApprovedBy(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($DATE_APPROVED, this)) {
setDateApproved(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($DATE_SUBMITTED, this)) {
setDateSubmitted(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($DURATION_CD, this)) {
setDurationCD(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($CONTENT_TYPE_CD, this)) {
setContentTypeCD(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NEWS_CONTENT, this)) {
setNewsContent(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NEWS_HEADING, this)) {
setNewsHeading(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NEWS_TYPE_CD, this)) {
setNewsTypeCD(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NEWS_TYPE_OTHER, this)) {
setNewsTypeOther(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NOTES, this)) {
setNotes(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($USER_NAME, this)) {
setUserName(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($VALIDATION_ERRORS, this)) {
setValidationErrors(xml);
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($APPROVED_LN, this)) {
setApprovedLN(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($ACTIVE_LN, this)) {
setActiveLN(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($DURATION_LN, this)) {
setDurationLN(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($CONTENT_TYPE_LN, this)) {
setContentTypeLN(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($NEWS_TYPE_LN, this)) {
setNewsTypeLN(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($ORDER_BY, this)) {
setOrderBy(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
if (xml.matches($COLUMN_NO, this)) {
setColumnNo(xml.getData());
xml = xml.next();
if (xml == null) {
return;
}
}
}
/**
* Unmarshal any attributes.
*
* @param xml the XmlElement holding the parsed XML
* @since 2.5
*/
protected void unmarshalAttributes (XmlElement xml) {
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (OutputStream stream) {
marshal(stream);
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @param embed_files set to true to embed files in the XML
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (OutputStream stream, boolean embed_files) {
XmlOutputStream out = new FormattedOutputStream(stream);
out.setEmbedFiles(embed_files);
marshal(out);
}
/**
* Writes this instance to a stream.
*
* @param stream the OutputStream to write the XML object to
* @param embed_files set to true to embed files in the XML
* @deprecated This method will be removed in a future release.
* Use {@link #marshal(XmlOutputStream)} or {@link #marshal(OutputStream)}.
*/
public void toXml (
OutputStream stream, String indent, boolean embed_files) {
FormattedOutputStream out = new FormattedOutputStream(stream);
out.setIndentString(indent);
out.setEmbedFiles(embed_files);
marshal(out);
}
/**
* Writes this instance to a stream. If the OutputStream is not an
* instance of XmlOutputStream then a FormattedOutputStream
* will be created which wraps the OutputStream.
*
* @param stream the OutputStream to write the XML object to
* @see #marshal(XmlOutputStream)
* @since 2.5
*/
public void marshal (OutputStream stream) {
XmlOutputStream out = new FormattedOutputStream(stream);
marshal(out);
}
/**
* Writes this instance to an XmlOutputStream.
*
* @param out the XmlOutputStream to write the XML object to
* @see #marshal(OutputStream)
* @since 2.5
*/
public void marshal (XmlOutputStream out) {
out.writeStartTag(getXmlTagName(), false);
out.incrementIndent();
out.write($NEWS_ID,
_newsID);
out.write($ACTIVE_CD,
_activeCD);
out.write($APPROVED_CD,
_approvedCD);
out.write($APPROVED_BY,
_approvedBy);
out.write($DATE_APPROVED,
_dateApproved);
out.write($DATE_SUBMITTED,
_dateSubmitted);
out.write($DURATION_CD,
_durationCD);
out.write($CONTENT_TYPE_CD,
_contentTypeCD);
out.write($NEWS_CONTENT,
_newsContent);
out.write($NEWS_HEADING,
_newsHeading);
out.write($NEWS_TYPE_CD,
_newsTypeCD);
out.write($NEWS_TYPE_OTHER,
_newsTypeOther);
out.write($NOTES,
_notes);
out.write($USER_NAME,
_userName);
out.write($VALIDATION_ERRORS,
getValidationErrors());
out.write($APPROVED_LN,
_approvedLN);
out.write($ACTIVE_LN,
_activeLN);
out.write($DURATION_LN,
_durationLN);
out.write($CONTENT_TYPE_LN,
_contentTypeLN);
out.write($NEWS_TYPE_LN,
_newsTypeLN);
out.write($ORDER_BY,
_orderBy);
out.write($COLUMN_NO,
_columnNo);
out.decrementIndent();
out.writeEndTag(getXmlTagName());
}
/**
* Get the XmlAttributeList for marshalling.
*
* @param attrs the currently populated XmlAttributeList.
* @return a populated XmlAttributeList
* @since 2.5
*/
protected XmlAttributeList marshalAttributes (XmlAttributeList attrs) {
return (attrs);
}
/**
* Get this object's parent object.
*/
public XmlObject get$Parent () {
return (_parent_);
}
/**
* Set this object's parent object.
*/
public void set$Parent (XmlObject parent) {
_parent_ = parent;
}
/**
* The default <code>XmlNamespaceManager</code> for this class.
* @since 2.5
*/
protected static XmlNamespaceManager _nsm_ = null;
/**
* Get the <code>XmlNamespaceManager</code> for this class.
* This will be null if no namespaces on this class or if
* namespace support is disabled during code generation.
*
* @since 2.5
*/
public XmlNamespaceManager get$NamespaceManager () {
return (_nsm_);
}
/**
* Storage for namespaces declared in the input document.
* @since 2.5
*/
protected Vector _doc_declared_namespaces_ = null;
/**
* Get the Vector holding the namespaces declared in the element
* that this instance was unmarshalled from.
*
* @since 2.5
*/
public Vector get$DocumentNamespaces () {
return (_doc_declared_namespaces_);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -