Package javax.persistence

Examples of javax.persistence.OneToMany.mappedBy()


              Class<?> _targetClass = ClassUtil
                  .getGenericType(_f);
              if (!clazz.getName().equals(_targetClass.getName()))
                continue;

              String relProperty = oneManyAnn.mappedBy();
              if (relProperty == null
                  || relProperty.trim().length() == 0)
                relProperty = ORMConfigBeanUtil.getIdField(_f
                    .getType());
View Full Code Here


          Object tarObj = tarList.get(i);

          if (tarObj == null)
            continue;

          String tarRelColumn = ann.mappedBy();
          if (tarRelColumn == null)
            continue;

          String tarIdColumn = ORMConfigBeanUtil.getIdColumn(tarObj
              .getClass());
View Full Code Here

          continue;
      }

      Class<?> tarClass = ann.targetEntity();
      String tarTable = ORMConfigBeanUtil.getTable(tarClass);
      String column = ann.mappedBy();
     
      List<?> tarList = null;

      try {
        tarList = (List<?>) tarGetter.invoke(t);
View Full Code Here

          continue;
      }

      Class<?> tarClass = ann.targetEntity();
      String tarTable = ORMConfigBeanUtil.getTable(tarClass);
      String rel = ann.mappedBy();
      String sql = String.format(format, tarTable, rel);
      List<?> tarList = DAOFactory.getSelectDAO(dsName).selectBySQL(
          tarClass, sql, idVal);
      if (tarList == null)
        continue;
View Full Code Here

            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(
View Full Code Here

        globalCfg.isGlobalWithModifiedFlag() : aud.withModifiedFlag();
  }

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

  private void setPropertyAuditMappedBy(XProperty property, PropertyAuditingData propertyData) {
View Full Code Here

  }

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

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

    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

          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

    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

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.