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

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


            boolean mapped = false;

            if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "id" ) != null )
            {
                final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "id" );
                final Id id = JAXB.unmarshal( new DOMSource( pc.element ), Id.class );

                if ( id.getName() == null )
                {
                    id.setName( f.getPropertyInfo().getName( false ) );
                }

                attributes.getId().add( id );
                mapped = true;

                final Column defaultColumn =
                    this.applySchemaDefaults( f.getPropertyInfo().getSchemaComponent(), id.getColumn() );

                id.setColumn( defaultColumn );

                if ( !pc.isAcknowledged() )
                {
                    pc.markAsAcknowledged();
                }
View Full Code Here


                        final Attributes attr = getAttributes( orm, c.getSuperClass().implClass.binaryName() );
                        recurseAddId( orm, attr, c.getSuperClass() );
                    }
                    else
                    {
                        final Id id = new Id();
                        final GeneratedValue gv = new GeneratedValue();
                        final Column col = new Column();
                        a.getId().add( id );

                        gv.setStrategy( GenerationType.AUTO );
                        col.setScale( 0 );
                        col.setPrecision( 20 );
                        col.setNullable( false );
                        id.setName( "jpaId" );
                        id.setGeneratedValue( gv );
                        id.setColumn( col );

                        generateProperty( id.getName(), Long.TYPE, c );
                    }
                }
            }

            void recurseAddVersion( final EntityMappings orm, final Attributes a, final ClassOutline c )
View Full Code Here

                        final Attributes attr = getAttributes( orm, c.getSuperClass().implClass.binaryName() );
                        recurseAddId( orm, attr, c.getSuperClass() );
                    }
                    else
                    {
                        final Id id = new Id();
                        final GeneratedValue gv = new GeneratedValue();
                        final Column col = new Column();
                        a.getId().add( id );

                        gv.setStrategy( GenerationType.AUTO );
                        col.setScale( 0 );
                        col.setPrecision( 20 );
                        col.setNullable( false );
                        id.setName( "jpaId" );
                        id.setGeneratedValue( gv );
                        id.setColumn( col );

                        generateProperty( id.getName(), Long.TYPE, c );
                    }
                }
            }
View Full Code Here

TOP

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

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.