验证数据

@param pData

@throws APPErrorException
763318
protected void valid(Object pData) throws APPErrorException {
        if(pData instanceof TemplateModel){
            TemplateModel entity = (TemplateModel) pData;
            if (StringUtil.isNullOrEmpty(entity.getId())) {
                throw new APPErrorException("无效的主键");
            }
            if (null == entity.getRev()) {
                throw new APPErrorException("无效的REV");
            }
        }else if(pData instanceof CommonModel)
        {
            CommonModel entity = (CommonModel) pData;
            if (StringUtil.isNullOrEmpty(entity.getId())) {
                throw new APPErrorException("无效的主键");
            }
        }

    }
1180274
public void addError(AbstractPageError ape) {
        if (_innerErrors == null) {
            _innerErrors = new InnerErrorReporter();
        }
        _innerErrors.addError(ape);
    }
140090
@Override
    @Transactional(rollbackFor = Exception.class)
    public void updateAll(List pDatas) throws APPErrorException {
        for (int i = 0; i < pDatas.size(); i++) {
            update(pDatas.get(i));
        }
    }
351419
public void setTempData(Object tempData) {
		if(tempDataLock){
			System.out.println("警告：临时数据已被占用");
		}
		this.tempData = tempData;
		tempDataLock = true;
	}
797457
synchronized void connectionError(
            final SibRaMessagingEngineConnection connection,
            final SIException exception) {

        final String methodName = "connectionError";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, new Object[] { connection,
                    exception });
        }

        if (_remoteMessagingEngine) {

            if (connection.equals(_remoteConnection)) {

                /*
                 * We have lost our remote connection, output a warning to the
                 * admin console, close the connection and schedule an attempt
                 * to create a new one
                 */

                SibTr.warning(TRACE, "CONNECTION_ERROR_CWSIV0776",
                        new Object[] { connection.getConnection().getMeName(),
                                _endpointConfiguration.getBusName(), this,
                                exception });

                _remoteConnection.close();
                _remoteConnection = null;

                scheduleCreateRemoteListener();

            } else {

                /*
                 * We have already closed the remote connection
                 */
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE, "Connection " + connection
                            + " not equal to current remote connection "
                            + _remoteConnection);
                }

            }

        } else {

            /*
             * Output a message to the admin console and deactivate the endpoint
             */

            SibTr.error(TRACE, "CONNECTION_ERROR_CWSIV0767", new Object[] {
                    exception, connection.getConnection().getMeName(), this });
            deactivate();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }
    }
137525
public static void validBigTextLength(String pContent) throws APPErrorException {
        if(!StringUtil.isNullOrEmpty(pContent)&&pContent.length()>10000)
        {
            throw new APPErrorException("内容长度超过10000，请调整；");
        }
    }
893621
@Override
    void connectionError(SibRaMessagingEngineConnection connection, SIException exception)
    {
        String methodName = "connectionError";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, new Object[] { connection, exception });
        }

        /*
         * We have lost our remote connection, output a warning to the
         * admin console, close the connection and schedule an attempt
         * to create a new one
         */

        SibTr.warning(TRACE, "CONNECTION_ERROR_CWSIV0776",
                      new Object[] { connection.getConnection().getMeName(),
                                    _endpointConfiguration.getBusName(), this,
                                    exception });

        dropConnection(connection, false, true, true);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName);
        }
    }
344347
public void error(Throwable error, Map<String, Object> custom) {
    error(error, custom, null);
  }
453231
protected final <V> void error(Throwable t, SettableFuture<V> future) {
    state.set(State.ERROR);
    if (future != null) {
      future.setException(t);
    }
    caller.error(t);
  }
528669
@Override
  public final String toDateTimeString(final Date pDate,
    final Map<String, Object> pAddParam) throws Exception {
    return this.dateTimeFormat.format(pDate);
  }
652372
protected void sendError( String errText, HttpServletRequest request, HttpServletResponse response )
        throws IOException
    {
        InternalUtils.sendError( "PageFlow_Custom_Error", null, request, response,
                                 new Object[]{ getDisplayName(), errText } );
    }
1299099
public void doTag()
            throws JspException
    {
        // report error if there are any
        if (hasErrors()) {
            reportErrors();
            return;
        }

        PageContext pageContext = getPageContext();
        ServletContainerAdapter sa = AdapterManager.getServletContainerAdapter(pageContext.getServletContext());
        ServletRequest request = pageContext.getRequest();
        assert(sa != null);

        // check to see if we are supposed to report the error
        boolean prodMode = sa.isInProductionMode();
        if (prodMode && !_alwaysReport)
            return;

        LinkedHashMap map = (LinkedHashMap)
                InternalUtils.getBindingUpdateErrors(request);

        if (map == null)
            return;

        if (_expression != null) {
            String expr = "{" + _expression + "}";
            BindingUpdateError err = (BindingUpdateError) map.get(expr);
            if (err != null) {
                Throwable cause = err.getCause();
                String msg = (cause != null) ? cause.getMessage() : err.getMessage();
                String s = Bundle.getString("Tags_BindingUpdateError", new Object[]{_expression, msg});
                registerTagError(s, null);
                reportErrors();
            }
            return;
        }

        Iterator it = map.values().iterator();
        while (it.hasNext()) {
            BindingUpdateError err = (BindingUpdateError) it.next();
            Throwable cause = err.getCause();
            String msg = (cause != null) ? cause.getMessage() : err.getMessage();
            String s = Bundle.getString("Tags_BindingUpdateError", new Object[]{err.getExpression(), msg});
            registerTagError(s, null);
        }
        reportErrors();
    }
