<p>Get bean in lazy mode (if bean is null then initialize it).</p>
@param pAddParam additional param
@param pBeanName - bean name
@return requested bean
@throws Exception - an exception
545208
@Override
  public final IProcessor lazyGet(//NOPMD
    final Map<String, Object> pAddParam,
      final String pBeanName) throws Exception {
    IProcessor proc = this.processorsMap.get(pBeanName);
    if (proc == null) {
      // locking:
      synchronized (this.processorsMap) {
        // make sure again whether it's null after locking:
        proc = this.processorsMap.get(pBeanName);
        if (proc == null) {
          if (pBeanName.equals(PrcDelItemFromCart.class.getSimpleName())) {
            proc = lazyGetPrcDelItemFromCart(pAddParam);
          } else if (pBeanName.equals(PrCart.class.getSimpleName())) {
            proc = lazyGetPrCart(pAddParam);
          } else if (pBeanName.equals(PrcItemInCart.class.getSimpleName())) {
            proc = lazyGetPrcItemInCart(pAddParam);
          } else if (pBeanName.equals(PrLog.class.getSimpleName())) {
            proc = lazyGetPrLog(pAddParam);
          } else if (pBeanName.equals(PrcCheckOut.class.getSimpleName())) {
            proc = lazyGetPrcCheckOut(pAddParam);
          } else if (pBeanName.equals(PrBuOr.class.getSimpleName())) {
            proc = lazyGetPrBuOr(pAddParam);
          } else if (pBeanName.equals(PrBur.class.getSimpleName())) {
            proc = lazyGetPrBur(pAddParam);
          } else if (pBeanName.equals(PrPur.class.getSimpleName())) {
            proc = lazyGetPrPur(pAddParam);
          } else if (pBeanName.equals(PrcItemPage.class.getSimpleName())) {
            proc = lazyGetPrcItemPage(pAddParam);
          } else if (pBeanName.equals(PrcWebstorePage.class.getSimpleName())) {
            proc = lazyGetPrcWebstorePage(pAddParam);
          }
        }
      }
    }
    if (proc == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no processor with name " + pBeanName);
    }
    return proc;
  }
164847
@Override
  public final M create(final Map<String, Object> pAddParam) throws Exception {
    M object = this.objectClass.newInstance();
    return object;
  }
62731
protected final PrCuOrSeSv<RS> lazyGetPrCuOrSeSv(
      final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrCuOrSeSv.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrCuOrSeSv<RS> proc = (PrCuOrSeSv<RS>) this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrCuOrSeSv<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setCncOrd(getCncOrd());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnSeSelEntityProcs.class,
        beanName + " has been created.");
    }
    return proc;
  }
473977
protected final PrcAbout<RS> lazyGetPrcAbout(
      final Map<String, Object> pAddParam) throws Exception {
    @SuppressWarnings("unchecked")
    PrcAbout<RS> proc = (PrcAbout<RS>) this.processorsMap
      .get(PrcAbout.class.getSimpleName());
    if (proc == null) {
      proc = new PrcAbout<RS>();
      proc.setSrvOrm(getSrvOrm());
      //assigning fully initialized object:
      this.processorsMap
        .put(PrcAbout.class.getSimpleName(), proc);
    }
    return proc;
  }
168407
@Override
  public final void make(
    final Map<String, Object> pAddParam) throws Exception {
    this.replicationMethod.setLastDateReplication(new Date());
    getSrvOrm().updateEntity(pAddParam, this.replicationMethod);
  }
