Package org.hibernate.jpamodelgen.xml.jaxb

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


    this.clazzName = embeddable.getClazz();
    this.packageName = packageName;
    this.context = context;
    this.importContext = new ImportContextImpl( getPackageName() );
    this.element = element;
    EmbeddableAttributes attributes = embeddable.getAttributes();

    XmlMetaSingleAttribute attribute;
    for ( Basic basic : attributes.getBasic() ) {
      attribute = new XmlMetaSingleAttribute( this, basic.getName(), getType( basic.getName(), null ) );
      members.add( attribute );
    }

    for ( ManyToOne manyToOne : attributes.getManyToOne() ) {
      attribute = new XmlMetaSingleAttribute(
          this, manyToOne.getName(), getType( manyToOne.getName(), manyToOne.getTargetEntity() )
      );
      members.add( attribute );
    }

    for ( OneToOne oneToOne : attributes.getOneToOne() ) {
      attribute = new XmlMetaSingleAttribute(
          this, oneToOne.getName(), getType( oneToOne.getName(), oneToOne.getTargetEntity() )
      );
      members.add( attribute );
    }

    XmlMetaCollection metaCollection;
    for ( OneToMany oneToMany : attributes.getOneToMany() ) {
      String[] types = getCollectionType( oneToMany.getName(), oneToMany.getTargetEntity() );
      metaCollection = new XmlMetaCollection( this, oneToMany.getName(), types[0], types[1] );
      members.add( metaCollection );
    }

    for ( ElementCollection collection : attributes.getElementCollection() ) {
      String[] types = getCollectionType( collection.getName(), collection.getTargetClass() );
      metaCollection = new XmlMetaCollection( this, collection.getName(), types[0], types[1] );
      members.add( metaCollection );
    }
  }
View Full Code Here


  public XmlMetaEntity(Embeddable embeddable, String packageName, TypeElement element) {
    this.clazzName = embeddable.getClazz();
    this.packageName = packageName;
    importContext = new ImportContextImpl( getPackageName() );
    this.element = element;
    EmbeddableAttributes attributes = embeddable.getAttributes();

    XmlMetaSingleAttribute attribute;
    for ( Basic basic : attributes.getBasic() ) {
      attribute = new XmlMetaSingleAttribute( this, basic.getName(), getType( basic.getName() ) );
      members.add( attribute );
    }

    for ( ManyToOne manyToOne : attributes.getManyToOne() ) {
      attribute = new XmlMetaSingleAttribute( this, manyToOne.getName(), getType( manyToOne.getName() ) );
      members.add( attribute );
    }

    for ( OneToOne oneToOne : attributes.getOneToOne() ) {
      attribute = new XmlMetaSingleAttribute( this, oneToOne.getName(), getType( oneToOne.getName() ) );
      members.add( attribute );
    }

    XmlMetaCollection metaCollection;
    for ( OneToMany oneToMany : attributes.getOneToMany() ) {
      String[] types = getCollectionType( oneToMany.getName() );
      metaCollection = new XmlMetaCollection( this, oneToMany.getName(), types[0], types[1] );
      members.add( metaCollection );
    }

    for ( ElementCollection collection : attributes.getElementCollection() ) {
      String[] types = getCollectionType( collection.getName() );
      metaCollection = new XmlMetaCollection( this, collection.getName(), types[0], types[1] );
      members.add( metaCollection );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.jpamodelgen.xml.jaxb.EmbeddableAttributes

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.