refactored test data generation. Refactored entity factor methods.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-05-31 08:51:49 +02:00
parent a4e0fc2457
commit 7a98c58407
137 changed files with 2937 additions and 2593 deletions

View File

@@ -0,0 +1,29 @@
<!--
Copyright (c) 2015 Bosch Software Innovations GmbH 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
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
<artifactId>hawkbit-repository-core</artifactId>
<name>hawkBit :: Repository Core Implementation Support</name>
<dependencies>
<dependency>
<groupId>org.eclipse.hawkbit</groupId>
<artifactId>hawkbit-repository-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,60 @@
/**
* Copyright (c) 2015 Bosch Software Innovations GmbH 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
*/
package org.eclipse.hawkbit.repository.jpa.model.helper;
import org.eclipse.hawkbit.repository.SystemManagement;
import org.springframework.beans.factory.annotation.Autowired;
/**
* A singleton bean which holds {@link SystemManagement} service and makes it
* accessible to beans which are not managed by spring, e.g. JPA entities.
*
*
*
**/
public final class SystemManagementHolder {
private static final SystemManagementHolder INSTANCE = new SystemManagementHolder();
@Autowired
private SystemManagement systemManagement;
private SystemManagementHolder() {
}
/**
* @return the singleton {@link SystemManagementHolder} instance
*/
public static SystemManagementHolder getInstance() {
return INSTANCE;
}
/**
* @return the systemManagement
*/
public SystemManagement getSystemManagement() {
return systemManagement;
}
/**
* @param systemManagement
* the systemManagement to set
*/
public void setSystemManagement(final SystemManagement systemManagement) {
this.systemManagement = systemManagement;
}
/**
* @return the {@link SystemManagement#currentTenant()}.
*/
public String currentTenant() {
return systemManagement.currentTenant();
}
}