Examples of OCAttributeMetadataObject


Examples of com.ipc.oce.metadata.objects.OCAttributeMetadataObject

   
    // create attribute elements
    Element attrElement = doc.createElementNS(ns, "Attributes");
    root.appendChild(attrElement);
    OCMetadataAttributeCollection attributeMetaCollection = metadata.getAttributes();
    OCAttributeMetadataObject amoTmp = null;
    int amcSZ = attributeMetaCollection.size();
    for (int z = 0; z < amcSZ; z++) {
      amoTmp = attributeMetaCollection.get(z);
      String oName = amoTmp.getName();
      //String tName = transliterate(oName);
      Element elem = doc.createElementNS(ns, "Attribute");
      elem.setAttribute("name", oName);
     
      OCVariant var = documentObject.getAttributeValue(oName);
View Full Code Here

Examples of com.ipc.oce.metadata.objects.OCAttributeMetadataObject

    super(aDispatch);
  }

  @Override
  public OCAttributeMetadataObject get(int i) throws JIException {
    return new OCAttributeMetadataObject(super.get(i));
  }
View Full Code Here

Examples of com.ipc.oce.metadata.objects.OCAttributeMetadataObject

    return new OCAttributeMetadataObject(super.get(i));
  }

  @Override
  public OCAttributeMetadataObject find(String objectName) throws JIException {
    return new OCAttributeMetadataObject(super.find(objectName));
  }
View Full Code Here

Examples of com.ipc.oce.metadata.objects.OCAttributeMetadataObject

    EnumVARIANT<OCAttributeMetadataObject> enumV = new EnumVARIANT<OCAttributeMetadataObject>(this) {
     
      @Override
      protected OCAttributeMetadataObject castToGeneric(JIVariant variant) {
        try {
          return new OCAttributeMetadataObject(variant);
        } catch (JIException e) {
          throw new RuntimeException(e);
        }
      }
    };
View Full Code Here

Examples of com.ipc.oce.metadata.objects.OCAttributeMetadataObject

  private static void attribute2resultSet(
      final OCMetadataAttributeCollection attributeCollection,
      LocalResultSet lrs, String schema, String tableName)
      throws SQLException, JIException {
    OCAttributeMetadataObject amo = null;
    OCTypeDescription typeDescription = null;
    int attrSZ = attributeCollection.size();
    for (int z = 0; z < attrSZ; z++) {
      amo = attributeCollection.get(z);
      typeDescription = amo.getTypeDescription();
      OCType ot = typeDescription.getType();
      int innerType = ot.getTypeCode();
      // determinate column size
      Integer columnSize = null;
      Integer decimalDigits = null;
      if (!(typeDescription.isMultiType())) {
        switch (innerType) {
          case OCType.OCT_STRING: {
            columnSize = typeDescription.getStringQualifiers()
                .getLength();
            break;
          }
          case OCType.OCT_NUMBER: {
            OCNumberQualifiers qualifiers = typeDescription
                .getNumberQualifiers();
            columnSize = qualifiers.getDigits();
            decimalDigits = qualifiers.getFractionDigits();
            break;
          }
          default: {
            columnSize = null;
            decimalDigits = null;
          }
        }
      }
      // determinate char_octet_length
      Integer charOctetLength = null;
      if (columnSize != null && innerType == OCType.OCT_STRING) {
        charOctetLength = columnSize;
      }

      OCType[] dataType = typeDescription.getNotNullTypes();

      lrs.createRowAndSetValues(new Object[] {
          null, // TABLE_CAT
          schema, // TABLE_SCHEM
          tableName, // TABLE_NAME
          amo.getName(), // COLUMN_NAME
          Integer.valueOf(OCType.typesToSQLType(dataType)), // DATA_TYPE
          OCType.typesToSQLTypeName(dataType), // typeDescription.isMultiType()?"MultiType":typeDescription.getType().getSynonym(),
                              // // TYPE_NAME
          columnSize, // COLUMN_SIZE
          null, // BUFFER_LENGTH
          decimalDigits, // DECIMAL_DIGITS
          Integer.valueOf(10), // NUM_PREC_RADIX
          Integer.valueOf(columnNullableUnknown), // NULLABLE
          amo.getComment(), // REMARKS
          null, // COLUMN_DEF
          null, // SQL_DATA_TYPE - unused
          null, // SQL_DATETIME_SUB - unused
          charOctetLength, // CHAR_OCTET_LENGTH
          Integer.valueOf(z + 1), // ORDINAL_POSITION
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.