Package ch.agent.crnickl.impl

Examples of ch.agent.crnickl.impl.UpdateEventImpl


  }
 
  @Override
  public void create(UpdatableChronicle entity) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().createChronicle(entity);
    publish(new UpdateEventImpl(UpdateEventOperation.CREATE, entity).withComment(entity.getDescription(false)));
  }
View Full Code Here


  }
 
  @Override
  public void update(UpdatableChronicle entity) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().updateChronicle(entity, getChronicleUpdatePolicy());
    publish(new UpdateEventImpl(UpdateEventOperation.MODIFY, entity));
  }
View Full Code Here

  }
 
  @Override
  public void deleteAttributeValue(UpdatableChronicle entity, AttributeDefinition<?> def) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().deleteAttribute(entity, def);
    publish(new UpdateEventImpl(UpdateEventOperation.MODIFY, entity).withComment("delete attribute #" + def.getNumber()));
  }
View Full Code Here

  }

  @Override
  public void update(UpdatableChronicle entity, AttributeDefinition<?> def, String value, String description) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().updateAttribute(entity, def, value, description);
    publish(new UpdateEventImpl(UpdateEventOperation.MODIFY, entity).withComment(String.format("%s=%s", def.getProperty().getName(), value)));
  }
View Full Code Here

  @Override
  public void deleteChronicle(UpdatableChronicle entity) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().deleteChronicle(entity, getChronicleUpdatePolicy());
    // pass name and description as comment, because they are lost when logger gets them
    String comment = getNamingPolicy().joinValueAndDescription(entity.getName(true), entity.getDescription(false));
    publish(new UpdateEventImpl(UpdateEventOperation.DELETE, entity).withComment(comment));
  }
View Full Code Here

  }
 
  @Override
  public <T>void create(UpdatableSeries<T> series) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().createSeries(series);
    publish(new UpdateEventImpl(UpdateEventOperation.CREATE, series));
  }
View Full Code Here

  @Override
  public <T>void deleteSeries(UpdatableSeries<T> series) throws T2DBException {
    getWriteMethodsForChroniclesAndSeries().deleteSeries(series, getChronicleUpdatePolicy());
    String comment = getNamingPolicy().joinValueAndDescription(series.getName(true), series.getDescription(false));
    publish(new UpdateEventImpl(UpdateEventOperation.DELETE, series).withComment(comment));
  }
View Full Code Here

  }

  @Override
  public void create(UpdatableProperty<?> property) throws T2DBException {
    getWriteMethodsForProperty().createProperty(property);
    publish(new UpdateEventImpl(UpdateEventOperation.CREATE, property));
  }
View Full Code Here

  @Override
  public void deleteProperty(UpdatableProperty<?> property) throws T2DBException {
    getWriteMethodsForProperty().deleteProperty(property, getSchemaUpdatePolicy());
    String comment = property.getName();
    publish(new UpdateEventImpl(UpdateEventOperation.DELETE, property).withComment(comment));
  }
View Full Code Here

  }

  @Override
  public void update(UpdatableProperty<?> property) throws T2DBException {
    getWriteMethodsForProperty().updateProperty(property, getSchemaUpdatePolicy());
    publish(new UpdateEventImpl(UpdateEventOperation.MODIFY, property));
  }
View Full Code Here

TOP

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

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.