Package com.ipc.oce.metadata.collection

Examples of com.ipc.oce.metadata.collection.OCMetadataAttributeCollection


   * @return
   * @throws JIException
   */
  public OCMetadataAttributeCollection getAttributes() throws JIException{
    if (attributeCollection == null) {
      attributeCollection = new OCMetadataAttributeCollection(get("Attributes"));
    }
    return attributeCollection;
  }
View Full Code Here


   * @return List<String>
   * @throws JIException
   */
  public synchronized List<String> getAttributesName() throws JIException {
    if (attributesName == null) {
      OCMetadataAttributeCollection attrCollection = getAttributes();
      attributesName = new ArrayList<String>();
      for (OCAttributeMetadataObject attr : attrCollection) {
        attributesName.add(attr.getName());
      }
    }
View Full Code Here

   * Коллекция объектов метаданных,
   * описывающих реквизиты данного объекта метаданных.
   */
  public OCMetadataAttributeCollection getAttributes() throws JIException {
    if (attributeCollection == null) {
      attributeCollection = new OCMetadataAttributeCollection(get("Attributes"));
    }
    return attributeCollection;
  }
View Full Code Here

   *
   * @return
   * @throws JIException
   */
  public OCMetadataAttributeCollection getAttributes() throws JIException {
    return new OCMetadataAttributeCollection(get("Attributes"));
  }
View Full Code Here

        OCDocumentMetadataObject dmo = documentCollection
            .find(tableNamePattern);
        if (dmo != null) { // а вдруг если схема не задана объект ей не
                  // принадлежит

          OCMetadataAttributeCollection attributeCollection = dmo
              .getAttributes();
          attribute2resultSet(attributeCollection, lrs,
              SCHEMA_DOCUMENT, tableNamePattern);

          int colSZ = attributeCollection.size();

          // Add NUMBER
          lrs.createRowAndSetValues(new Object[] { null, // TABLE_CAT
              SCHEMA_DOCUMENT, // TABLE_SCHEM
              tableNamePattern, // TABLE_NAME
              "Number", // COLUMN_NAME
              Types.VARCHAR, // DATA_TYPE
              "VARCHAR", // TYPE_NAME
              Integer.valueOf(dmo.getNumberLength()), // COLUMN_SIZE
              null, // BUFFER_LENGTH
              null, // DECIMAL_DIGITS
              Integer.valueOf(10), // NUM_PREC_RADIX
              Integer.valueOf(columnNullableUnknown), // NULLABLE
              null, // REMARKS
              null, // COLUMN_DEF
              null, // SQL_DATA_TYPE
              null, // SQL_DATETIME_SUB
              Integer.valueOf(dmo.getNumberLength()), // CHAR_OCTET_LENGTH
              colSZ + 1, // ORDINAL_POSITION
              "", // IS_NULLABLE
              null, // SCOPE_CATLOG
              null, // SCOPE_SCHEMA
              null, // SCOPE_TABLE
              null, // SOURCE_DATA_TYPE
              "YES" // IS_AUTOINCREMENT
          });

          // Add DATE
          lrs.createRowAndSetValues(new Object[] { null, // TABLE_CAT
              SCHEMA_DOCUMENT, // TABLE_SCHEM
              tableNamePattern, // TABLE_NAME
              "Date", // COLUMN_NAME
              Types.TIMESTAMP, // DATA_TYPE
              "TIMESTAMP", // TYPE_NAME
              null, // COLUMN_SIZE
              null, // BUFFER_LENGTH
              null, // DECIMAL_DIGITS
              Integer.valueOf(10), // NUM_PREC_RADIX
              Integer.valueOf(columnNullableUnknown), // NULLABLE
              null, // REMARKS
              null, // COLUMN_DEF
              null, // SQL_DATA_TYPE
              null, // SQL_DATETIME_SUB
              null, // CHAR_OCTET_LENGTH
              colSZ + 2, // ORDINAL_POSITION
              "", // IS_NULLABLE
              null, // SCOPE_CATLOG
              null, // SCOPE_SCHEMA
              null, // SCOPE_TABLE
              null, // SOURCE_DATA_TYPE
              "NO" // IS_AUTOINCREMENT
          });

          // Add Posted
          lrs.createRowAndSetValues(new Object[] { null, // TABLE_CAT
              SCHEMA_DOCUMENT, // TABLE_SCHEM
              tableNamePattern, // TABLE_NAME
              "Posted", // COLUMN_NAME
              Types.SMALLINT, // DATA_TYPE
              "SMALLINT", // TYPE_NAME
              null, // COLUMN_SIZE
              null, // BUFFER_LENGTH
              null, // DECIMAL_DIGITS
              Integer.valueOf(10), // NUM_PREC_RADIX
              Integer.valueOf(columnNullableUnknown), // NULLABLE
              null, // REMARKS
              null, // COLUMN_DEF
              null, // SQL_DATA_TYPE
              null, // SQL_DATETIME_SUB
              null, // CHAR_OCTET_LENGTH
              colSZ + 3, // ORDINAL_POSITION
              "", // IS_NULLABLE
              null, // SCOPE_CATLOG
              null, // SCOPE_SCHEMA
              null, // SCOPE_TABLE
              null, // SOURCE_DATA_TYPE
              "NO" // IS_AUTOINCREMENT
          });

          // Add DeletionMark
          lrs.createRowAndSetValues(new Object[] { null, // TABLE_CAT
              SCHEMA_DOCUMENT, // TABLE_SCHEM
              tableNamePattern, // TABLE_NAME
              "DeletionMark", // COLUMN_NAME
              Types.SMALLINT, // DATA_TYPE
              "SMALLINT", // TYPE_NAME
              null, // COLUMN_SIZE
              null, // BUFFER_LENGTH
              null, // DECIMAL_DIGITS
              Integer.valueOf(10), // NUM_PREC_RADIX
              Integer.valueOf(columnNullableUnknown), // NULLABLE
              null, // REMARKS
              null, // COLUMN_DEF
              null, // SQL_DATA_TYPE
              null, // SQL_DATETIME_SUB
              null, // CHAR_OCTET_LENGTH
              colSZ + 4, // ORDINAL_POSITION
              "", // IS_NULLABLE
              null, // SCOPE_CATLOG
              null, // SCOPE_SCHEMA
              null, // SCOPE_TABLE
              null, // SOURCE_DATA_TYPE
              "NO" // IS_AUTOINCREMENT
          });
        }
      }
      if (schemaPattern == null || schemaPattern.equals(SCHEMA_CATALOG)) {
        OCMetadataCatalogCollection catalogCollection = metadata
            .getCatalogs();
        OCCatalogMetadataObject cmo = catalogCollection
            .find(tableNamePattern);
        if (cmo != null) {

          OCMetadataAttributeCollection mac = cmo.getAttributes();
          attribute2resultSet(mac, lrs, SCHEMA_CATALOG,
              tableNamePattern);

          int colSZ = catalogCollection.size();
View Full Code Here

TOP

Related Classes of com.ipc.oce.metadata.collection.OCMetadataAttributeCollection

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.