Codota Logo
EntityUpdatingEvent
Code IndexAdd Codota to your IDE (free)

How to use
EntityUpdatingEvent
in
org.mayocat.model.event

Best Java code snippets using org.mayocat.model.event.EntityUpdatingEvent (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: jvelo/mayocat-shop

public void update(@Valid HomePage entity) throws EntityDoesNotExistException, InvalidEntityException
{
  this.dao.begin();
  HomePage homePage = find();
  if (homePage == null) {
    this.dao.commit();
    throw new EntityDoesNotExistException();
  }
  getObservationManager().notify(new EntityUpdatingEvent(), entity);
  entity.setId(homePage.getId());
  this.dao.createOrUpdateAddons(entity);
  this.dao.commit();
  getObservationManager().notify(new EntityUpdatedEvent(), entity);
}
origin: jvelo/mayocat-shop

public void addEntityToList(EntityList list, UUID entity) throws EntityDoesNotExistException
{
  EntityList originalList;
  originalList = getStoredEntityList(list);
  if (originalList == null) {
    this.dao.commit();
    throw new EntityDoesNotExistException();
  }
  getObservationManager().notify(new EntityUpdatingEvent(), originalList);
  this.dao.addEntityToList(list.getId(), entity);
  getObservationManager().notify(new EntityUpdatedEvent(), originalList);
}
origin: jvelo/mayocat-shop

public void removeEntityFromList(EntityList list, UUID entity) throws EntityDoesNotExistException
{
  EntityList originalList;
  originalList = getStoredEntityList(list);
  if (originalList == null) {
    this.dao.commit();
    throw new EntityDoesNotExistException();
  }
  getObservationManager().notify(new EntityUpdatingEvent(), originalList);
  this.dao.removeEntityFromList(list.getId(), entity);
  getObservationManager().notify(new EntityUpdatedEvent(), originalList);
}
origin: jvelo/mayocat-shop

public void update(@Valid EntityList list) throws EntityDoesNotExistException, InvalidEntityException
{
  EntityList originalList;
  this.dao.begin();
  originalList = getStoredEntityList(list);
  if (originalList == null) {
    this.dao.commit();
    throw new EntityDoesNotExistException();
  }
  getObservationManager().notify(new EntityUpdatingEvent(), list);
  list.setId(originalList.getId());
  Integer updatedRows = this.dao.updateEntityList(list);
  this.dao.commit();
  if (updatedRows <= 0) {
    throw new StoreException("No rows was updated when updating list");
  }
  getObservationManager().notify(new EntityUpdatedEvent(), list);
}
origin: jvelo/mayocat-shop

public void update(Product product) throws EntityDoesNotExistException, InvalidEntityException
{
  this.dao.begin();
  Product originalProduct = this.findBySlug(product.getSlug(), product.getParentId());
  if (originalProduct == null) {
    this.dao.commit();
    throw new EntityDoesNotExistException();
  }
  if (!product.getAddons().isLoaded()) {
    product.setAddons(originalProduct.getAddons().get());
  }
  getObservationManager().notify(new EntityUpdatingEvent(), product);
  product.setId(originalProduct.getId());
  Integer updatedRows = this.dao.updateProduct(product);
  this.dao.createOrUpdateAddons(product);
  if (product.getLocalizedVersions() != null && !product.getLocalizedVersions().isEmpty()) {
    Map<Locale, Map<String, Object>> localizedVersions = product.getLocalizedVersions();
    for (Locale locale : localizedVersions.keySet()) {
      this.dao.createOrUpdateTranslation(product.getId(), locale, localizedVersions.get(locale));
    }
  }
  this.dao.commit();
  if (updatedRows <= 0) {
    throw new StoreException("No rows was updated when updating product");
  }
  getObservationManager().notify(new EntityUpdatedEvent(), product);
}
org.mayocat.model.eventEntityUpdatingEvent

Most used methods

  • <init>

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now