project.setLicense(License.APACHE_V2);
project.getAuthors().add("snazy");
project.getContributors().add("snazy");
project.setProjectURL(new URL("http://caffinitas.org/"));
AggregatorModuleEntity parentModule = new AggregatorModuleEntity();
parentModule.setProjectId(project.getId());
parentModule.setName("caffinitas-parent");
CodeModuleEntity moduleCore = new CodeModuleEntity();
moduleCore.setProjectId(project.getId());
moduleCore.setName("caffinitas-core");
moduleCore.setLanguage(Language.JAVA);
CodeModuleEntity moduleDemo = new CodeModuleEntity();
moduleDemo.setProjectId(project.getId());
moduleDemo.setName("caffinitas-demo");
moduleDemo.setLanguage(Language.JAVA);
CodeModuleEntity moduleTest = new CodeModuleEntity();
moduleTest.setProjectId(project.getId());
moduleTest.setName("caffinitas-test");
moduleTest.setLanguage(Language.JAVA);
parentModule.getModules().add("caffinitas-core");
parentModule.getModules().add("caffinitas-demo");
parentModule.getModules().add("caffinitas-test");
ModifyFuture<ProjectEntity> projectPersistFuture = session.insertAsync(project);
ModifyFuture<AggregatorModuleEntity> parentModulePersistFuture = session.insertAsync(parentModule);
ModifyFuture<CodeModuleEntity> moduleCorePersistFuture = session.insertAsync(moduleCore);
ModifyFuture<CodeModuleEntity> moduleDemoPersistFuture = session.insertAsync(moduleDemo);