Package ch.agent.crnickl.api

Examples of ch.agent.crnickl.api.DBObjectId


   * @return
   */
  private SchemaImpl ref(SchemaImpl schema) {
    SchemaImpl esh = null;
    if (schema != null) {
      DBObjectId id = schema.getId();
      SchemaRefCounter ref = schemaCache.get(id);
      if (ref == null) {
        try {
          Collection<AttributeDefinition<?>> defCopies = ref1(0, schema.getAttributeDefinitions());
          Collection<SeriesDefinition> ssCopies = ref2(schema.getSeriesDefinitions());
View Full Code Here


    }
    return ssCopies;
  }
 
  private void unRef(SchemaImpl schema) {
    DBObjectId id = schema.getId();
    SchemaRefCounter ref = schemaCache.get(id);
    if (ref.decr() < 1) {
      schemaCache.remove(id);
      for (AttributeDefinition<?> def : schema.getAttributeDefinitions()) {
        unRef(def.getProperty());
View Full Code Here

  /**
   * @param property may not be null
   * @return
   */
  private Property<?> ref(Property<?> property) {
    DBObjectId id = property.getId();
    PropertyRefCounter ref = propCache.get(id);
    Property<?> p = null;
    if (ref == null) {
      p = property;
      propCache.put(id, new PropertyRefCounter(p));
View Full Code Here

    }
    return p;
  }
 
  private void unRef(Property<?> property) {
    DBObjectId id = property.getId();
    PropertyRefCounter ref = propCache.get(id);
    if (ref.decr() < 1) {
      propCache.remove(id);
      propByNameCache.remove(property.getName());
    }
View Full Code Here

    reset();
  }

  @Override
  public void clear(Chronicle chronicle) {
    DBObjectId id = chronicle.getId();
    if (id != null) {
      ChronicleImpl e = byIdCache.remove(id);
      if (e != null)
        remove(e);
    }
View Full Code Here

    try {
      check(Permission.CREATE, schema);
      Schema base = schema.getBase();
      if (base != null)
        check(Permission.READ, base);
      DBObjectId ox = insert(schema);
      surrogate = makeSurrogate(schema, ox);
    } catch (Exception e) {
      cause = e;
    } finally {
    }
View Full Code Here

        if (schema != null && schema.equals(collection.getSchema(true)))
          schema = null; // don't repeat yourself
      }
      if (schema != null)
        check(Permission.READ, schema);
      DBObjectId ox = insert(chronicle);
      surrogate = makeSurrogate(chronicle, ox);
    } catch (Exception e) {
      cause = e;
    } finally {
    }
View Full Code Here

  private void createSeries(Series<?> series, boolean undoDelete) throws T2DBException {
    Surrogate surrogate = null;
    Throwable cause = null;
    try {
      check(Permission.MODIFY, series.getChronicle());
      DBObjectId ox = insert(series);
      surrogate = makeSurrogate(series, ox);
    } catch (Exception e) {
      cause = e;
    } finally {
    }
View Full Code Here

  public <T>void createValueType(ValueType<T> vt) throws T2DBException {
    Surrogate surrogate = null;
    Throwable cause = null;
    try {
      check(Permission.CREATE, vt);
      DBObjectId ox = insert(vt);
      surrogate = makeSurrogate(vt, ox);
    } catch (Exception e) {
      cause = e;
    } finally {
    }
View Full Code Here

   * @return the single copy of schema in cache
   */
  private SchemaImpl ref(SchemaImpl schema) {
    SchemaImpl esh = null;
    if (schema != null) {
      DBObjectId id = schema.getId();
      SchemaRefCounter ref = schemaCache.get(id);
      if (ref == null) {
        try {
          Collection<AttributeDefinition<?>> defCopies = ref1(0, schema.getAttributeDefinitions());
          Collection<SeriesDefinition> ssCopies = ref2(schema.getSeriesDefinitions());
View Full Code Here

TOP

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

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.