Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 24ef020c9b3ba238e0d0aa38e449e01af08310dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
 * Copyright (c) 2009 Eike Stepper (Berlin, Germany) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Eike Stepper - initial API and implementation
 *
 *  Initial Publication:
 *    Eclipse Magazin - http://www.eclipse-magazin.de
 */
package org.gastro.rcp;

import org.eclipse.emf.cdo.CDOObject;

import org.eclipse.emf.common.notify.AdapterFactory;

import org.gastro.business.BusinessDay;
import org.gastro.inventory.Restaurant;
import org.gastro.inventory.Station;

/**
 * @author Eike Stepper
 */
public interface IModel
{
  public static final IModel INSTANCE = org.gastro.internal.rcp.Model.INSTANCE;

  public AdapterFactory getAdapterFactory();

  public Restaurant getRestaurant();

  public BusinessDay getBusinessDay();

  public Station getStation();

  public <T extends CDOObject> Object modify(T object, ITransactionalOperation<T> operation);

  /**
   * @author Eike Stepper
   */
  public interface ITransactionalOperation<T extends CDOObject>
  {
    public Object execute(T object);
  }
}

Back to the top