196264
final public void MapData() throws ParseException {
                          /*@bgen(jjtree) MapData */
  AstMapData jjtn000 = new AstMapData(JJTMAPDATA);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      jj_consume_token(START_SET_OR_MAP);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case START_SET_OR_MAP:
      case INTEGER_LITERAL:
      case FLOATING_POINT_LITERAL:
      case STRING_LITERAL:
      case TRUE:
      case FALSE:
      case NULL:
      case LPAREN:
      case LBRACK:
      case NOT0:
      case NOT1:
      case EMPTY:
      case MINUS:
      case IDENTIFIER:
        MapEntry();
        label_18:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case COMMA:
            ;
            break;
          default:
            jj_la1[46] = jj_gen;
            break label_18;
          }
          jj_consume_token(COMMA);
          MapEntry();
        }
        break;
      default:
        jj_la1[47] = jj_gen;
        ;
      }
      jj_consume_token(RBRACE);
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
        jjtree.popNode();
      }
      if (jjte000 instanceof RuntimeException) {
        {if (true) throw (RuntimeException)jjte000;}
      }
      if (jjte000 instanceof ParseException) {
        {if (true) throw (ParseException)jjte000;}
      }
      {if (true) throw (Error)jjte000;}
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
196850
public final void setAgeofdgpsdata(StringBuilder contentBuffer) {
        ptValues[GpxMetadata.PTAGEOFDGPSDATA] = Double.parseDouble(contentBuffer.toString());
    }
273914
public void save(Object po) throws Exception {
		String autoGeneratedColumnName = IdUtils.getAutoGeneratedId(po);
		if(!"".equals(autoGeneratedColumnName)){
			//有自增字段
			int idValue = save(po, autoGeneratedColumnName);
			//把自增的主键值再设置回去
			IdUtils.setAutoIncreamentIdValue(po,autoGeneratedColumnName,idValue);
		}else{
			SqlParamsPairs sqlAndParams = ModelSqlUtils.getInsertFromObject(po);
			
			getProxy().update(sqlAndParams.getSql(), sqlAndParams.getParams());
		}		
	}
747281
@RequestMapping("VIEW")
    public String renderError(RenderRequest request, RenderResponse response, ModelMap model)
            throws Exception {

        HttpServletRequest httpRequest = this.portalRequestUtils.getPortletHttpRequest(request);
        IPortletWindowId currentFailedPortletWindowId =
                (IPortletWindowId)
                        request.getAttribute(REQUEST_ATTRIBUTE__CURRENT_FAILED_PORTLET_WINDOW_ID);
        model.addAttribute("portletWindowId", currentFailedPortletWindowId);
        Exception cause =
                (Exception) request.getAttribute(REQUEST_ATTRIBUTE__CURRENT_EXCEPTION_CAUSE);
        model.addAttribute("exception", cause);
        final String rootCauseMessage = ExceptionUtils.getRootCauseMessage(cause);
        model.addAttribute("rootCauseMessage", rootCauseMessage);

        // Maintenance Mode?
        if (cause != null && cause instanceof MaintenanceModeException) {
            return "/jsp/PortletError/maintenance";
        }

        IUserInstance userInstance = this.userInstanceManager.getUserInstance(httpRequest);
        if (hasAdminPrivileges(userInstance)) {
            IPortletWindow window =
                    this.portletWindowRegistry.getPortletWindow(
                            httpRequest, currentFailedPortletWindowId);
            window.setRenderParameters(new ParameterMap());
            IPortalUrlBuilder adminRetryUrl =
                    this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(
                            httpRequest, currentFailedPortletWindowId, UrlType.RENDER);
            model.addAttribute("adminRetryUrl", adminRetryUrl.getUrlString());

            final IPortletWindow portletWindow =
                    portletWindowRegistry.getPortletWindow(
                            httpRequest, currentFailedPortletWindowId);
            final IPortletEntity parentPortletEntity = portletWindow.getPortletEntity();
            final IPortletDefinition parentPortletDefinition =
                    parentPortletEntity.getPortletDefinition();
            model.addAttribute("channelDefinition", parentPortletDefinition);

            StringWriter stackTraceWriter = new StringWriter();
            cause.printStackTrace(new PrintWriter(stackTraceWriter));

            model.addAttribute("stackTrace", stackTraceWriter.toString());

            return "/jsp/PortletError/detailed";
        }
        // no admin privileges, return generic view
        return "/jsp/PortletError/generic";
    }
548927
@Override
    public void verify(VerificationData data) {
        try {
            verification.verify(data);

        } catch (MockitoAssertionError e) {
            throw new MockitoAssertionError(e, description);
        }
    }