code: private void setBatchSize(String persistenceUnit, Map<String, Object> puProperties)
      {
          String batch_Size = null;
          if (puProperties != null)
          {
              Object externalBatchSize = puProperties.get(PersistenceProperties.KUNDERA_BATCH_SIZE);
              externalBatchSize = externalBatchSize != null ? externalBatchSize.toString() : null;
              batch_Size = puProperties != null ? (String) externalBatchSize : null;
              if (batch_Size != null)
              {
                  batchSize = Integer.valueOf(batch_Size);
                  if (batchSize == 0)
                  {
                      throw new IllegalArgumentException("kundera.batch.size property must be numeric and > 0.");
                  }
              }
          }
          else if (batch_Size == null)
          {
              PersistenceUnitMetadata puMetadata = KunderaMetadataManager.getPersistenceUnitMetadata(kunderaMetadata,
                      persistenceUnit);
              batchSize = puMetadata != null ? puMetadata.getBatchSize() : 0;
          }
      }
docs: Sets the batch size.
  
  @param persistenceUnit
  the persistence unit
  @param puProperties
  the pu properties