| /** |
| * |
| * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| */ |
| package org.eclipse.osbp.utils.entitymock; |
| |
| import java.util.List; |
| import java.util.Map; |
| |
| import org.eclipse.osbp.persistence.IPersistenceService; |
| |
| /** |
| * Interface, that each Entity (DTO) Mock Generator has to implement |
| */ |
| public interface IEntityMockDataGenerator extends Comparable<IEntityMockDataGenerator> { |
| |
| final static int DEFAULT_PRIORITY = 10; |
| |
| /** |
| * The priority can be set in the entitymock model from 1 (highest) to 9 (almost lowest).<br> |
| * If is not explicit set, it's default value is 10 (lowest). |
| * @return the priority, this generator should run, compared to other generators |
| */ |
| public int getRunWithPriority(); |
| |
| /** |
| * Run any datainterchanges references by the mock generator |
| * @param persistenceService |
| */ |
| public void runDataInterchanges(IPersistenceService persistenceService, IEntityMockDataDbFiller entityMockDbFiller); |
| |
| /** |
| * Generate entity DTO mock data objects, depending on the base .entitymock DSL instance.<br> |
| * The map key holds a MockedEntityDto instance, which holds both the entity DTO class - for example <code>org.eclipse.osbp.foodmart.dtos.McustomerDto.class</code> - and the target persistence unit.<br> |
| * The map value is a list with generated entity DTO objects, in the example above instances of <code>org.eclipse.osbp.foodmart.dtos.McustomerDto</code> |
| * @return the map and list of generated entity DTO objects |
| */ |
| public Map<MockedEntityDto,List<Object>> getMockData(IEntityMockDataDbFiller entityMockDbFiller); |
| |
| /** |
| * Gets the number of data interchange steps. |
| * @return the data interchange steps |
| */ |
| public int getDataInterchangeSteps(); |
| |
| /** |
| * Gets the number of entity mock steps. |
| * @return the entity mock steps |
| */ |
| public int getEntityMockSteps(); |
| } |