Package net.sourceforge.jpaxjc.ns.persistence.orm

Examples of net.sourceforge.jpaxjc.ns.persistence.orm.Entity


    {
        if ( !this.mappedClasses.contains( c.implClass.binaryName() ) )
        {
            boolean mapped = false;

            Entity entity = null;
            if ( c.target.getCustomizations().find( ORM_NS, "entity" ) != null )
            {
                final CPluginCustomization pc = c.target.getCustomizations().find( ORM_NS, "entity" );
                entity = JAXB.unmarshal( new DOMSource( pc.element ), Entity.class );

                orm.getEntity().add( entity );
                this.toEntity( outline, c, entity );

                mapped = true;

                if ( !pc.isAcknowledged() )
                {
                    pc.markAsAcknowledged();
                }
            }

            if ( !mapped )
            {
                // Defaults to create an entity per class.
                entity = new Entity();
                String name = c.implClass.binaryName();
                entity.setClazz( name );

                final String pkgName = c.implClass.getPackage().name();
                if ( pkgName != null && pkgName.length() > 0 )
                {
                    name = name.substring( pkgName.length() + 1 );
                }

                entity.setName( name );
                orm.getEntity().add( entity );
                this.toEntity( outline, c, entity );
                mapped = true;
            }

            this.mappedClasses.add( entity.getClazz() );
        }
    }
View Full Code Here


                    orm.getMappedSuperclass().add( e );
                    acknowledge = true;
                }
                else if ( c.element.getLocalName().equals( "entity" ) )
                {
                    final Entity e = JAXB.unmarshal( new DOMSource( c.element ), Entity.class );
                    orm.getEntity().add( e );
                    acknowledge = true;
                }
                else if ( c.element.getLocalName().equals( "embeddable" ) )
                {
View Full Code Here

TOP

Related Classes of net.sourceforge.jpaxjc.ns.persistence.orm.Entity

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.