Examples of Transient


Examples of javax.persistence.Transient

    return null;
  }
 
  private boolean isTransientField(Field field) {

    Transient t = field.getAnnotation(Transient.class);
    return (t != null);
  }
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            String methodName = method.getName();
            if (!methodName.startsWith("get")) continue;
//            System.out.println("method=" + methodName);
            if (config.isGroovyBeans() && (methodName.equals("getProperty") || methodName.equals("getMetaClass")))
                continue;
            Transient transientM = method.getAnnotation(Transient.class);
            if (transientM != null) continue; // we don't save this one
            ai.addGetter(method);
        }
    }
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

Examples of javax.persistence.Transient

            //unknown annotations are left over
            annotationList.add( annotation );
          }
        }
        preCalculateElementsForProperty( tree );
        Transient transientAnn = getTransient( defaults );
        if ( transientAnn != null ) {
          annotationList.add( transientAnn );
        }
        else {
          if ( defaults.canUseJavaAnnotations() ) {
View Full Code Here

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

    private void toAttributes( final Outline outline, final ClassOutline c, final Attributes attributes )
        throws JAXBException
    {
        if ( c.target.declaresAttributeWildcard() )
        {
            final Transient t = new Transient();
            t.setName( "otherAttributes" );
            attributes.getTransient().add( t );

            this.log( Level.WARNING, "cannotMapProperty", "OtherAttributes", c.implClass.binaryName() );
        }

        for ( FieldOutline f : c.getDeclaredFields() )
        {
            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();
                }
            }

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

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

                attributes.getBasic().add( basic );
                mapped = true;

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

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

                basic.setColumn( defaultColumn );
            }

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

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

                attributes.getVersion().add( version );
                mapped = true;

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

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

                version.setColumn( defaultColumn );
            }

            if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "many-to-one" ) != null )
            {
                final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "many-to-one" );
                final ManyToOne m = JAXB.unmarshal( new DOMSource( pc.element ), ManyToOne.class );

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

                attributes.getManyToOne().add( m );
                mapped = true;

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

            if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "one-to-many" ) != null )
            {
                final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "one-to-many" );
                final OneToMany o = JAXB.unmarshal( new DOMSource( pc.element ), OneToMany.class );

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

                attributes.getOneToMany().add( o );

                this.generateCollectionSetter( f.parent().parent().getCodeModel(), f.parent(), f.getPropertyInfo() );
                mapped = true;

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

            if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "one-to-one" ) != null )
            {
                final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "one-to-one" );
                final OneToOne o = JAXB.unmarshal( new DOMSource( pc.element ), OneToOne.class );

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

                attributes.getOneToOne().add( o );
                mapped = true;

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

            if ( f.getPropertyInfo().getCustomizations().find( ORM_NS, "many-to-many" ) != null )
            {
                final CPluginCustomization pc = f.getPropertyInfo().getCustomizations().find( ORM_NS, "many-to-many" );
                final ManyToMany m = JAXB.unmarshal( new DOMSource( pc.element ), ManyToMany.class );

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

                attributes.getManyToMany().add( m );

                this.generateCollectionSetter( f.parent().parent().getCodeModel(), f.parent(), f.getPropertyInfo() );
                mapped = true;

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

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

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

                attributes.getEmbedded().add( e );
                mapped = true;

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

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

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

                attributes.getTransient().add( t );
                mapped = true;
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.