2023-12-08 17:05:48 +01:00
|
|
|
package eu.eudat.model.persist;
|
|
|
|
|
|
|
|
import eu.eudat.commons.enums.LockTargetType;
|
2023-12-19 14:46:31 +01:00
|
|
|
import eu.eudat.commons.validation.old.FieldNotNullIfOtherSet;
|
|
|
|
import eu.eudat.commons.validation.old.ValidEnum;
|
|
|
|
import eu.eudat.commons.validation.old.ValidId;
|
2023-12-08 17:05:48 +01:00
|
|
|
import jakarta.validation.Valid;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
@FieldNotNullIfOtherSet(message = "{validation.hashempty}")
|
|
|
|
public class LockPersist {
|
|
|
|
|
|
|
|
@ValidId(message = "{validation.invalidid}")
|
|
|
|
private UUID id;
|
|
|
|
|
|
|
|
@Valid
|
|
|
|
private UUID target;
|
|
|
|
|
|
|
|
@ValidEnum(message = "{validation.empty}")
|
|
|
|
private LockTargetType targetType;
|
|
|
|
|
|
|
|
@Valid
|
|
|
|
private UUID lockedBy;
|
|
|
|
|
|
|
|
public static final String _touchedAt = "touchedAt";
|
|
|
|
|
|
|
|
private String hash;
|
|
|
|
|
|
|
|
public static final String _hash = "hash";
|
|
|
|
|
|
|
|
public UUID getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(UUID id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public UUID getTarget() {
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTarget(UUID target) {
|
|
|
|
this.target = target;
|
|
|
|
}
|
|
|
|
|
|
|
|
public LockTargetType getTargetType() {
|
|
|
|
return targetType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTargetType(LockTargetType targetType) {
|
|
|
|
this.targetType = targetType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public UUID getLockedBy() {
|
|
|
|
return lockedBy;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLockedBy(UUID lockedBy) {
|
|
|
|
this.lockedBy = lockedBy;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getHash() {
|
|
|
|
return hash;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHash(String hash) {
|
|
|
|
this.hash = hash;
|
|
|
|
}
|
|
|
|
}
|