Examples of Persistence


Examples of org.apache.openejb.jee.jpa.unit.Persistence

       
        PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        ClassLoader cl = this.getClass().getClassLoader();
        AppModule app = new AppModule(cl, "orange-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, null, "orange-id"));

        // Create app
View Full Code Here

Examples of org.apache.openejb.jee.jpa.unit.Persistence

       
        PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        ClassLoader cl = this.getClass().getClassLoader();
        AppModule app = new AppModule(cl, "orange-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

        // Create app
View Full Code Here

Examples of org.apache.openejb.jee.jpa.unit.Persistence

       
        PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        ClassLoader cl = this.getClass().getClassLoader();
        AppModule app = new AppModule(cl, "orange-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-id"));

        // Create app
View Full Code Here

Examples of org.apache.openejb.jee.jpa.unit.Persistence

       
        PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        ClassLoader cl = this.getClass().getClassLoader();
        AppModule app = new AppModule(cl, "orange-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

        // Create app
View Full Code Here

Examples of org.apache.openejb.jee.jpa.unit.Persistence

       
        PersistenceUnit persistenceUnit = new PersistenceUnit("orange-unit");

        ClassLoader cl = this.getClass().getClassLoader();
        AppModule app = new AppModule(cl, "orange-app");
        app.getPersistenceModules().add(new PersistenceModule("root", new Persistence(persistenceUnit)));
        WebApp webApp = new WebApp();
        webApp.setMetadataComplete(true);
        app.getWebModules().add(new WebModule(webApp, "orange-web", cl, "war", "orange-web"));

        // Create app
View Full Code Here

Examples of org.exolab.castor.persist.spi.Persistence

        if (!(clsDesc.hasNature(ClassDescriptorJDONature.class.getName()))) {
            return null;
        }
       
        try {
            Persistence sqlEngine = (SQLEngine) _classDescriptorToPersistence.get(clsDesc);
            if (sqlEngine == null) {
                sqlEngine = new SQLEngine(clsDesc, this, null);
                _classDescriptorToPersistence.put(clsDesc, sqlEngine);
            }
            return sqlEngine;
View Full Code Here

Examples of org.hibernate.jpamodelgen.xml.jaxb.Persistence

  }

  private Collection<String> determineMappingFileNames() {
    Collection<String> mappingFileNames = new ArrayList<String>();

    Persistence persistence = getPersistence();
    if ( persistence != null ) {
      // get mapping file names from persistence.xml
      List<Persistence.PersistenceUnit> persistenceUnits = persistence.getPersistenceUnit();
      for ( Persistence.PersistenceUnit unit : persistenceUnits ) {
        mappingFileNames.addAll( unit.getMappingFile() );
      }
    }
View Full Code Here

Examples of org.hibernate.jpamodelgen.xml.jaxb.Persistence

    mappingFileNames.addAll( context.getOrmXmlFiles() );
    return mappingFileNames;
  }

  private Persistence getPersistence() {
    Persistence persistence = null;
    String persistenceXmlLocation = context.getPersistenceXmlLocation();
    InputStream stream = xmlParserHelper.getInputStreamForResource( persistenceXmlLocation );
    if ( stream == null ) {
      return null;
    }
View Full Code Here

Examples of org.hibernate.jpamodelgen.xml.jaxb.Persistence

  public XmlParser(Context context) {
    this.context = context;
  }

  public void parsePersistenceXml() {
    Persistence persistence = parseXml( PERSISTENCE_XML, Persistence.class, PERSISTENCE_XML_XSD );
    if ( persistence != null ) {
      List<Persistence.PersistenceUnit> persistenceUnits = persistence.getPersistenceUnit();
      for ( Persistence.PersistenceUnit unit : persistenceUnits ) {
        List<String> mappingFiles = unit.getMappingFile();
        for ( String mappingFile : mappingFiles ) {
          parsingOrmXml( mappingFile );
        }
View Full Code Here

Examples of org.hibernate.jpamodelgen.xml.jaxb.Persistence

  }

  private Collection<String> determineMappingFileNames() {
    Collection<String> mappingFileNames = new ArrayList<String>();

    Persistence persistence = parseXml(
        context.getPersistenceXmlLocation(), Persistence.class, PERSISTENCE_XML_XSD
    );
    if ( persistence != null ) {
      List<Persistence.PersistenceUnit> persistenceUnits = persistence.getPersistenceUnit();
      for ( Persistence.PersistenceUnit unit : persistenceUnits ) {
        mappingFileNames.addAll( unit.getMappingFile() );
      }
    }
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.