Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoColumn


    private void visitGenClassIndex(SpeedoField sf) throws SpeedoException {
        if (sf.jdoTuple instanceof SpeedoCollection) {
            SpeedoCollection collec = (SpeedoCollection) sf.jdoTuple;
            if (collec.indexColumns == null
                    && List.class.isAssignableFrom(getGCClass(sf))) {
                collec.indexColumns = new SpeedoColumn("idx", sf.join.extTable);
                if (logger.isLoggable(BasicLevel.DEBUG)) {
                    logger.log(BasicLevel.DEBUG,
                            "\t\t\tCreate column for the list index"
                        + collec.indexColumns.toString());
                }
            }
        } else if (sf.jdoTuple instanceof SpeedoMap) {
            SpeedoMap map = (SpeedoMap) sf.jdoTuple;
            if (map.keyColumns == null) {
                map.keyColumns = new SpeedoColumn("idx", sf.join.extTable);
                if (logger.isLoggable(BasicLevel.DEBUG)) {
                    logger.log(BasicLevel.DEBUG, "\t\t\tCreate column for the map key"
                        + map.keyColumns.toString());
                }
            }
View Full Code Here


    private void visitGenClassElement(SpeedoField sf) throws SpeedoException {
        SpeedoClass rclass = sf.getReferencedClass();
        if (sf.columns == null) {
          if (rclass == null) {
              //primitive element
              sf.addColumn(new SpeedoColumn("element", sf.join.extTable));
          } else {
              logger.log(BasicLevel.DEBUG, "\t\tfield '" + sf.name
                      + "' requires pk fields of the class "
                      + rclass.getFQName());
                visitSpeedoClass(rclass, VisitRequired.BASE);
View Full Code Here

            } 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) {
View Full Code Here

        Map map = getPk2Fk(pk2tfk);
        SpeedoColumn[] columns = new SpeedoColumn[map.size()];
        int i = 0;
        for (Iterator it = map.entrySet().iterator(); it.hasNext();) {
            Map.Entry me = (Map.Entry) it.next();
            columns[i] = new SpeedoColumn();
            columns[i].name = (String) me.getValue();
            columns[i].table = table;
            columns[i].targetColumn = (String) me.getKey();
            if (rclass != null) {
                SpeedoColumn pkcol = rclass.getColumn(columns[i].targetColumn, true);
                if (pkcol != null) {
                  columns[i].sqlType = pkcol.sqlType;
                  columns[i].scale = pkcol.scale;
                  columns[i].length = pkcol.length;
                }
View Full Code Here

            }
        }
        return null;
    }
    public SpeedoColumn[] getDefaultColumn(SpeedoClass sc) {
        return new SpeedoColumn[] {new SpeedoColumn("lid")};
    }
View Full Code Here

      sj.extTable = null;
      sj.mainTable = null;
      sj.columns = new ArrayList();
      sj.deleteAction = SpeedoJoin.ACTION_NONE;
    } else if (se instanceof SpeedoColumn) {
      SpeedoColumn sc = (SpeedoColumn) se;
      sc.allowNull = true;
      sc.defaultValue = null;
      sc.jdbcType = null;
      sc.length = -1;
      sc.name = null;
View Full Code Here

    }
  }
  public void setCache(CacheManager cache) {
  }
    public SpeedoColumn[] getDefaultColumn(SpeedoClass sc) {
        return new SpeedoColumn[] {new SpeedoColumn(getHiddenLidFieldName())};
    }
View Full Code Here

    public NamingManager.NamingField[] getNamingfields(SpeedoClass sc) {
        return null;
    }
    public SpeedoColumn[] getDefaultColumn(SpeedoClass sc) {
        SpeedoColumn[] cols = new SpeedoColumn[] {
                new SpeedoColumn(), new SpeedoColumn()};
        cols[0].name = CID;
        cols[0].targetField = CID;
        cols[1].name = OID;
        cols[1].targetField = OID;
        return cols;
View Full Code Here

      sj.extTable = null;
      sj.mainTable = null;
      sj.columns  = new ArrayList();
      sj.deleteAction = SpeedoJoin.ACTION_NONE;
    } else if (se instanceof SpeedoColumn) {
      SpeedoColumn sc = (SpeedoColumn) se;
      sc.allowNull = true;
      //sc.defaultValue = ?;
      //sc.jdbcType = ?;
      sc.length = 255;
      sc.name = null;
View Full Code Here

            st = new SpeedoTable();
        }
        //attribute column
        n = node.getAttributes().getNamedItem("column");
        if (n != null) {
            SpeedoColumn sc = new SpeedoColumn();
            sc.name = n.getNodeValue();
            if (st != null) {
                sc.table = st;
            }
            f.addColumn(sc);
View Full Code Here

TOP

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

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.