public JavaResource newEntity(Project project, String entityName, String entityPackage, GenerationType idStrategy)
throws FileNotFoundException
{
final JavaSourceFacet java = facetFactory.install(project, JavaSourceFacet.class);
JavaClass javaClass = createJavaClass(entityName, entityPackage, idStrategy);
return java.saveJavaSource(javaClass);
}
/**
* Creates a new {@link JavaResource} in the specified target. If a project is available, use
* {@link PersistenceOperations#newEntity(Project, String, String, GenerationType)}