docs: public void save() throws Exception {
  		Filer filer = environment.getFiler();
  		FileObject resource = filer.getResource(StandardLocation.SOURCE_OUTPUT,
  				packageName, metamodelName + ".java");
  		File file = new File(resource.toUri().toString());
  
  		if (file.exists()) {
  			file.delete();
  		}
  		
  		StringBuilder source = new StringBuilder();
  		source.append(String.format(PACKAGE_TEMPLATE, packageName).toString());
  		source.append(IMPORT_TEMPLATE);
  		StringBuilder buffer = new StringBuilder(String.format(
  				CONSTRUCTOR_TEMPLATE, metamodelName, entityName, metamodelName,
  				entityName).toString());
  		StringBuilder embedded = new StringBuilder();
  		Set<String> embeddeds = new HashSet<String>();
  		Elements elementUtils = environment.getElementUtils();
  		
  		for (VariableElement field : ElementFilter.fieldsIn(
  				elementUtils.getAllMembers(element))) {
  			if (!isTransient(field)) {
  				String name = field.getSimpleName().toString();
  				TypeMirror type = field.asType();
  				
  				if (isEmbedded(type)) {
  					if (!embeddeds.contains(type.toString())) {
  						embeddeds.add(type.toString());
  						embedded.append(toEmbedded(type));
  					}
  					
  					String e = metamodelName + "." + toEmbeddedName(environment.getTypeUtils().asElement(field.asType()).getSimpleName().toString());
  					buffer.append(String.format(EMBEDDED_TEMPLATE, e, name, e, name));
  				} else if (isEntity(type)) {
  					// Owned child entity object.
  					String metamodel = toMetamodelName(field.asType()
  							.toString());
  					buffer.append(String.format(METAMODEL_TEMPLATE,
  							metamodel, name, metamodel, name));
  				} else if (isComparable(type)) {
  					buffer.append(new Formatter().format(
  							COMPARABLE_PROPERTY_TEMPLATE, entityName,
  							box(type), name, entityName, box(type), toRawType(box(type)),
  							name).toString());
  				} else {
  					buffer.append(new Formatter().format(
  							NON_COMPARABLE_PROPERTY_TEMPLATE, entityName,
  							box(type), name, entityName, box(type), toRawType(box(type)),
  							name).toString());
  				}
  			}
  		}
  		
  		source.append(String.format(CLASS_TEMPLATE, metamodelName, entityName, buffer.append(embedded)));
  		PrintWriter writer = new PrintWriter(filer.createSourceFile(
  				packageName + "." + metamodelName, element).openWriter());
  		writer.write(source.toString());
  		writer.close();
  	}