-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #612 from wultra/develop
Merge changes into master
- Loading branch information
Showing
6 changed files
with
127 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
...n/java/io/getlime/security/powerauth/app/server/database/model/entity/ShedlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* | ||
* PowerAuth Server and related software components | ||
* Copyright (C) 2021 Wultra s.r.o. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package io.getlime.security.powerauth.app.server.database.model.entity; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
import java.io.Serializable; | ||
import java.util.Date; | ||
|
||
/** | ||
* Entity representing the Shedlock items. The entity is not used directly via JPA repositories. | ||
* We have it here so that databases that create schema based on entities have easier task in | ||
* picking the entire schema. This is particularly helpful while running tests with in-memory | ||
* databases. | ||
* | ||
* @author Petr Dvorak, [email protected] | ||
*/ | ||
@Entity | ||
@Table(name = "shedlock") | ||
public class ShedlockEntity implements Serializable { | ||
|
||
private static final long serialVersionUID = 3791580797958213663L; | ||
|
||
@Id | ||
@Column(name = "name", nullable = false) | ||
private String name; | ||
|
||
@Column(name = "lock_until", nullable = false) | ||
private Date lockUntil; | ||
|
||
@Column(name = "locked_at", nullable = false) | ||
private Date lockedAt; | ||
|
||
@Column(name = "locked_by", nullable = false) | ||
private String lockedBy; | ||
|
||
/** | ||
* Get name. | ||
* @return Name. | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* Set name. | ||
* @param name Name. | ||
*/ | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
/** | ||
* Get lock until. | ||
* @return Lock until. | ||
*/ | ||
public Date getLockUntil() { | ||
return lockUntil; | ||
} | ||
|
||
/** | ||
* Set lock until. | ||
* @param lockUntil Lock until. | ||
*/ | ||
public void setLockUntil(Date lockUntil) { | ||
this.lockUntil = lockUntil; | ||
} | ||
|
||
/** | ||
* Get locked at. | ||
* @return Locked at. | ||
*/ | ||
public Date getLockedAt() { | ||
return lockedAt; | ||
} | ||
|
||
/** | ||
* Set locked at. | ||
* @param lockedAt Locked at. | ||
*/ | ||
public void setLockedAt(Date lockedAt) { | ||
this.lockedAt = lockedAt; | ||
} | ||
|
||
/** | ||
* Get locked by. | ||
* @return Locked by. | ||
*/ | ||
public String getLockedBy() { | ||
return lockedBy; | ||
} | ||
|
||
/** | ||
* Set locked by. | ||
* @param lockedBy Locked by. | ||
*/ | ||
public void setLockedBy(String lockedBy) { | ||
this.lockedBy = lockedBy; | ||
} | ||
} |