Package ch.agent.crnickl.impl

Examples of ch.agent.crnickl.impl.UpdatableSchemaImpl


    Collection<SeriesDefinition> seriesDefinitions = null;
    if (rawComponents != null) {
      attributeDefs = makeAttributeDefinitions(database, rawComponents.attributes);
      seriesDefinitions = makeSeriesSchemas(database, rawComponents.series);
    }
    schema = new UpdatableSchemaImpl(name, base, attributeDefs, seriesDefinitions, surrogate);
    return schema;
  }
View Full Code Here


    if (cycleDetector == null)
      cycleDetector = new LinkedHashSet<Integer>();
    if (cycleDetector.contains(rawSchema.getId()))
      throw T2DBJMsg.exception(J.J30115, rawSchema.getId(), cycleDetector.toString());
    cycleDetector.add(rawSchema.getId());
    UpdatableSchemaImpl schema = null;
    String name = rawSchema.getName();
    UpdatableSchema base = null;
    if (rawSchema.getParent() > 0) {
      Surrogate parentKey = makeSurrogate(database, DBObjectType.SCHEMA, rawSchema.getParent());
      RawSchema brs = getRawSchema(parentKey);
      if (brs == null)
        throw T2DBJMsg.exception(J.J30116, rawSchema.getParent(), name);
      base = getSchema(database, brs, cycleDetector);
    }
    Surrogate surrogate = makeSurrogate(database, DBObjectType.SCHEMA, rawSchema.getId());
    RawSchemaComponents rscs = getRawSchemaComponents(surrogate);
    if (rscs != null) {
      Collection<AttributeDefinition<?>> attributeDefs = makeAttributeDefinitions(database, rscs.attributes);
      Collection<SeriesDefinition> seriesDefinitions = makeSeriesSchemas(database, rscs.series);
      schema = new UpdatableSchemaImpl(name, base, attributeDefs, seriesDefinitions, surrogate);
    } else
      schema = new UpdatableSchemaImpl(name, base, null, null, surrogate);
    return schema;
  }
View Full Code Here

    Collection<SeriesDefinition> seriesDefinitions = null;
    if (rawComponents != null) {
      attributeDefs = makeAttributeDefinitions(database, rawComponents.attributes);
      seriesDefinitions = makeSeriesSchemas(database, rawComponents.series);
    }
    schema = new UpdatableSchemaImpl(name, base, attributeDefs, seriesDefinitions, surrogate);
    return schema;
  }
View Full Code Here

        Surrogate baseSurr = makeSurrogate(db, DBObjectType.SCHEMA, new MongoDBObjectId(baseId));
        base = getSchema(baseSurr, cycleDetector);
      }
      Collection<AttributeDefinition<?>> attribs = attributeDefinitions(s, 0, db, (BasicDBList)obj.get(MongoDatabase.FLD_SCHEMA_ATTRIBS));
      Collection<SeriesDefinition> series = seriesDefinitions(s, db, (BasicDBList)obj.get(MongoDatabase.FLD_SCHEMA_SERIES));
      return new UpdatableSchemaImpl(name,  base,  attribs,  series,  s);
    } catch (ClassCastException e) {
      throw T2DBMMsg.exception(e, J.J81010, obj.toString());
    }
  }
View Full Code Here

TOP

Related Classes of ch.agent.crnickl.impl.UpdatableSchemaImpl

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.