577985
public final HolderRapiGetters
    lazyGetHolderRapiGetters() throws Exception {
    String beanName = getHolderRapiGettersName();
    HolderRapiGetters holderRapiGetters =
      (HolderRapiGetters) this.beansMap.get(beanName);
    if (holderRapiGetters == null) {
      holderRapiGetters = new HolderRapiGetters();
      holderRapiGetters.setUtlReflection(lazyGetUtlReflection());
      this.beansMap.put(beanName, holderRapiGetters);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return holderRapiGetters;
  }
673188
public final ASrvOrm<RS>
    lazyGetSrvOrm() throws Exception {
    String beanName = getSrvOrmName();
    @SuppressWarnings("unchecked")
    ASrvOrm<RS> srvOrm = (ASrvOrm<RS>) this.beansMap.get(beanName);
    if (srvOrm == null) {
      srvOrm = instantiateSrvOrm();
      srvOrm.setNewDatabaseId(this.newDatabaseId);
      srvOrm.setSrvDatabase(lazyGetSrvDatabase());
      srvOrm.setHlpInsertUpdate(lazyGetHlpInsertUpdate());
      srvOrm.setLogger(lazyGetLogger());
      srvOrm.setUtlReflection(lazyGetUtlReflection());
      srvOrm.setFctFillersObjectFields(lazyGetFctFillersObjectFields());
      srvOrm.setEntitiesFactoriesFatory(this.factoryBldServices
        .lazyGetFctBcFctSimpleEntities());
      FctBcCnvEntityToColumnsValues fctBcCnvEntityToColumnsValues =
        lazyGetFctBcCnvEntityToColumnsValues();
      srvOrm.setFactoryCnvEntityToColumnsValues(
        fctBcCnvEntityToColumnsValues);
      FillerEntitiesFromRs<RS> fillerEntitiesFromRs =
        lazyGetFillerEntitiesFromRs();
      srvOrm.setFillerEntitiesFromRs(fillerEntitiesFromRs);
      MngSettings mngOrmSettings = new MngSettings();
      mngOrmSettings.setLogger(lazyGetLogger());
      mngOrmSettings.setUtlReflection(lazyGetUtlReflection());
      mngOrmSettings.setUtlProperties(lazyGetUtlProperties());
      srvOrm.setMngSettings(mngOrmSettings);
      srvOrm.loadConfiguration(this.ormSettingsDir,
        this.ormSettingsBaseFile);
      fctBcCnvEntityToColumnsValues
        .setTablesMap(srvOrm.getTablesMap());
      lazyGetFctBnCnvBnFromRs().setTablesMap(srvOrm.getTablesMap());
      lazyGetFctBnCnvIbnToColumnValues().setTablesMap(srvOrm.getTablesMap());
      fillerEntitiesFromRs.setTablesMap(srvOrm.getTablesMap());
      Map<String, Object> addParam = new HashMap<String, Object>();
      lazyGetLogger().info(null, AFactoryAppBeans.class,
        "try to initialize database: " + getDatabaseName());
      srvOrm.initializeDatabase(addParam);
      this.entitiesMap = new HashMap<String, Class<?>>();
      for (Class<?> clazz : srvOrm.getMngSettings()
        .getClasses()) {
        this.entitiesMap.put(clazz.getSimpleName(), clazz);
      }
      this.beansMap.put(beanName, srvOrm);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return srvOrm;
  }
1081368
protected final PrCuOrSv<RS> lazyGetPrCuOrSv(final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrCuOrSv.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrCuOrSv<RS> proc = (PrCuOrSv<RS>) this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrCuOrSv<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setCncOrd(getCncOrd());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnTradeEntitiesProcessors.class, beanName + " has been created.");
    }
    return proc;
  }
1294399
protected final PrcBeginningInventoryLineGfr
    lazyGetPrcBeginningInventoryLineGfr(
      final Map<String, Object> pAddParam) throws Exception {
    @SuppressWarnings("unchecked")
    PrcBeginningInventoryLineGfr<RS> proc =
      (PrcBeginningInventoryLineGfr<RS>) this.processorsMap
        .get(PrcBeginningInventoryLineGfr.class.getSimpleName());
    if (proc == null) {
      proc = new PrcBeginningInventoryLineGfr<RS>();
      @SuppressWarnings("unchecked")
      PrcEntityPbCopy<RS, BeginningInventoryLine> procDlg =
        (PrcEntityPbCopy<RS, BeginningInventoryLine>)
          this.fctBnEntitiesProcessors
            .lazyGet(pAddParam, PrcEntityPbCopy.class.getSimpleName());
      proc.setPrcAccEntityPbCopy(procDlg);
      //assigning fully initialized object:
      this.processorsMap
        .put(PrcBeginningInventoryLineGfr.class.getSimpleName(), proc);
    }
    return proc;
  }
1014201
protected final PrcBankStatementSave<RS> lazyGetPrcBankStatementSave(
    final Map<String, Object> pAddParam) throws Exception {
    @SuppressWarnings("unchecked")
    PrcBankStatementSave<RS> proc = (PrcBankStatementSave<RS>)
      this.processorsMap.get(PrcBankStatementSave.class.getSimpleName());
    if (proc == null) {
      proc = new PrcBankStatementSave<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setCsvReader(getCsvReader());
      //assigning fully initialized object:
      this.processorsMap.put(PrcBankStatementSave.class.getSimpleName(), proc);
    }
    return proc;
  }
218389
protected final PrcPurchaseReturnLineGfr lazyGetPrcPurchaseReturnLineGfr(
    final Map<String, Object> pAddParam) throws Exception {
    @SuppressWarnings("unchecked")
    PrcPurchaseReturnLineGfr<RS> proc = (PrcPurchaseReturnLineGfr<RS>)
      this.processorsMap.get(PrcPurchaseReturnLineGfr.class.getSimpleName());
    if (proc == null) {
      proc = new PrcPurchaseReturnLineGfr<RS>();
      @SuppressWarnings("unchecked")
      PrcEntityPbCopy<RS, PurchaseReturnLine> procDlg =
        (PrcEntityPbCopy<RS, PurchaseReturnLine>) this.fctBnEntitiesProcessors
          .lazyGet(pAddParam, PrcEntityPbCopy.class.getSimpleName());
      proc.setPrcAccEntityPbCopy(procDlg);
      //assigning fully initialized object:
      this.processorsMap
        .put(PrcPurchaseReturnLineGfr.class.getSimpleName(), proc);
    }
    return proc;
  }
