Package net.sf.minuteProject.configuration.bean.model.data

Examples of net.sf.minuteProject.configuration.bean.model.data.Database


  public void setFunctionPackage(FunctionPackage functionPackage) {
    this.functionPackage = functionPackage;
  }
 
  public void complementFunctionWithFunctionEntity() {
    Database database = model.getDataModel().getDatabase();
    getFunctionPackage().setPackages(model, database);
  }
View Full Code Here


//    complementDataModelWithViews();
//    complementService();
//  }

  public void complementDataModelWithTables () {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      getBusinessPackage().setPackages(model, database);
    }
    complementDataModelWithTablesEnrichment();
    complementDataModelWithPackageEnrichment();
View Full Code Here

    complementDataModelWithTablesEnrichment();
    complementDataModelWithPackageEnrichment();
  }
 
  public void complementDataModelWithViews () {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      getBusinessPackage().setPackageViews(model, database);
    }
    complementDataModelWithViewsEnrichment();
    complementDataModelWithPackageEnrichment();
View Full Code Here

  private void complementDataModelWithTablesEnrichment () {
    complementDataModelWithEntitiesEnrichment(Table.TABLE);
  }

  private void complementDataModelWithEntitiesEnrichment (String type) {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      // for all the view
      // set virtual pk, realpk
      Enrichment enrichment = model.getBusinessModel().getEnrichment();
      if (enrichment != null) {
View Full Code Here

      }
    }
  }

  public void complementDataModelWithTransferEntitiesEnrichment () {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      Enrichment enrichment = model.getBusinessModel().getEnrichment();
      if (enrichment != null) {
        if (enrichment.getEntities()!=null) {
          for (Entity entity : enrichment.getEntities()) {
View Full Code Here

      }
    }
  }
 
  private void complementDataModelWithPackageEnrichment () {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      Enrichment enrichment = model.getBusinessModel().getEnrichment();
      if (enrichment != null) {
        if (enrichment.getPackages()!=null) {
          for (Package pack : enrichment.getPackages()) {
View Full Code Here

    table.setDatabase(database);
    businessPackage.addTransferEntity(model, table);
  }

  public void secureEntityType () {
    Database database = model.getDataModel().getDatabase();
    if (database!=null) {
      // for all the view
      // set virtual pk, realpk
      Enrichment enrichment = model.getBusinessModel().getEnrichment();
      if (enrichment != null) {
View Full Code Here

      complementEntityWithProperties(table, entity);
    }   
  }
 
  public void complementService() {
    Database database = model.getDataModel().getDatabase();
    Service service = model.getBusinessModel().getService();
    if (service!=null) {
      List <Scope> scopes = service.getScopes();
      if (scopes!=null) {
        for (Scope scope : model.getBusinessModel().getService().getScopes()) {
View Full Code Here

import net.sf.minuteProject.configuration.bean.strategy.datamodel.PrimaryKeyPolicyPatternEnum;

public class DatabaseUtils {
 
  public static String providePrimaryKeyLookUpString (Table table) {
    Database database = table.getDatabase();
    if (database.getType().equals("DB2")){
      return "SELECT NEXTVAL FOR "+provideSequence(table)+" AS ID FROM SYSIBM.SYSDUMMY1";
    } else if (database.getType().equals("ORACLE")){
      return "SELECT "+provideSequence(table)+".NEXTVAL AS ID FROM DUAL";
    } else if (database.getType().equals("MYSQL")){
      return "SELECT LAST_INSERT_ID() AS value";
    }
    else if (database.getType().equals("HSQLDB")){
      return "SELECT NEXT VALUE FOR "+provideSequence(table)+" AS ID FROM DUAL";
    } else
    return "ERROR_ON_LOOK_UP for PK";
  }
View Full Code Here

  public static String getChildrenListClass(net.sf.minuteProject.configuration.bean.model.data.Reference reference) {
    return FormatUtils.getJavaName(reference.getAlias());
  }
 
  public static void setReferenceColumnAlias(Column column, String name, String newName) {
    Database database = column.getTable().getDatabase();
    Table table = TableUtils.getTable(database, column.getTable().getName());
    if (table==null) {
      log.error("> table : "+column.getTable().getName()+", column : "+column.getName()+" not found");
      return;
    }
View Full Code Here

TOP

Related Classes of net.sf.minuteProject.configuration.bean.model.data.Database

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.