<p>Get CnvHasVersionToColumnsValues (create and put into map).</p>
@param pBeanClass - bean class
@return requested CnvHasVersionToColumnsValues
@throws Exception - an exception
502262
protected final CnvHasVersionToColumnsValues
    lazyGetCnvHasVersionToColumnsValues(
      final Class pBeanClass) throws Exception {
    @SuppressWarnings("unchecked")
    CnvHasVersionToColumnsValues<IHasVersion> convrt =
      (CnvHasVersionToColumnsValues<IHasVersion>)
        this.convertersMap.get(pBeanClass);
    if (convrt == null) {
      convrt = new CnvHasVersionToColumnsValues<IHasVersion>();
      convrt.setCnvObjectToColumnsValues(
        lazyGetCnvObjectToColumnsValues(pBeanClass));
      //assigning fully initialized object:
      this.convertersMap.put(pBeanClass, convrt);
    }
    return convrt;
  }
1105969
public static PlanVersionBean unmarshallPlanVersion(Map<String, Object> source) {
        if (source == null) {
            return null;
        }
        PlanVersionBean bean = new PlanVersionBean();
        bean.setVersion(asString(source.get("version")));
        bean.setStatus(asEnum(source.get("status"), PlanStatus.class));
        bean.setCreatedBy(asString(source.get("createdBy")));
        bean.setCreatedOn(asDate(source.get("createdOn")));
        bean.setModifiedBy(asString(source.get("modifiedBy")));
        bean.setModifiedOn(asDate(source.get("modifiedOn")));
        bean.setLockedOn(asDate(source.get("lockedOn")));
        postMarshall(bean);
        return bean;
    }
1005178
private static String joinSetAndGetValue(List<Field> fields,
			List<Object> values, Object obj, boolean withNull) {
		StringBuilder sb = new StringBuilder();
		int fieldSize = fields.size();
		for(int i = 0; i < fieldSize; i++) {
			Column column = fields.get(i).getAnnotation(Column.class);
			Object value = DOInfoReader.getValue(fields.get(i), obj);
			if(column.casVersion()) {
				if(value == null) {
					throw new CasVersionNotMatchException("casVersion column value is null");
				}
				Long _v = null;
				if(value instanceof Long) {
					_v = (Long) value;
				} else if (value instanceof Integer) {
					_v = ((Integer) value).longValue();
				} else {
					throw new CasVersionNotMatchException("casVersion column type must be Integer or Long");
				}
				sb.append(getColumnName(column)).append("=").append(_v + 1).append(",");
			} else {
				if(value != null && column.isJSON()) {
					value = JSON.toJson(value);
				}
				if(withNull || value != null) {
					sb.append(getColumnName(column)).append("=?,");
					values.add(value);
				}
			}
		}
		return sb.length() == 0 ? "" : sb.substring(0, sb.length() - 1);
	}
309853
public static Object readValueFromBeanField(Object entityBean, String fieldName) {
		Method readMethod = ClassCacheUtils.getClassFieldReadMethod(entityBean.getClass(), fieldName);
		if (readMethod == null) {
			throw new DialectException(
					"No mapping found for field '" + fieldName + "' in '" + entityBean.getClass() + "'");
		} else
			try {
				return readMethod.invoke(entityBean);
			} catch (Exception e) {
				throw new DialectException(e);
			}
	}
870595
private FieldConversion[] getPkFieldConversion(ClassDescriptor cld)
    {
        FieldDescriptor[] pks = cld.getPkFields();
        FieldConversion[] fc = new FieldConversion[pks.length]; 
        
        for (int i= 0; i < pks.length; i++)
        {
            fc[i] = pks[i].getFieldConversion();
        }
        
        return fc;
    }
