Package org.hibernate.jpamodelgen.xml.jaxb

Examples of org.hibernate.jpamodelgen.xml.jaxb.Persistence$PersistenceUnit$Properties


        Property[] properties = new Property[3];
        properties[0] = new Property(SystemStatistics.ORGANIZATION_COUNT.name(), Long.toString(organizationService.countAll()), SystemStatistics.ORGANIZATION_COUNT.getDescription());
        properties[1] = new Property(SystemStatistics.USER_COUNT.name(), Long.toString(userService.countAll()), SystemStatistics.USER_COUNT.getDescription());
        properties[2] = new Property(SystemStatistics.APPLICATION_COUNT.name(), Long.toString(applicationService.countAll()), SystemStatistics.APPLICATION_COUNT.getDescription());

        Properties props = new Properties();
        props.setProperties(properties);

        return props;
    }
View Full Code Here


  }

  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

    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

  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

  }

  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

  }

  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

  }

  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

    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

  }

  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

  }

  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

Related Classes of org.hibernate.jpamodelgen.xml.jaxb.Persistence$PersistenceUnit$Properties

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.