Beispiel #1
0
 public List<? extends DatabaseElement> getUnmappedDatabaseElements() {
   if (this.unmappedDatabaseElements == null) {
     this.unmappedDatabaseElements =
         databaseElementBean.findNotMappedElements(this.entityClass.getDatabaseElement());
   }
   return this.unmappedDatabaseElements;
 }
Beispiel #2
0
 public Integer getSelectedDatabaseElement() {
   if (!this.entityClass.suggestedElementName().isEmpty()) {
     DatabaseElement databaseElement =
         databaseElementBean.findByName(this.entityClass.suggestedElementName());
     if (databaseElement != null) {
       this.selectedDatabaseElement = databaseElement.getId();
     }
   }
   return selectedDatabaseElement;
 }
Beispiel #3
0
  public String saveAndCreateNew() {
    this.entityClass.setApplication(applicationFilterMBean.getApplication());
    this.entityClass.setModule(applicationFilterMBean.getModule());
    this.entityClass.setPack(applicationFilterMBean.getPackage());

    if (this.selectedDatabaseElement != null) {
      DatabaseElement databaseElement = databaseElementBean.find(this.selectedDatabaseElement);
      this.entityClass.setDatabaseElement(databaseElement);
    }

    entityClassBean.save(this.entityClass);
    return "entity_class_form?faces-redirect=true&appId="
        + this.entityClass.getApplication().getId()
        + "&modId="
        + this.entityClass.getModule().getId()
        + "&pkgId="
        + this.entityClass.getPack().getId();
  }