13879
@Override
  public final <T> T retrieveEntityById(final Map<String, Object> pAddParam,
    final Class<T> pEntityClass, final Object pItsId) throws Exception {
    String query = evalSqlSelect(pAddParam, pEntityClass);
    @SuppressWarnings("unchecked")
    IFactorySimple<T> facEn = (IFactorySimple<T>) this.entitiesFactoriesFatory
      .lazyGet(pAddParam, pEntityClass);
    T entity = facEn.create(pAddParam);
    @SuppressWarnings("unchecked")
    IFillerObjectFields<T> filler = (IFillerObjectFields<T>)
      this.fctFillersObjectFields.lazyGet(pAddParam, pEntityClass);
    String idFldName = this.tablesMap
      .get(pEntityClass.getSimpleName()).getIdFieldName();
    filler.fill(pAddParam, entity, pItsId, idFldName);
    pAddParam.put("isOnlyId", Boolean.TRUE);
    ColumnsValues columnsValues = evalColumnsValues(pAddParam, entity);
    pAddParam.remove("isOnlyId");
    String whereId = evalWhereId(entity, columnsValues);
    return retrieveEntity(pAddParam, pEntityClass,
      query + " where " + whereId + ";\n");
  }
490024
protected final PrcRefreshHndlI18n
    lazyGetPrcRefreshHndlI18n(
      final Map<String, Object> pAddParam) throws Exception {
    PrcRefreshHndlI18n proc = (PrcRefreshHndlI18n) this.processorsMap
      .get(PrcRefreshHndlI18n.class.getSimpleName());
    if (proc == null) {
      proc = new PrcRefreshHndlI18n();
      proc.setI18nRequestHandler(this.i18nRequestHandler);
      //assigning fully initialized object:
      this.processorsMap
        .put(PrcRefreshHndlI18n.class.getSimpleName(), proc);
    }
    return proc;
  }
400811
protected final PrcPurchRetGfe lazyGetPrcPurchRetGfe(
    final Map<String, Object> pAddParam) throws Exception {
    PrcPurchRetGfe proc = (PrcPurchRetGfe)
      this.processorsMap.get(PrcPurchRetGfe.class.getSimpleName());
    if (proc == null) {
      proc = new PrcPurchRetGfe();
      @SuppressWarnings("unchecked")
      PrcEntityPbEditDelete<RS, PurchaseReturn> procDlg =
    (PrcEntityPbEditDelete<RS, PurchaseReturn>) this.fctBnEntitiesProcessors
  .lazyGet(pAddParam, PrcEntityPbEditDelete.class.getSimpleName());
      proc.setPrcEntityPbEditDelete(procDlg);
      //assigning fully initialized object:
      this.processorsMap
        .put(PrcPurchRetGfe.class.getSimpleName(), proc);
    }
    return proc;
  }
1107665
protected final PrcItemSpecificsRetrieve<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>
      lazyGetPrcItemSpecificsRetrieve(final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrcItemSpecificsRetrieve.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrcItemSpecificsRetrieve<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>> proc =
      (PrcItemSpecificsRetrieve<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>)
        this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrcItemSpecificsRetrieve<RS, IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>();
      @SuppressWarnings("unchecked")
      PrcEntityRetrieve<RS, AItemSpecifics<IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>, AItemSpecificsId<IHasIdLongVersion>>
        procDlg = (PrcEntityRetrieve<RS, AItemSpecifics<IHasIdLongVersion, AItemSpecificsId<IHasIdLongVersion>>, AItemSpecificsId<IHasIdLongVersion>>)
          this.fctBnEntitiesProcessors.lazyGet(pAddParam, PrcEntityRetrieve.class.getSimpleName());
      proc.setPrcEntityRetrieve(procDlg);
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnTradeEntitiesProcessors.class, beanName + " has been created.");
    }
    return proc;
  }
520406
protected final PrBur<RS> lazyGetPrBur(
    final Map<String, Object> pAddParam) throws Exception {
    String beanName = PrBur.class.getSimpleName();
    @SuppressWarnings("unchecked")
    PrBur<RS> proc = (PrBur<RS>)
      this.processorsMap.get(beanName);
    if (proc == null) {
      proc = new PrBur<RS>();
      proc.setSrvOrm(getSrvOrm());
      proc.setSrvDb(getSrvDatabase());
      proc.setLog(getLogger());
      proc.setProcFac(this);
      proc.setBuySr(getBuySr());
      //assigning fully initialized object:
      this.processorsMap.put(beanName, proc);
      this.logger.info(null, FctBnPublicTradeProcessors.class,
        beanName + " has been created.");
    }
    return proc;
  }
1139352
public final SrvDate lazyGetSrvDate() throws Exception {
    String beanName = getSrvDateName();
    SrvDate srvDate = (SrvDate) this.beansMap.get(beanName);
    if (srvDate == null) {
      srvDate = new SrvDate();
      this.beansMap.put(beanName, srvDate);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return srvDate;
  }