Examples of mappedBy()


Examples of javax.persistence.OneToMany.mappedBy()

  }

    private void setPropertyRelationMappedBy(XProperty property, PropertyAuditingData propertyData) {
        OneToMany oneToMany = property.getAnnotation(OneToMany.class);
        if (oneToMany != null && !"".equals(oneToMany.mappedBy())) {
            propertyData.setRelationMappedBy(oneToMany.mappedBy());
        }
    }

  private void setPropertyAuditMappedBy(XProperty property, PropertyAuditingData propertyData) {
        AuditMappedBy auditMappedBy = property.getAnnotation(AuditMappedBy.class);
View Full Code Here

Examples of javax.persistence.OneToMany.mappedBy()

    else if ( joinColumns == null &&
        ( property.isAnnotationPresent( OneToMany.class )
            || property.isAnnotationPresent( CollectionOfElements.class ) ) ) {
      OneToMany oneToMany = property.getAnnotation( OneToMany.class );
      String mappedBy = oneToMany != null ?
          oneToMany.mappedBy() :
          "";
      joinColumns = Ejb3JoinColumn.buildJoinColumns(
          (JoinColumn[]) null,
          mappedBy, entityBinder.getSecondaryTables(),
          propertyHolder, inferredData.getPropertyName(), mappings
View Full Code Here

Examples of javax.persistence.OneToMany.mappedBy()

          if ( column.isSecondary() ) {
            throw new NotYetImplementedException( "Collections having FK in secondary table" );
          }
        }
        collectionBinder.setFkJoinColumns( joinColumns );
        mappedBy = oneToManyAnn.mappedBy();
        collectionBinder.setTargetEntity(
            mappings.getReflectionManager().toXClass( oneToManyAnn.targetEntity() )
        );
        collectionBinder.setCascadeStrategy( getCascadeStrategy( oneToManyAnn.cascade(), hibernateCascade ) );
        collectionBinder.setOneToMany( true );
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

   
    ClassProperty type = definition.getProperty();
    if (type != null) {
      OneToOne oto = type.getAnnotation(OneToOne.class);
      if (oto != null) {
        if ("".equals( oto.mappedBy() )) translate = true; else return new XMLDocumentElementNoOp(parent, definition);
      }
      else if (type.getAnnotation(ManyToOne.class) != null) translate = true;
      else if (type.getAnnotation(OneToMany.class) != null) return new XMLDocumentElementNoOp(parent, definition);
      else if (type.getAnnotation(ManyToMany.class) != null) return new XMLDocumentElementNoOp(parent, definition);
     
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

      }
    }
    else {
      OneToOne oneToOneAnn = property.getAnnotation( OneToOne.class );
      String mappedBy = oneToOneAnn != null ?
          oneToOneAnn.mappedBy() :
          null;
      joinColumns = Ejb3JoinColumn.buildJoinColumns(
          null,
          mappedBy, entityBinder.getSecondaryTables(),
          propertyHolder, inferredData.getPropertyName(), mappings
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

            getFetchMode( ann.fetch() ),
            ignoreNotFound, onDeleteCascade,
            ToOneBinder.getTargetEntity( inferredData, mappings ),
            propertyHolder,
            inferredData,
            ann.mappedBy(),
            trueOneToOne,
            isIdentifierMapper,
            inSecondPass,
            propertyBinder,
            mappings
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

        }
      }
      else {
        OneToOne oneToOneAnn = property.getAnnotation( OneToOne.class );
        String mappedBy = oneToOneAnn != null ?
            oneToOneAnn.mappedBy() :
            null;
        joinColumns = Ejb3JoinColumn.buildJoinColumns(
            (JoinColumn[]) null,
            mappedBy, entityBinder.getSecondaryTables(),
            propertyHolder, inferredData.getPropertyName(), mappings
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

          ann.optional(),
          getFetchMode( ann.fetch() ),
          ignoreNotFound, onDeleteCascade,
          mappings.getReflectionManager().toXClass( ann.targetEntity() ),
          propertyHolder,
          inferredData, ann.mappedBy(), trueOneToOne, isIdentifierMapper, inSecondPass, mappings
      );
    }
    else if ( property.isAnnotationPresent( org.hibernate.annotations.Any.class ) ) {

      //check validity
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

            getFetchMode( ann.fetch() ),
            ignoreNotFound, onDeleteCascade,
            ToOneBinder.getTargetEntity( inferredData, mappings ),
            propertyHolder,
            inferredData,
            ann.mappedBy(),
            trueOneToOne,
            isIdentifierMapper,
            inSecondPass,
            propertyBinder,
            mappings
View Full Code Here

Examples of javax.persistence.OneToOne.mappedBy()

            getFetchMode( ann.fetch() ),
            ignoreNotFound, onDeleteCascade,
            ToOneBinder.getTargetEntity( inferredData, mappings ),
            propertyHolder,
            inferredData,
            ann.mappedBy(),
            trueOneToOne,
            isIdentifierMapper,
            inSecondPass,
            propertyBinder,
            mappings
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.