118145
@Override
  public final IConverterIntoByName<?, ColumnsValues> lazyGet(
    final Map<String, Object> pAddParam,
      final String pBeanName) throws Exception {
    IConverterIntoByName<?, ColumnsValues> convrt =
      this.convertersMap.get(pBeanName);
    if (convrt == null) {
      // locking:
      synchronized (this.convertersMap) {
        // make sure again whether it's null after locking:
        convrt = this.convertersMap.get(pBeanName);
        if (convrt == null) {
          if (pBeanName
            .equals(CnvIbnLongToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnLongToCv();
          } else if (pBeanName
            .equals(CnvIbnFloatToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnFloatToCv();
          } else if (pBeanName
            .equals(CnvIbnDoubleToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnDoubleToCv();
          } else if (pBeanName
            .equals(CnvIbnBigDecimalToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnBigDecimalToCv();
          } else if (pBeanName
            .equals(CnvIbnBooleanToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnBooleanToCv();
          } else if (pBeanName
            .equals(CnvIbnDateToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnDateToCv();
          } else if (pBeanName
            .equals(CnvIbnEnumToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnEnumToCv();
          } else if (pBeanName
            .equals(CnvIbnStringToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnStringToCv();
          } else if (pBeanName
            .equals(CnvIbnEntitiesToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnEntitiesToCv();
          } else if (pBeanName
            .equals(CnvIbnVersionToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnVersionToCv();
          } else if (pBeanName
            .equals(CnvIbnIntegerToCv.class.getSimpleName())) {
            convrt = createPutCnvIbnIntegerToCv();
          }
        }
      }
    }
    if (convrt == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no converter with name " + pBeanName);
    }
    return convrt;
  }
331882
@Override
    public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
236603
@Override
  public final IConverterToFromString<?> lazyGet(
    final Map<String, Object> pAddParam,
      final String pBeanName) throws Exception {
    // There is no way to get from Map partially initialized bean
    // in this double-checked locking implementation
    // cause putting to the Map fully initialized bean
    IConverterToFromString<?> convrt = this.convertersMap.get(pBeanName);
    if (convrt == null) {
      // locking:
      synchronized (this.convertersMap) {
        // make sure again whether it's null after locking:
        convrt = this.convertersMap.get(pBeanName);
        if (convrt == null) {
          if (pBeanName.equals(CnvTfsLong.class.getSimpleName())) {
            convrt = lazyGetCnvTfsLong();
          } else if (pBeanName.equals(CnvTfsDate.class.getSimpleName())) {
            convrt = createPutCnvTfsDate();
          } else if (pBeanName.equals(CnvTfsDateTime.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTime();
          } else if (pBeanName.equals(CnvTfsDateTimeSec.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTimeSec();
          } else if (pBeanName.equals(CnvTfsDateTimeSecMs.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTimeSecMs();
          } else if (pBeanName.equals(CnvTfsBigDecimal.class
            .getSimpleName())) {
            convrt = createPutCnvTfsBigDecimal();
          } else if (pBeanName.equals(CnvTfsFloat.class.getSimpleName())) {
            convrt = createPutCnvTfsFloat();
          } else if (pBeanName.equals(CnvTfsDouble.class.getSimpleName())) {
            convrt = createPutCnvTfsDouble();
          } else if (pBeanName.equals(CnvTfsBoolean.class.getSimpleName())) {
            convrt = createPutCnvTfsBoolean();
          } else if (pBeanName.equals(CnvTfsInteger.class.getSimpleName())) {
            convrt = lazyGetCnvTfsInteger();
          } else if (pBeanName.equals(CnvTfsString.class.getSimpleName())) {
            convrt = lazyGetCnvTfsString();
          } else {
            for (Map.Entry<Class<? extends IHasId<Long>>, String> entry
              : this.hasLongIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Long" + entry.getKey().getSimpleName())) {
                convrt = createHasLongIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<Integer>>, String> entry
              : this.hasIntegerIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Integer" + entry.getKey().getSimpleName())) {
                convrt = createHasIntegerIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<String>>, String> entry
              : this.hasStringIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "String" + entry.getKey().getSimpleName())) {
                convrt = createHasStringIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<?>>, String> entry
              : this.hasCompositeIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Composite" + entry.getKey().getSimpleName())) {
                convrt = createHasCompositeIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Class<?> cmpsClass : this.compositeClasses) {
              if (pBeanName.equals(getCnvTfsObjectName(cmpsClass))) {
                convrt = lazyGetCnvTfsObject(cmpsClass);
                break;
              }
            }
            for (Class<? extends Enum<?>> enumClass : this.enumsClasses) {
              if (pBeanName.equals(CnvTfsEnum
                .class.getSimpleName() + enumClass.getSimpleName())) {
                convrt = createCnvTfsEnum(pBeanName, enumClass);
                break;
              }
            }
          }
        }
      }
    }
    if (convrt == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no converter with name " + pBeanName);
    }
    return convrt;
  }
1368451
@Override
  public final int getVersionDatabase() {
    try {
      String query = "select count(*) as TOTALROWS from " + DatabaseInfo.class
        .getSimpleName().toUpperCase() + ";";
      Integer rowCount = evalIntegerResult(query, "TOTALROWS");
      if (rowCount != 1) {
        throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
          "database_info_config_error");
      }
      query = "select DATABASEVERSION from " + DatabaseInfo.class
        .getSimpleName().toUpperCase() + ";";
      Integer databaseVersion = evalIntegerResult(query, "DATABASEVERSION");
      if (databaseVersion == null) {
        throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
          "database_info_config_error");
      }
      return databaseVersion;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
1161954
public final HldCnvFromRsNames
    lazyGetHldCnvFromRsNames() throws Exception {
    String beanName = getHldCnvFromRsNamesName();
    HldCnvFromRsNames hldCnvFromRsNames =
      (HldCnvFromRsNames) this.beansMap.get(beanName);
    if (hldCnvFromRsNames == null) {
      hldCnvFromRsNames = new HldCnvFromRsNames();
      hldCnvFromRsNames.setFieldsRapiHolder(lazyGetHolderRapiFields());
      this.beansMap.put(beanName, hldCnvFromRsNames);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return hldCnvFromRsNames;
  }
242863
public List<?> convertAllToDynamicBeans(ResultSet rs) throws SQLException{
		ResultSetMetaData rsmd = rs.getMetaData();
		
		Map<String, ColumnMetaData> columnToPropertyMappings = createColumnToPropertyMappings(rsmd);
		
		Class<?> beanClass = reuseOrBuildBeanClass(rsmd, columnToPropertyMappings);
		BeanProcessor beanProcessor = new BeanProcessor(simpleColumnToPropertyMappings(columnToPropertyMappings));
		return beanProcessor.toBeanList(rs, beanClass);
	}
809497
public final FctBcCnvEntityToColumnsValues
    lazyGetFctBcCnvEntityToColumnsValues() throws Exception {
    String beanName = getFctBcCnvEntityToColumnsValuesName();
    FctBcCnvEntityToColumnsValues fctBcCnvEntityToColumnsValues =
      (FctBcCnvEntityToColumnsValues) this.beansMap.get(beanName);
    if (fctBcCnvEntityToColumnsValues == null) {
      fctBcCnvEntityToColumnsValues = new FctBcCnvEntityToColumnsValues();
      fctBcCnvEntityToColumnsValues.setLogger(lazyGetLogger());
      fctBcCnvEntityToColumnsValues
        .setFieldsConvertersFatory(lazyGetFctBnCnvIbnToColumnValues());
      fctBcCnvEntityToColumnsValues
        .setFieldsConvertersNamesHolder(lazyGetHldCnvToColumnsValuesNames());
      fctBcCnvEntityToColumnsValues
        .setFieldsRapiHolder(lazyGetHolderRapiFields());
      fctBcCnvEntityToColumnsValues
        .setGettersRapiHolder(lazyGetHolderRapiGetters());
      this.beansMap.put(beanName, fctBcCnvEntityToColumnsValues);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return fctBcCnvEntityToColumnsValues;
  }
691486
public final FctBnCnvIbnToColumnValues
    lazyGetFctBnCnvIbnToColumnValues() throws Exception {
    String beanName = getFctBnCnvIbnToColumnValuesName();
    FctBnCnvIbnToColumnValues fctBnCnvIbnToColumnValues =
      (FctBnCnvIbnToColumnValues) this.beansMap.get(beanName);
    if (fctBnCnvIbnToColumnValues == null) {
      fctBnCnvIbnToColumnValues = new FctBnCnvIbnToColumnValues();
      fctBnCnvIbnToColumnValues.setUtlReflection(lazyGetUtlReflection());
      fctBnCnvIbnToColumnValues.setFieldsRapiHolder(lazyGetHolderRapiFields());
      fctBnCnvIbnToColumnValues
        .setGettersRapiHolder(lazyGetHolderRapiGetters());
      fctBnCnvIbnToColumnValues.setIsNeedsToSqlEscape(getIsNeedsToSqlEscape());
      fctBnCnvIbnToColumnValues.setSrvSqlEscape(lazyGetSrvSqlEscape());
      this.beansMap.put(beanName, fctBnCnvIbnToColumnValues);
      lazyGetLogger().info(null, AFactoryAppBeans.class, beanName
        + " has been created.");
    }
    return fctBnCnvIbnToColumnValues;
  }
1186214
private void addVersionColumn() {

        AbstractCell<CmsHistoryResourceBean> cell = new CmsVersionCell();
        addColumn(CmsHistoryMessages.columnVersion(), 40, new IdentityColumn<CmsHistoryResourceBean>(cell));
    }
766817
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 columnDomain(int version, FramesV3 s) {
    Frame frame = getFromDKV("key", s.frame_id.key());
    Vec vec = frame.vec(s.column);
    if (vec == null)
      throw new H2OColumnNotFoundArgumentException("column", s.frame_id.toString(), s.column);
    s.domain = new String[1][];
    s.domain[0] = vec.domain();
    return s;
  }
177851
@SuppressWarnings("unchecked")
    public static ApiVersionBean unmarshallApiVersion(Map<String, Object> source) {
        if (source == null) {
            return null;
        }
        ApiVersionBean bean = new ApiVersionBean();
        bean.setVersion(asString(source.get("version")));
        bean.setStatus(asEnum(source.get("status"), ApiStatus.class));
        bean.setCreatedBy(asString(source.get("createdBy")));
        bean.setCreatedOn(asDate(source.get("createdOn")));
        bean.setModifiedBy(asString(source.get("modifiedBy")));
        bean.setModifiedOn(asDate(source.get("modifiedOn")));
        bean.setPublishedOn(asDate(source.get("publishedOn")));
        bean.setRetiredOn(asDate(source.get("retiredOn")));
        bean.setEndpoint(asString(source.get("endpoint")));
        bean.setEndpointType(asEnum(source.get("endpointType"), EndpointType.class));
        bean.setEndpointContentType(asEnum(source.get("endpointContentType"), EndpointContentType.class));
        bean.setPublicAPI(asBoolean(source.get("publicAPI")));
        bean.setDefinitionType(asEnum(source.get("definitionType"), ApiDefinitionType.class));
        bean.setParsePayload(asBool(source.get("parsePayload")));
        bean.setGateways(new HashSet<>());
        List<Map<String, Object>> gateways = (List<Map<String, Object>>) source.get("gateways");
        if (gateways != null) {
            for (Map<String, Object> gatewayMap : gateways) {
                ApiGatewayBean gatewayBean = new ApiGatewayBean();
                gatewayBean.setGatewayId(asString(gatewayMap.get("gatewayId")));
                bean.getGateways().add(gatewayBean);
            }
        }
        bean.setPlans(new HashSet<>());
        List<Map<String, Object>> plans = (List<Map<String, Object>>) source.get("plans");
        if (plans != null) {
            for (Map<String, Object> planMap : plans) {
                ApiPlanBean planBean = new ApiPlanBean();
                planBean.setPlanId(asString(planMap.get("planId")));
                planBean.setVersion(asString(planMap.get("version")));
                bean.getPlans().add(planBean);
            }
        }
        Map<String, Object> endpointProperties = (Map<String, Object>) source.get("endpointProperties");
        if (endpointProperties != null) {
            bean.setEndpointProperties(new HashMap<>());
            for (Entry<String, Object> entry : endpointProperties.entrySet()) {
                bean.getEndpointProperties().put(entry.getKey(), String.valueOf(entry.getValue()));
            }
        }
        postMarshall(bean);
        return bean;
    }
843522
public static List<Field> getClassFields(Class<?> beanClass) {
		Map<String, Field> resultMap = new HashMap<>();
		LinkedList<Field> results = new LinkedList<>();

		Class<?> currentClass = beanClass;
		while (currentClass != null && currentClass != Object.class) {
			for (Field field : currentClass.getDeclaredFields()) {
				if (!field.isSynthetic()) {
					Field v = resultMap.get(field.getName());
					if (v == null) {
						resultMap.put(field.getName(), field);
						results.add(field);
					}
				}
			}
			currentClass = currentClass.getSuperclass();
		}

		return results;
	}