Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoNoFieldColumn


      sc.inheritance.discriminator = new SpeedoDiscriminator();
      String cn = a.name();
      if (cn.equals("")) {
        cn = "TYPE"; // Default name of the discriminator column
      }
      SpeedoNoFieldColumn snofc = new SpeedoNoFieldColumn();
      SpeedoColumn scol = sc.getColumn(cn, true);
      if (scol == null) {
        // There is no existing column: create one
        scol = new SpeedoColumn();
        scol.name = cn;
View Full Code Here


  private void parseDiscriminatorValue(Class c, SpeedoClass sc) {
    DiscriminatorValue a = (DiscriminatorValue) c.getAnnotation(DiscriminatorValue.class);
    if (a == null) {
      return;
    }
    SpeedoNoFieldColumn snofc = (SpeedoNoFieldColumn) sc.getAncestor().inheritance.discriminator.elements.get(0);
    if (a.value().equals("")) {
      sc.inheritance.discriminatorValues.put(snofc, SpeedoInheritance.SPEEDO_DEFAULT_DISCRIMINENT_VALUE);
    } else {
      sc.inheritance.discriminatorValues.put(snofc, a.value());
    }
View Full Code Here

      sc.inheritance.clazz = sc;
      sc.inheritance.superClassName = null;
    }
    switch (a.strategy()) {
    case SINGLE_TABLE: // filtered inheritance mapping
      SpeedoNoFieldColumn snofc;
      if (sc.inheritance.join != null) {
        logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
            + ": no join column definition required for SINGLE_TABLE strategy inheritance - ignored!");
        sc.inheritance.join = null;
      }
View Full Code Here

            return;
        }
        for (Iterator it = oldsd.elements.iterator(); it.hasNext();) {
            SpeedoElement oldse = (SpeedoElement) it.next();
            if (oldse instanceof SpeedoNoFieldColumn) {
                SpeedoNoFieldColumn snfc = (SpeedoNoFieldColumn) oldse;
                SpeedoElement inheritedse = null;
                for (Iterator it2 = sd.elements.iterator(); inheritedse == null && it2.hasNext();) {
                    SpeedoElement currentse = (SpeedoElement) it2.next();
                    if (currentse instanceof SpeedoNoFieldColumn) {
                        if (snfc.column.name.equals(
View Full Code Here

                                    + JormPathHelper.getPath(clazz) + "'.");
                }
                //find the corresponding Speedo meta object.
                SpeedoField sf = sc.getField(pe.getName());
                if (sf == null) {
                    SpeedoNoFieldColumn col = getIdentityColumn(sc.identity, pe
                            .getName());
                    if (col != null) {
                        //column name is specified for the field
                        createFieldMapping(pe, col.column.name,
                                col.column.sqlType, rcm.getMainRdbTable(),
View Full Code Here

    } else if (se instanceof SpeedoDiscriminator) {
      SpeedoDiscriminator sd = (SpeedoDiscriminator) se;
      sd.elements = new ArrayList();
      sd.strategy  = SpeedoDiscriminator.STRATEGY_NONE;
    } else if (se instanceof SpeedoNoFieldColumn) {
      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;
View Full Code Here

    } else if (se instanceof SpeedoDiscriminator) {
      SpeedoDiscriminator sd = (SpeedoDiscriminator) se;
      sd.elements = new ArrayList();
      sd.strategy  = SpeedoDiscriminator.STRATEGY_NONE;
    } else if (se instanceof SpeedoNoFieldColumn) {
      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;
View Full Code Here

               
            } else {
                //column definition on abstract class
            }
        }
        SpeedoNoFieldColumn snfc = new SpeedoNoFieldColumn();
        snfc.column = col;
        inh.discriminator.elements.add(snfc);
        if (val != null) {
            if (inh.discriminatorValues == null) {
                inh.discriminatorValues = new HashMap();
View Full Code Here

TOP

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

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.