// Setter.
final JMethod setter = f.parent().implClass.method(
JMod.PUBLIC, f.parent().parent().getCodeModel().VOID, "setJpa" + f.getPropertyInfo().getName( true ) );
final JVar calendar = setter.param( JMod.FINAL, Calendar.class, "value" );
setter.body().directStatement( "// " + getMessage( "title" ) );
setter.body().assign( JExpr.refthis( field.name() ), calendar );
setter.body().assign( JExpr.refthis( f.getPropertyInfo().getName( false ) ), f.parent()._package().
objectFactory().staticInvoke( "createXMLGregorianCalendar" ).arg( calendar ) );
// Update to the JAXB property setter to also update the jpa field.
final JMethod transientSetter = this.getSetter( f );
transientSetter.body().assign( JExpr.refthis( field.name() ), f.parent()._package().objectFactory().
staticInvoke( "createCalendar" ).arg( transientSetter.listParams()[0] ) );
setter.javadoc().append(
"Sets the value of the jpa" + f.getPropertyInfo().getName( true ) + " property." + lineSeparator );
setter.javadoc().append(
"<p>This method sets the value of the " + f.getPropertyInfo().getName( false ) + " property by "
+ "transforming {@code " + calendar.name() + "} to a " + XMLGregorianCalendar.class.getName()
+ " instance.</p>" + lineSeparator );
setter.javadoc().addParam( calendar ).append(
"The new value of the jpa" + f.getPropertyInfo().getName( true ) + " property." );