コード例 #1
0
 public IBDBusiCheck getBDBusiCheckInstance() {
   if (checker == null) {
     // @see PfUtilTools.instantizeObject()
     if (Toolkit.isInDebug()) {
       try {
         checker = (IBDBusiCheck) Class.forName(IContent.BusiChecker).newInstance();
       } catch (Exception e) {
         LogTool.error(e);
       }
     } else {
       checker =
           (IBDBusiCheck) ObjectCreator.newInstance(IContent.ModuleName, IContent.BusiChecker);
     }
     if (checker == null) {
       throw new RuntimeException("Can not found " + IContent.BusiChecker);
     }
   }
   return checker;
 }
コード例 #2
0
  public IQueryAfterSave getQueryAfterSaveInstance() {
    if (queryServer == null) {
      try {
        // @see PfUtilTools.instantizeObject()
        Object objChecker = ObjectCreator.newInstance(IContent.ModuleName, IContent.BusiQuery);
        if (objChecker == null) {
          throw new RuntimeException("Can not found " + IContent.BusiQuery);
        }

        if (objChecker instanceof IBaseBusiQuery) {
          queryServer = (IBaseBusiQuery) objChecker;
          ((IBaseBusiQuery) queryServer).setAggVO(getBillVO());
          ((IBaseBusiQuery) queryServer).setWhere(this.initWhere);
        }
      } catch (Exception e) {
        Logger.error(e.getMessage(), e.getCause());
      }
    }
    return queryServer;
  }