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

📄 spform.java

📁 STRUTS数据库项目开发宝典
💻 JAVA
字号:
package org.helpsoft.forms;

import java.util.Collection;
import java.util.ArrayList;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.helpsoft.servicelocator.*;
import org.helpsoft.session.AssociatorManageService;
import com.helpsoft.Constants;
import org.helpsoft.session.*;

/**
 * Form bean for the sp form page.
 *
 * @author  cao guangxin - www.relationinfo.com
 * @struts.form name="spForm"
 */
public final class SpForm extends ServiceForm {
   private String mode;
   private String spbm;
   private String splbbm;
   private String spmc;
   private String ysdj;
   private String jhdj;
   private String spsl;
   private String dzbl;
   private String sfcxsp;
   private SplbForm splbbmSplb;

   /**
    * Returns the value of the <code>mode</code> property.
    *
    * @return the value of the <code>mode</code> property.
    */
   public String getMode() {
      return mode;
   }

   /**
    * Sets the value of the <code>mode</code> property.
    *
    * @param mode the mode
    */
   public void setMode(String mode) {
      this.mode = mode;
   }

   /**
    * Returns the value of the <code>spbm</code> property.
    *
    * @return the value of the <code>spbm</code> property.
    */
   public String getSpbm() {
      return spbm;
   }

   /**
    * Sets the value of the <code>spbm</code> property.
    *
    * @param spbm a value for <code>spbm</code>.
    */
   public void setSpbm(String spbm) {
      this.spbm = spbm;
   }

   /**
    * Returns the value of the <code>splbbm</code> property.
    *
    * @return the value of the <code>splbbm</code> property.
    */
   public String getSplbbm() {
      return splbbm;
   }

   /**
    * Sets the value of the <code>splbbm</code> property.
    *
    * @param splbbm a value for <code>splbbm</code>.
    */
   public void setSplbbm(String splbbm) {
      this.splbbm = splbbm;
   }

   /**
    * Returns the value of the <code>spmc</code> property.
    *
    * @return the value of the <code>spmc</code> property.
    */
   public String getSpmc() {
      return spmc;
   }

   /**
    * Sets the value of the <code>spmc</code> property.
    *
    * @param spmc a value for <code>spmc</code>.
    */
   public void setSpmc(String spmc) {
      this.spmc = spmc;
   }

   /**
    * Returns the value of the <code>ysdj</code> property.
    *
    * @return the value of the <code>ysdj</code> property.
    */
   public String getYsdj() {
      return ysdj;
   }

   /**
    * Sets the value of the <code>ysdj</code> property.
    *
    * @param ysdj a value for <code>ysdj</code>.
    */
   public void setYsdj(String ysdj) {
      this.ysdj = ysdj;
   }

   /**
    * Returns the value of the <code>jhdj</code> property.
    *
    * @return the value of the <code>jhdj</code> property.
    */
   public String getJhdj() {
      return jhdj;
   }

   /**
    * Sets the value of the <code>jhdj</code> property.
    *
    * @param jhdj a value for <code>jhdj</code>.
    */
   public void setJhdj(String jhdj) {
      this.jhdj = jhdj;
   }

   /**
    * Returns the value of the <code>spsl</code> property.
    *
    * @return the value of the <code>spsl</code> property.
    */
   public String getSpsl() {
      return spsl;
   }

   /**
    * Sets the value of the <code>spsl</code> property.
    *
    * @param spsl a value for <code>spsl</code>.
    */
   public void setSpsl(String spsl) {
      this.spsl = spsl;
   }

   /**
    * Returns the value of the <code>dzbl</code> property.
    *
    * @return the value of the <code>dzbl</code> property.
    */
   public String getDzbl() {
      return dzbl;
   }

   /**
    * Sets the value of the <code>dzbl</code> property.
    *
    * @param dzbl a value for <code>dzbl</code>.
    */
   public void setDzbl(String dzbl) {
      this.dzbl = dzbl;
   }

   /**
    * Returns the value of the <code>sfcxsp</code> property.
    *
    * @return the value of the <code>sfcxsp</code> property.
    */
   public String getSfcxsp() {
      return sfcxsp;
   }

   /**
    * Sets the value of the <code>sfcxsp</code> property.
    *
    * @param sfcxsp a value for <code>sfcxsp</code>.
    */
   public void setSfcxsp(String sfcxsp) {
      this.sfcxsp = sfcxsp;
   }

   /**
    * Returns the value of the <code>splbbmSplb</code> relation property.
    *
    * @return the value of the <code>splbbmSplb</code> relation property.
    */
   public SplbForm getSplbbmSplb() {
      if (splbbmSplb == null) {
         splbbmSplb = new SplbForm();
      }
      return splbbmSplb;
   }

   /**
    * Sets the value of the <code>splbbmSplb</code> relation property.
    *
    * @param splb a value for <code>splbbmSplb</code>.
    */
   public void setSplbbmSplb(SplbForm splb) {
      this.splbbmSplb = splb;
   }


   /**
    * Obtains the total number of sp objects.
    *
    * @throws Exception exception
    * @return an integer value.
    */
   public int getListSize() throws Exception {
      return getAssociatorManageService().getSpListSize();
   }

   /**
    * Obtains a collection of all sp objects.
    *
    * @throws Exception exception
    * @return a collection of SpData objects.
    */
   public Collection getList() throws Exception {
      Collection result = getAssociatorManageService().getSpList();
      if (result.size() > 0) {
        return result;
      } else {
        return new ArrayList();
      }

   }

   /**
    * Performs server-side validation on the properties that have been set from this HTTP request,
    * and returns an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, returns
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    * <p>
    * <b>NOTE:</b> Please override this method and not the ValidatorForm 'validate'
    * method - any errors thrown in an overwritten 'validate' method will not be handled
    * by the GenericExceptionHandling framework.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    * @return a list with errors or <code>null</code> iIf no errors are found
    * @throws Exception - all exceptions are handled by the GenericExceptions framework
    * (no stack trace dumps shown to the user!)
    */
   public ActionErrors doValidate(ActionMapping mapping, HttpServletRequest request) throws Exception {
      boolean noValidate = (request.getParameter(Constants.SUBMIT_NO_VALIDATION) != null);
      return noValidate ? null : super.doValidate(mapping, request);
   }

   /**
    * Returns the string representation of the form.
    *
    * @return the string representation of the form
    */
   public String toString() {
      StringBuffer sb = new StringBuffer();
      sb.append("\nspbm : ").append(spbm);
      sb.append("\nspmc : ").append(spmc);
      sb.append("\nysdj : ").append(ysdj);
      sb.append("\njhdj : ").append(jhdj);
      sb.append("\nspsl : ").append(spsl);
      sb.append("\ndzbl : ").append(dzbl);
      sb.append("\nsfcxsp : ").append(sfcxsp);
      sb.append("\nsplbbmSplb : ").append(splbbmSplb);
      return sb.toString();
   }
}

⌨️ 快捷键说明

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