Examples of IDfAttr


Examples of com.documentum.fc.common.IDfAttr

public class DctmMeta extends CaoMetadata {

  public DctmMeta(CaoDriver driver, Enumeration<?> attributes) {
    super(driver);
    while ( attributes.hasMoreElements() ) {
      IDfAttr attr = (IDfAttr)attributes.nextElement();
      TYPE type = TYPE.STRING;
      String cat = null;
     
      if (attr.getName().equals("r_object_id"))
        cat = CaoDriver.CATEGORY_ID;
     
      if (attr.isRepeating()) {
        definition.add(new CaoMetaDefinition(this, attr.getName(), TYPE.LIST, attr.getName(), 0, cat ));
      } else {
        switch (attr.getDataType()) {
        case IDfAttr.DM_BOOLEAN:
          type = TYPE.BOOLEAN;
          break;
        case IDfAttr.DM_DOUBLE:
          type = TYPE.DOUBLE;
          break;
        case IDfAttr.DM_ID:
          type = TYPE.STRING;
          cat = CaoDriver.CATEGORY_ID;
          break;
        case IDfAttr.DM_INTEGER:
          type = TYPE.LONG;
          break;
        case IDfAttr.DM_TIME:
          type = TYPE.DATETIME;
          break;
        case IDfAttr.DM_UNDEFINED:
          type = TYPE.OBJECT;
          break;
        }
        definition.add(new CaoMetaDefinition(this, attr.getName(), type, attr.getName(), attr.getLength(), cat ));
      }
    }
  }
View Full Code Here

Examples of com.documentum.fc.common.IDfAttr

  }

  private void loadData(IDfTypedObject res) throws DfException {
    // keep persistent
    for ( Enumeration<?> enu = res.enumAttrs(); enu.hasMoreElements();) {
      IDfAttr attr = (IDfAttr)enu.nextElement();
      if ( ! attr.isRepeating() ) {
        values.put(attr.getName(), res.getString(attr.getName()));
      } else {
        String[] out = new String[res.getValueCount(attr.getName())];
        for (int i = 0; i < out.length; i++)
          out[i] = res.getRepeatingString(attr.getName(), i);
        values.put(attr.getName(), out);
      }
    }
    if (res.hasAttr("r_object_id")) {
      values.put("r_object_id",res.getString("r_object_id"));
    }
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.