Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoInheritedField


      while (inhsc != null) {
        for (Object inhsf : inhsc.fields.values()) {
          if (inhsf instanceof SpeedoInheritedField) {
            continue;
          }
                    SpeedoInheritedField sif =
                        sc.inheritance.newSpeedoInheritedField((SpeedoField)inhsf);
                    for (SpeedoColumn scol : sif.inheritedField.columns) {
            SpeedoColumn nscol = (SpeedoColumn) scol.clone();
            nscol.table = sc.mainTable;
            sif.addColumn(nscol);
          }
        }
        inhsc = inhsc.getSuper();
      }
      break;
View Full Code Here


        nbErrors++;
        logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
            + ": overriden attribute does not exist in inherited class - overriding ignored");
        continue;
      }
            SpeedoInheritedField sif = sc.inheritance.newSpeedoInheritedField(inhsf);
      parseOverrideColumn(a.column(), sc, sif);
    }
  }
View Full Code Here

     * Builds, if required, the mapping of an inherited field.
     * @param sif
     */
    private void mapHorizontalInheritedField(SpeedoField sf,
            SpeedoClass sc) throws SpeedoException {
        SpeedoInheritedField sif = (SpeedoInheritedField)
        sc.inheritance.remappedInheritedFields.get(sf.getFQFieldName());
        if (sif == null) {
            sif = sc.inheritance.newSpeedoInheritedField(sf);
        }
        if (sf.jdoTuple == null) {
            SpeedoClass rclass = sf.getReferencedClass();
            //primitive field or simple reference to a persistent class
            if (rclass != null && sf.join != null
                    && sf.relationType == SpeedoField.ONE_ONE_BI_RELATION
                    && sf.mappedByReversefield) {
                // the classref belongs a bidirectionnal relationship
                // ONE-ONE. In addition the foreign key is hold by the table
                // of the referenced class
                setJoinNColsFromParent(sif);
            } else {
                if (sif.columns == null) {
                    // ClassRef or primtive element to map localy
                    for (int i = 0; i < sf.columns.length; i++) {
                        //Same column definition but in the table of the class
                        SpeedoColumn col = (SpeedoColumn) sf.columns[i].clone();
                        col.table = sif.moClass.mainTable;
                        sif.addColumn(col);
                    }
                } else {
                    if (rclass != null) {
                        for (int i = 0; i < sif.columns.length; i++) {
                            computeTargetColumn(sif, i, rclass);
View Full Code Here

    String im = sc.getExtensionValueByKey(SpeedoProperties.INHERITANCE_MAPPING);

    // Map the inherited field if required
    if (sc.inheritance.isHorizontalMapping()) {
        for (Iterator it = sc.inheritance.remappedInheritedFields.values().iterator(); it.hasNext();) {
                SpeedoInheritedField sif = (SpeedoInheritedField) it.next();
        if (debug) {
          logger.log(BasicLevel.DEBUG, "Map the inherited field '"
            + sif.name + "'.");
        }
                TypedElement te = sif.inheritedField.moClass.jormclass.getTypedElement(sif.inheritedField.name);
View Full Code Here

      SpeedoNoFieldColumn sc = (SpeedoNoFieldColumn) se;
      // In EJB3, type may be one of {"Ljava.lang.String;", "", ""}.
      //sc.type = ;
      //sc.column = ;
    } else if (se instanceof SpeedoInheritedField) {
      SpeedoInheritedField shf = (SpeedoInheritedField) se;
      shf.name = null;
      shf.columns = null;
      shf.inheritedField = null;
      shf.join = null;
      shf.moClass = null;
View Full Code Here

      SpeedoNoFieldColumn sc = (SpeedoNoFieldColumn) se;
      // In EJB3, type may be one of {"Ljava.lang.String;", "", ""}.
      //sc.type = ;
      //sc.column = ;
    } else if (se instanceof SpeedoInheritedField) {
      SpeedoInheritedField shf = (SpeedoInheritedField) se;
      shf.name = null;
      shf.columns = null;
      shf.inheritedField = null;
      shf.join = null;
      shf.moClass = null;
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.metadata.SpeedoInheritedField

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.