private void setEntityIdValue(final Object entity, final BigDecimal id, final MappingColumn column) {
		Class<?> rawType = column.getJavaType().getRawType();
		if (int.class.equals(rawType) || Integer.class.equals(rawType)) {
			column.setValue(entity, id.intValue());
		} else if (long.class.equals(rawType) || Long.class.equals(rawType)) {
			column.setValue(entity, id.longValue());
		} else if (BigInteger.class.equals(rawType)) {
			column.setValue(entity, id.toBigInteger());
		} else if (BigDecimal.class.equals(rawType)) {
			column.setValue(entity, id);
		} else if (String.class.equals(rawType)) {
			column.setValue(entity, id.toPlainString());
		} else {
			throw new UroborosqlRuntimeException(
					"Column is not correct as ID type. column=" + column.getCamelName() + ", type=" + rawType);
		}
	}
private void setEntityIdValue ( final Object entity , final BigDecimal id , final MappingColumn column ) { Class < ? > rawType = column . getJavaType ( ) . getRawType ( ) ; if ( int . class . equals ( rawType ) || Integer . class . equals ( rawType ) ) { column . setValue ( entity , id . intValue ( ) ) ; } else if ( long . class . equals ( rawType ) || Long . class . equals ( rawType ) ) { column . setValue ( entity , id . longValue ( ) ) ; } else if ( BigInteger . class . equals ( rawType ) ) { column . setValue ( entity , id . toBigInteger ( ) ) ; } else if ( BigDecimal . class . equals ( rawType ) ) { column . setValue ( entity , id ) ; } else if ( String . class . equals ( rawType ) ) { column . setValue ( entity , id . toPlainString ( ) ) ; } else { throw new UroborosqlRuntimeException ( "Column is not correct as ID type. column=" + column . getCamelName ( ) + ", type=" + rawType ) ; } }
entityにID値を設定する
@param entity Entity
@param id ID値
@param column 設定する対象のカラム