com.pureinfo.srm.config.EduOfficeConfig.java Source code

Java tutorial

Introduction

Here is the source code for com.pureinfo.srm.config.EduOfficeConfig.java

Source

/**
 * PureInfo Quake
 * @(#)EduOfficeConfig.java   1.0 Oct 5, 2005
 * 
 * Copyright(c) 2004-2005, PureInfo Information Technology Corp. Ltd. 
 * All rights reserved, see the license file.
 * 
 * www.pureinfo.com.cn
 */

package com.pureinfo.srm.config;

import org.dom4j.Element;

import com.pureinfo.force.exception.PureException;
import com.pureinfo.force.xml.IXMLSupporter;

/**
 * <P>
 * Created on Oct 5, 2005 11:50:46 AM <BR>
 * Last modified on Oct 5, 2005
 * </P>
 * EduOfficeConfig: configuration for education office.
 * 
 * @author Why
 * @version 1.0, Oct 5, 2005
 * @since Quake 1.0
 */
public class EduOfficeConfig implements IXMLSupporter {

    private String m_sCode;

    private String m_sName;

    private String m_sSerialNo;

    /**
     * Constructor
     */
    public EduOfficeConfig() {
        super();
    }

    /**
     * Returns the code.
     * 
     * @return the code.
     */
    public String getCode() {
        return m_sCode;
    }

    /**
     * Sets the code.
     * 
     * @param _sCode
     *            the code to set.
     */
    public void setCode(String _sCode) {
        m_sCode = _sCode;
    }

    /**
     * Returns the name.
     * 
     * @return the name.
     */
    public String getName() {
        return m_sName;
    }

    /**
     * Sets the name.
     * 
     * @param _sName
     *            the name to set.
     */
    public void setName(String _sName) {
        m_sName = _sName;
    }

    /**
     * Returns the serialNo.
     * 
     * @return the serialNo.
     */
    public String getSerialNo() {
        return m_sSerialNo;
    }

    /**
     * Sets the serialNo.
     * 
     * @param _sSerialNo
     *            the serialNo to set.
     */
    public void setSerialNo(String _sSerialNo) {
        m_sSerialNo = _sSerialNo;
    }

    /**
     * @see com.pureinfo.force.xml.IXMLSupporter#toXMLElement(org.dom4j.Element)
     */
    public void toXMLElement(Element _element) throws PureException {
        _element.addElement("code").setText(m_sCode);
        _element.addElement("name").setText(m_sName);
        _element.addElement("serial-no").setText(m_sSerialNo);
    }

    /**
     * @see com.pureinfo.force.xml.IXMLSupporter#fromXML(org.dom4j.Element)
     */
    public void fromXML(Element _element) throws PureException {
        m_sCode = _element.elementTextTrim("code");
        m_sName = _element.elementTextTrim("name");
        m_sSerialNo = _element.elementTextTrim("serial-no");
    }

}