Examples of PersistentClass


Examples of org.hibernate.mapping.PersistentClass

    if ( persistentClass.hasPojoRepresentation() ) {
      //TODO: this is currently specific to pojos, but need to be available for all entity-modes
      Iterator iter = persistentClass.getSubclassIterator();
      while ( iter.hasNext() ) {
        PersistentClass pc = ( PersistentClass ) iter.next();
        entityNameBySubclass.put( pc.getMappedClass(), pc.getEntityName() );
      }
    }
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    int batch = persistentClass.getBatchSize();
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

    Map components = new HashMap();
   
    for (Iterator classes = cfg.getClassMappings(); classes.hasNext(); ) {
        if(exporter.startMapping(cfg) ) {
            PersistentClass clazz = (PersistentClass) classes.next();
            collectComponents(components,clazz);
           
            if(exporter.startPersistentClass(clazz) ) {
                if(clazz.hasIdentifierProperty() ) {
                    exporter.startIdentifierProperty(clazz.getIdentifierProperty() );
                    exporter.endIdentifierProperty(clazz.getIdentifierProperty() );
                }
                else if (clazz.hasEmbeddedIdentifier() ) {
            exporter.startEmbeddedIdentifier( (Component)clazz.getKey() );
            exporter.endEmbeddedIdentifier( (Component)clazz.getKey() );
                }
                Iterator unjoinedPropertyIterator = clazz.getUnjoinedPropertyIterator();
                while(unjoinedPropertyIterator.hasNext() ) {
                    Property prop = (Property)unjoinedPropertyIterator.next();
                    exporter.startProperty(prop);
                    exporter.endProperty(prop);
                }
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

      columnIterator = property.getColumnIterator();
    }

    if(property.getValue() instanceof ToOne) {
      String referencedEntityName = ((ToOne)property.getValue()).getReferencedEntityName();
      PersistentClass target = cfg.getClassMapping(referencedEntityName);
      if(target!=null) {
        referencedColumnsIterator = target.getKey().getColumnIterator();
      }
    }

    StringBuffer annotations = new StringBuffer( "    " );
    if ( span == 1 ) {
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

    Set joinColumns = new HashSet();
    while ( joinColumnsIt.hasNext() ) {
      joinColumns.add( joinColumnsIt.next() );
    }
    ManyToOne manyToOne = (ManyToOne) collection.getElement();
    PersistentClass pc = cfg.getClassMapping( manyToOne.getReferencedEntityName() );
    Iterator properties = pc.getPropertyClosureIterator();
    //TODO we should check the table too
    boolean isOtherSide = false;
    mappedBy = "unresolved";
    while ( ! isOtherSide && properties.hasNext() ) {
      Property collectionProperty = (Property) properties.next();
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

    Set joinColumns = new HashSet();
    while ( joinColumnsIt.hasNext() ) {
      joinColumns.add( joinColumnsIt.next() );
    }
    OneToMany oneToMany = (OneToMany) collection.getElement();
    PersistentClass pc = cfg.getClassMapping( oneToMany.getReferencedEntityName() );
    Iterator properties = pc.getPropertyClosureIterator();
    //TODO we should check the table too
    boolean isOtherSide = false;
    mappedBy = "unresolved";
    while ( ! isOtherSide && properties.hasNext() ) {
      Property manyProperty = (Property) properties.next();
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

    Iterator joinColumnsIt = oneToOne.getColumnIterator();
    Set joinColumns = new HashSet();
    while ( joinColumnsIt.hasNext() ) {
      joinColumns.add( joinColumnsIt.next() );
    }
    PersistentClass pc = cfg.getClassMapping( oneToOne.getReferencedEntityName() );
    String referencedPropertyName = oneToOne.getReferencedPropertyName();
    if ( referencedPropertyName != null )
      return referencedPropertyName;

    Iterator properties = pc.getPropertyClosureIterator();
    //TODO we should check the table too
    boolean isOtherSide = false;
    mappedBy = "unresolved";

View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

        }
       
    if(getConfiguration()!=null) {
        Iterator classMappings = getConfiguration().getClassMappings();
        while (classMappings.hasNext() ) {
            PersistentClass element = (PersistentClass) classMappings.next();
            if(element instanceof RootClass) {
                dump(pw, ejb3, element);
            }
        }
    }
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

      pw.println("<mapping resource=\"" + getMappingFileResource(element) + "\"/>");
    }
     
    Iterator directSubclasses = element.getDirectSubclasses();
    while (directSubclasses.hasNext() ) {
      PersistentClass subclass = (PersistentClass) directSubclasses.next();
      dump(pw, useClass, subclass);   
    }
   
  }
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

       
        Map components = new HashMap();

        Iterator classesItr = cfg.getClassMappings();
        while (classesItr.hasNext() ) {
            PersistentClass clazz = (PersistentClass) classesItr.next();
           
            POJOClass pojoClazz = cfg2JavaTool.getPOJOClass(clazz);
            ConfigurationNavigator.collectComponents(components, pojoClazz);           
           
            this.processClass(pojoClazz);
           
            Iterator properties = clazz.getPropertyIterator();
            while (properties.hasNext() ) {
                Property property = (Property) properties.next();
                Value value = property.getValue();               
                List props = (List) propsByValue.get(value);
                if (props == null) {
View Full Code Here

Examples of org.hibernate.mapping.PersistentClass

    if(entityName==null) {
      throw new MappingException( "<return alias='" + alias + "'> must specify either a class or entity-name");
    }
    LockMode lockMode = getLockMode( returnElem.attributeValue( "lock-mode" ) );

    PersistentClass pc = mappings.getClass( entityName );
    java.util.Map propertyResults = bindPropertyResults(alias, returnElem, pc, mappings );

    return new NativeSQLQueryRootReturn(
        alias,
        entityName,
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.