{
EList<JvmMember> _members = inferredType.getMembers();
String _name = property.getName();
String _firstUpper = StringExtensions.toFirstUpper(_name);
String _plus = ("get" + _firstUpper);
JvmTypeReference _jvmType = this.getJvmType(property);
final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
public void apply(final JvmOperation it) {
String _documentation = MongoBeansJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(property);
MongoBeansJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
StringConcatenationClient _client = new StringConcatenationClient() {
@Override
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
{
JvmTypeReference _jvmType = MongoBeansJvmModelInferrer.this.getJvmType(property);
JvmType _type = _jvmType.getType();
boolean _isMongoBean = MongoBeansJvmModelInferrer.this._mongoTypes.isMongoBean(_type);
if (_isMongoBean) {
_builder.append("return ");
_builder.append(WrappingUtil.class, "");
_builder.append(".wrapAndCast((");
_builder.append(DBObject.class, "");
_builder.append(") _dbObject.get(\"");
String _name = property.getName();
_builder.append(_name, "");
_builder.append("\"));");
_builder.newLineIfNotEmpty();
} else {
_builder.append("return (");
JvmTypeReference _jvmType_1 = MongoBeansJvmModelInferrer.this.getJvmType(property);
JvmTypeReference _asWrapperTypeIfPrimitive = MongoBeansJvmModelInferrer.this._primitives.asWrapperTypeIfPrimitive(_jvmType_1);
_builder.append(_asWrapperTypeIfPrimitive, "");
_builder.append(") _dbObject.get(\"");
String _name_1 = property.getName();
_builder.append(_name_1, "");
_builder.append("\");");
_builder.newLineIfNotEmpty();
}
}
}
};
MongoBeansJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _client);
}
};
JvmOperation _method = this._jvmTypesBuilder.toMethod(property, _plus, _jvmType, _function);
this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
EList<JvmMember> _members_1 = inferredType.getMembers();
String _name_1 = property.getName();
String _firstUpper_1 = StringExtensions.toFirstUpper(_name_1);
String _plus_1 = ("set" + _firstUpper_1);
JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Void.TYPE);
final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
public void apply(final JvmOperation it) {
String _documentation = MongoBeansJvmModelInferrer.this._jvmTypesBuilder.getDocumentation(property);
MongoBeansJvmModelInferrer.this._jvmTypesBuilder.setDocumentation(it, _documentation);
EList<JvmFormalParameter> _parameters = it.getParameters();
String _name = property.getName();
JvmTypeReference _jvmType = MongoBeansJvmModelInferrer.this.getJvmType(property);
JvmFormalParameter _parameter = MongoBeansJvmModelInferrer.this._jvmTypesBuilder.toParameter(property, _name, _jvmType);
MongoBeansJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
StringConcatenationClient _client = new StringConcatenationClient() {
@Override
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
{
JvmTypeReference _jvmType = MongoBeansJvmModelInferrer.this.getJvmType(property);
JvmType _type = _jvmType.getType();
boolean _isMongoBean = MongoBeansJvmModelInferrer.this._mongoTypes.isMongoBean(_type);
if (_isMongoBean) {
_builder.append("_dbObject.put(\"");
String _name = property.getName();
_builder.append(_name, "");