Package ch.agent.crnickl.api

Examples of ch.agent.crnickl.api.Surrogate


   *
   * @param property a property
   * @throws T2DBException
   */
  public void createProperty(Property<?> property) throws T2DBException {
    Surrogate surrogate = null;
    Throwable cause = null;
    try {
      check(Permission.CREATE, property);
      create_property = open(CREATE_PROPERTY, property, create_property);
      ValueType<?> vt = property.getValueType();
View Full Code Here


    return new SurrogateImpl((DatabaseBackend) db, dot, id);
  }

  @Override
  public Surrogate makeSurrogate(DBObject dBObject, int id) {
    Surrogate s = dBObject.getSurrogate();
    return makeSurrogate(s.getDatabase(), s.getDBObjectType(), id);
  }
View Full Code Here

  @Override
  public Schema resolve(UpdatableSchema uschema) throws T2DBException {
    List<UpdatableSchema> schemaList = getSchemaList(uschema);
    // the name will be the name of the consolidated schema
    String name = uschema.getName();
    Surrogate surrogate = uschema.getSurrogate();
    // reverse the list to have the base first
    Collections.reverse(schemaList);
    UpdatableSchemaImpl result = null;
    for (UpdatableSchema schema : schemaList) {
      if (result == null) {
View Full Code Here

    return prop;
  }
 
  @Override
  public Property<?> getTimeDomainBuiltInProperty() throws T2DBException {
    Surrogate surrogate = new SurrogateImpl(this, DBObjectType.PROPERTY, DatabaseBackend.MAGIC_TIMEDOMAIN_NR);
    return getProperty(surrogate);
  }
View Full Code Here

    return getProperty(surrogate);
  }

  @Override
  public Property<?> getTypeBuiltInProperty() throws T2DBException {
    Surrogate surrogate = new SurrogateImpl(this, DBObjectType.PROPERTY, DatabaseBackend.MAGIC_TYPE_NR);
    return getProperty(surrogate);
  }
View Full Code Here

    return getProperty(surrogate);
  }

  @Override
  public Property<?> getSparsityBuiltInProperty() throws T2DBException {
    Surrogate surrogate = new SurrogateImpl(this, DBObjectType.PROPERTY, DatabaseBackend.MAGIC_SPARSITY_NR);
    return getProperty(surrogate);
  }
View Full Code Here

        new SurrogateImpl(this, DBObjectType.VALUE_TYPE, 0));
  }
 
  @Override
  public <T> UpdatableProperty<T> createProperty(String name,  ValueType<T> valueType, boolean indexed) throws T2DBException {
    Surrogate  surrogate = new SurrogateImpl(this, DBObjectType.PROPERTY, 0);
    return new UpdatablePropertyImpl<T>(name, valueType, indexed, surrogate);
  }
View Full Code Here

      Collection<UpdatableSchema> list = getUpdatableSchemas(nameOfBase);
      if (list.size() != 1)
        throw T2DBMsg.exception(D.D30109, name, nameOfBase);
      base = list.iterator().next();
    }
    Surrogate surrogate = new SurrogateImpl(this, DBObjectType.SCHEMA, 0);
    return new UpdatableSchemaImpl(name, base, null, null, surrogate);
  }
View Full Code Here

    return dependencyList;
  }

  @Override
  public boolean dependsOnSchema(Schema schema) {
    Surrogate surrogate = schema.getSurrogate();
    if (dependencyList != null) {
      for (Surrogate k : dependencyList) {
        if (k.equals(surrogate))
          return true;
      }
View Full Code Here

  }

  @Override
  public void setSeriesType(int seriesNr, String type) throws T2DBException {
    DatabaseBackend db = ((SurrogateImpl)getSurrogate()).getDatabase();
    Surrogate surrogate = new SurrogateImpl(db, DBObjectType.VALUE_TYPE, DatabaseBackend.MAGIC_TYPE_NR);
    @SuppressWarnings({ "rawtypes" })
    ValueType<ValueType> vt = db.getValueType(surrogate);
    setSeriesType(seriesNr, vt.scan(type));
  }
View Full Code Here

TOP

Related Classes of ch.agent.crnickl.api.Surrogate

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.