Package com.google.inject.persist.jpa

Examples of com.google.inject.persist.jpa.JpaPersistModule.properties()


    JpaPersistModule jpaPersistModule = new JpaPersistModule(configuration.getPersistenceType().getUnitName());
    if (configuration.getPersistenceType() == PersistenceType.POSTGRES) {
      Properties properties = new Properties();
      properties.setProperty("javax.persistence.jdbc.user", configuration.getDatabaseUser());
      properties.setProperty("javax.persistence.jdbc.password", configuration.getDatabasePassword());
      jpaPersistModule.properties(properties);
    }

    install(jpaPersistModule);

View Full Code Here


      case IN_MEMORY:
        properties.put("javax.persistence.jdbc.url", Configuration.JDBC_IN_MEMORY_URL);
        properties.put("javax.persistence.jdbc.driver", Configuration.JDBC_IN_MEMROY_DRIVER);
        properties.put("eclipselink.ddl-generation", "drop-and-create-tables");
        properties.put("eclipselink.orm.throw.exceptions", "true");
        jpaPersistModule.properties(properties);
        return jpaPersistModule;
      case REMOTE:
        properties.put("javax.persistence.jdbc.url", configuration.getDatabaseUrl());
        properties.put("javax.persistence.jdbc.driver", configuration.getDatabaseDriver());
        break;
View Full Code Here

    }
    properties.setProperty("eclipselink.ddl-generation.output-mode", "both");
    properties.setProperty("eclipselink.create-ddl-jdbc-file-name", "DDL-create.jdbc");
    properties.setProperty("eclipselink.drop-ddl-jdbc-file-name", "DDL-drop.jdbc");

    jpaPersistModule.properties(properties);

    return jpaPersistModule;
  }

  private void installFactories() {
View Full Code Here

    JpaPersistModule jpaPersistModule = new JpaPersistModule(configuration.getPersistenceType().getUnitName());
    if (configuration.getPersistenceType() == PersistenceType.POSTGRES) {
      Properties properties = new Properties();
      properties.setProperty("javax.persistence.jdbc.user", configuration.getDatabaseUser());
      properties.setProperty("javax.persistence.jdbc.password", configuration.getDatabasePassword());
      jpaPersistModule.properties(properties);
    }

    install(jpaPersistModule);

View Full Code Here

      case IN_MEMORY:
        properties.put("javax.persistence.jdbc.url", Configuration.JDBC_IN_MEMORY_URL);
        properties.put("javax.persistence.jdbc.driver", Configuration.JDBC_IN_MEMROY_DRIVER);
        properties.put("eclipselink.ddl-generation", "drop-and-create-tables");
        properties.put("eclipselink.orm.throw.exceptions", "true");
        jpaPersistModule.properties(properties);
        return jpaPersistModule;
      case REMOTE:
        properties.put("javax.persistence.jdbc.url", configuration.getDatabaseUrl());
        properties.put("javax.persistence.jdbc.driver", configuration.getDatabaseDriver());
        break;
View Full Code Here

    }
    properties.setProperty("eclipselink.ddl-generation.output-mode", "both");
    properties.setProperty("eclipselink.create-ddl-jdbc-file-name", "DDL-create.jdbc");
    properties.setProperty("eclipselink.drop-ddl-jdbc-file-name", "DDL-drop.jdbc");

    jpaPersistModule.properties(properties);

    return jpaPersistModule;
  }

  private void installFactories() {
View Full Code Here

        }

        if (persistenceType == PersistenceType.IN_MEMORY) {
          properties.setProperty("eclipselink.ddl-generation",       "drop-and-create-tables");
          properties.setProperty("eclipselink.orm.throw.exceptions", "true");
          jpaPersistModule.properties(properties);
        } else {
          properties.setProperty("javax.persistence.jdbc.user",   configuration.getDatabaseUser());
          properties.setProperty("javax.persistence.jdbc.password",
              configuration.getProperty(Configuration.SERVER_JDBC_USER_PASSWD_KEY));
View Full Code Here

          }
          properties.setProperty("eclipselink.ddl-generation.output-mode", "both");
          properties.setProperty("eclipselink.create-ddl-jdbc-file-name""DDL-create.jdbc");
          properties.setProperty("eclipselink.drop-ddl-jdbc-file-name",    "DDL-drop.jdbc");

          jpaPersistModule.properties(properties);
        }
      }
      return jpaPersistModule;
    }
  }
View Full Code Here

    JpaPersistModule jpaPersistModule = new JpaPersistModule(configuration.getPersistenceType().getUnitName());
    if (configuration.getPersistenceType() == PersistenceType.POSTGRES) {
      Properties properties = new Properties();
      properties.setProperty("javax.persistence.jdbc.user", configuration.getDatabaseUser());
      properties.setProperty("javax.persistence.jdbc.password", configuration.getDatabasePassword());
      jpaPersistModule.properties(properties);
    }

    install(jpaPersistModule);

View Full Code Here

        }

        if (persistenceType == PersistenceType.IN_MEMORY) {
          properties.setProperty("eclipselink.ddl-generation",       "drop-and-create-tables");
          properties.setProperty("eclipselink.orm.throw.exceptions", "true");
          jpaPersistModule.properties(properties);
        } else {
          properties.setProperty("javax.persistence.jdbc.user",   configuration.getDatabaseUser());
          properties.setProperty("javax.persistence.jdbc.password",
              configuration.getProperty(Configuration.SERVER_JDBC_USER_PASSWD_KEY));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.