Added license header and fixed sonar issue: Fields and methods should not have conflicting names
Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
@@ -69,7 +69,7 @@ import org.springframework.data.domain.Persistable;
|
||||
@Index(name = "sp_idx_target_03", columnList = "tenant,controller_id,assigned_distribution_set"),
|
||||
@Index(name = "sp_idx_target_04", columnList = "tenant,created_at"),
|
||||
@Index(name = "sp_idx_target_prim", columnList = "tenant,id") }, uniqueConstraints = @UniqueConstraint(columnNames = {
|
||||
"controller_id", "tenant" }, name = "uk_tenant_controller_id") )
|
||||
"controller_id", "tenant" }, name = "uk_tenant_controller_id"))
|
||||
@NamedEntityGraph(name = "Target.detail", attributeNodes = { @NamedAttributeNode("tags"),
|
||||
@NamedAttributeNode(value = "assignedDistributionSet"), @NamedAttributeNode(value = "targetInfo") })
|
||||
public class Target extends NamedEntity implements Persistable<Long> {
|
||||
@@ -81,21 +81,21 @@ public class Target extends NamedEntity implements Persistable<Long> {
|
||||
private String controllerId;
|
||||
|
||||
@Transient
|
||||
private boolean isNew = false;
|
||||
private boolean entityNew = false;
|
||||
|
||||
@ManyToMany(targetEntity = TargetTag.class)
|
||||
@JoinTable(name = "sp_target_target_tag", joinColumns = {
|
||||
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target") ) }, inverseJoinColumns = {
|
||||
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag") ) })
|
||||
@JoinColumn(name = "target", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_target")) }, inverseJoinColumns = {
|
||||
@JoinColumn(name = "tag", foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_targtag_tag")) })
|
||||
private Set<TargetTag> tags = new HashSet<>();
|
||||
|
||||
@CascadeOnDelete
|
||||
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true, cascade = { CascadeType.REMOVE })
|
||||
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ") )
|
||||
@JoinColumn(name = "target", insertable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_act_hist_targ"))
|
||||
private final List<Action> actions = new ArrayList<>();
|
||||
|
||||
@ManyToOne(optional = true, fetch = FetchType.LAZY, targetEntity = DistributionSet.class)
|
||||
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds") )
|
||||
@JoinColumn(name = "assigned_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_assign_ds"))
|
||||
private DistributionSet assignedDistributionSet;
|
||||
|
||||
@CascadeOnDelete
|
||||
@@ -217,15 +217,15 @@ public class Target extends NamedEntity implements Persistable<Long> {
|
||||
@Override
|
||||
@Transient
|
||||
public boolean isNew() {
|
||||
return isNew;
|
||||
return entityNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isNew
|
||||
* the isNew to set
|
||||
*/
|
||||
public void setNew(final boolean isNew) {
|
||||
this.isNew = isNew;
|
||||
public void setNew(final boolean entityNew) {
|
||||
this.entityNew = entityNew;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,11 +73,11 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
||||
private Long targetId;
|
||||
|
||||
@Transient
|
||||
private boolean isNew = false;
|
||||
private boolean entityNew = false;
|
||||
|
||||
@CascadeOnDelete
|
||||
@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REMOVE }, fetch = FetchType.LAZY, targetEntity = Target.class)
|
||||
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ") )
|
||||
@JoinColumn(name = "target_id", nullable = false, updatable = false, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_stat_targ"))
|
||||
@MapsId
|
||||
// use deprecated annotation until HHH-8862 is fixed
|
||||
// @SuppressWarnings( "deprecation" )
|
||||
@@ -98,7 +98,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
||||
private TargetUpdateStatus updateStatus = TargetUpdateStatus.UNKNOWN;
|
||||
|
||||
@ManyToOne(optional = true, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds") )
|
||||
@JoinColumn(name = "installed_distribution_set", nullable = true, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_target_inst_ds"))
|
||||
private DistributionSet installedDistributionSet;
|
||||
|
||||
/**
|
||||
@@ -108,7 +108,7 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
||||
@Column(name = "attribute_value", length = 128)
|
||||
@MapKeyColumn(name = "attribute_key", nullable = false, length = 32)
|
||||
@CollectionTable(name = "sp_target_attributes", joinColumns = {
|
||||
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target") )
|
||||
@JoinColumn(name = "target_id") }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target"))
|
||||
// use deprecated annotation until HHH-8862 is fixed
|
||||
@SuppressWarnings("deprecation")
|
||||
// @org.hibernate.annotations.ForeignKey( name = "fk_targ_attrib_target" )
|
||||
@@ -154,15 +154,15 @@ public class TargetInfo implements Persistable<Long>, Serializable {
|
||||
@Override
|
||||
@Transient
|
||||
public boolean isNew() {
|
||||
return isNew;
|
||||
return entityNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isNew
|
||||
* the isNew to set
|
||||
*/
|
||||
public void setNew(final boolean isNew) {
|
||||
this.isNew = isNew;
|
||||
public void setNew(final boolean entityNew) {
|
||||
this.entityNew = entityNew;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) 2011-2016 Bosch Software Innovations GmbH, Germany. All rights reserved.
|
||||
* 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.utils;
|
||||
|
||||
@@ -8,8 +13,6 @@ import java.util.concurrent.Callable;
|
||||
/**
|
||||
* Helper to call a request multiple times regarding a given condition until
|
||||
* timeout is reached.
|
||||
*
|
||||
* @author Jonathan Knoblauch
|
||||
*
|
||||
*/
|
||||
public final class MultipleInvokeHelper {
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
/**
|
||||
* Copyright (c) 2011-2015 Bosch Software Innovations GmbH, Germany. All rights reserved.
|
||||
* 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.utils;
|
||||
|
||||
/**
|
||||
* SuccessCondition Interface.
|
||||
*
|
||||
* @author Dennis Melzer
|
||||
*
|
||||
* @param <T>
|
||||
* type of the value to get verified
|
||||
|
||||
Reference in New Issue
Block a user