Package com.sun.codemodel

Examples of com.sun.codemodel.JAnnotationUse.param()


        for ( PrimaryKeyJoinColumn jc : cols )
        {
            final JAnnotationUse jca = a.annotate( cm.ref( javax.persistence.PrimaryKeyJoinColumn.class ) );
            if ( jc.getColumnDefinition() != null )
            {
                jca.param( "columnDefinition", jc.getColumnDefinition() );
            }
            if ( jc.getName() != null )
            {
                jca.param( "name", jc.getName() );
            }
View Full Code Here


            {
                jca.param( "columnDefinition", jc.getColumnDefinition() );
            }
            if ( jc.getName() != null )
            {
                jca.param( "name", jc.getName() );
            }
            if ( jc.getReferencedColumnName() != null )
            {
                jca.param( "referenceColumnName", jc.getReferencedColumnName() );
            }
View Full Code Here

            {
                jca.param( "name", jc.getName() );
            }
            if ( jc.getReferencedColumnName() != null )
            {
                jca.param( "referenceColumnName", jc.getReferencedColumnName() );
            }
        }
    }

    private void annotate( final JAnnotationUse a, final SequenceGenerator gen )
View Full Code Here

            if ( i.getGeneratedValue() != null )
            {
                final JAnnotationUse gv = getter.annotate( cm.ref( javax.persistence.GeneratedValue.class ) );
                if ( i.getGeneratedValue().getGenerator() != null )
                {
                    gv.param( "generator", i.getGeneratedValue().getGenerator() );
                }
                if ( i.getGeneratedValue().getStrategy() != null )
                {
                    gv.param( "strategy", javax.persistence.GenerationType.valueOf(
                        i.getGeneratedValue().getStrategy().value() ) );
View Full Code Here

                {
                    gv.param( "generator", i.getGeneratedValue().getGenerator() );
                }
                if ( i.getGeneratedValue().getStrategy() != null )
                {
                    gv.param( "strategy", javax.persistence.GenerationType.valueOf(
                        i.getGeneratedValue().getStrategy().value() ) );

                }
            }
            if ( i.getSequenceGenerator() != null )
View Full Code Here

                this.annotate( gen, i.getTableGenerator() );
            }
            if ( i.getTemporal() != null )
            {
                final JAnnotationUse temp = getter.annotate( cm.ref( javax.persistence.Temporal.class ) );
                temp.param( "value", javax.persistence.TemporalType.valueOf( i.getTemporal().value() ) );
            }
        }

        for ( ManyToMany m : a.getManyToMany() )
        {
View Full Code Here

            {
                this.annotate( m2m, m.getCascade() );
            }
            if ( m.getFetch() != null )
            {
                m2m.param( "fetch", javax.persistence.FetchType.valueOf( m.getFetch().value() ) );
            }
            if ( m.getJoinTable() != null )
            {
                final JAnnotationUse jt = getter.annotate( cm.ref( javax.persistence.JoinTable.class ) );
                this.annotate( cm, jt, m.getJoinTable() );
View Full Code Here

                this.annotate( cm, jt, m.getJoinTable() );
            }
            if ( m.getMapKey() != null )
            {
                final JAnnotationUse mk = getter.annotate( cm.ref( javax.persistence.MapKey.class ) );
                mk.param( "name", m.getMapKey().getName() );
            }
            if ( m.getMappedBy() != null )
            {
                m2m.param( "mappedBy", m.getMappedBy() );
            }
View Full Code Here

                m2m.param( "mappedBy", m.getMappedBy() );
            }
            if ( m.getOrderBy() != null )
            {
                final JAnnotationUse ob = getter.annotate( cm.ref( javax.persistence.OrderBy.class ) );
                ob.param( "value", m.getOrderBy() );
            }
            if ( m.getTargetEntity() != null )
            {
                m2m.param( "targetEntity", cm.ref( m.getTargetEntity() ) );
            }
View Full Code Here

            {
                this.annotate( m2o, m.getCascade() );
            }
            if ( m.getFetch() != null )
            {
                m2o.param( "fetch", javax.persistence.FetchType.valueOf( m.getFetch().value() ) );
            }
            if ( !m.getJoinColumn().isEmpty() )
            {
                for ( JoinColumn jc : m.getJoinColumn() )
                {
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.