-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4c7f46
commit 4701684
Showing
23 changed files
with
315 additions
and
49 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
persistence-utils-demo-test/src/com/axonivy/utils/persistence/daos/CarDAO.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
4 changes: 2 additions & 2 deletions
4
persistence-utils-demo-test/src/com/axonivy/utils/persistence/daos/HistorizedPersonDAO.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
5 changes: 2 additions & 3 deletions
5
persistence-utils-demo-test/src/com/axonivy/utils/persistence/daos/OptionDAO.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
4 changes: 2 additions & 2 deletions
4
persistence-utils-demo-test/src/com/axonivy/utils/persistence/daos/ProducerDAO.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
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
4 changes: 2 additions & 2 deletions
4
persistence-utils-demo-test/src/com/axonivy/utils/persistence/daos/VehicleDAO.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
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
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
54 changes: 54 additions & 0 deletions
54
persistence-utils/src/com/axonivy/utils/persistence/beans/AuditableIdEntity.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,54 @@ | ||
package com.axonivy.utils.persistence.beans; | ||
|
||
import javax.persistence.Access; | ||
import javax.persistence.AccessType; | ||
import javax.persistence.Column; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.MappedSuperclass; | ||
|
||
import org.hibernate.annotations.GenericGenerator; | ||
|
||
import ch.ivyteam.ivy.environment.Ivy; | ||
|
||
/** | ||
* Auditable entity class which allows header manipulation | ||
* | ||
*/ | ||
@MappedSuperclass | ||
public abstract class AuditableIdEntity extends AuditableEntity<String> { | ||
|
||
private static final long serialVersionUID = 8298601078993069192L; | ||
|
||
@Id | ||
@Column(length = 32, nullable = false) | ||
@GeneratedValue(generator="system-uuid") | ||
@GenericGenerator(name="system-uuid", strategy = "uuid") | ||
@Access(AccessType.PROPERTY) | ||
protected String id; | ||
|
||
/* (non-Javadoc) | ||
* @see com.axonivy.persistence.beans.GenericEntity#getId() | ||
*/ | ||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see com.axonivy.persistence.beans.GenericEntity#setId(java.io.Serializable) | ||
*/ | ||
@Override | ||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* Get Ivy.session().getSessionUserName() as default session username, or override it later. | ||
*/ | ||
@Override | ||
public String getSessionUsername() { | ||
return Ivy.session().getSessionUserName(); | ||
} | ||
|
||
} |
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
54 changes: 54 additions & 0 deletions
54
persistence-utils/src/com/axonivy/utils/persistence/beans/ToggleableIdEntity.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,54 @@ | ||
package com.axonivy.utils.persistence.beans; | ||
|
||
import javax.persistence.Access; | ||
import javax.persistence.AccessType; | ||
import javax.persistence.Column; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.Id; | ||
import javax.persistence.MappedSuperclass; | ||
|
||
import org.hibernate.annotations.GenericGenerator; | ||
|
||
import ch.ivyteam.ivy.environment.Ivy; | ||
|
||
/** | ||
* Base for all entities which can be enabled and disabled. | ||
* | ||
*/ | ||
@MappedSuperclass | ||
public abstract class ToggleableIdEntity extends ToggleableEntity<String> { | ||
|
||
private static final long serialVersionUID = -8780884685375253549L; | ||
|
||
@Id | ||
@Column(length = 32, nullable = false) | ||
@GeneratedValue(generator="system-uuid") | ||
@GenericGenerator(name="system-uuid", strategy = "uuid") | ||
@Access(AccessType.PROPERTY) | ||
protected String id; | ||
|
||
/* (non-Javadoc) | ||
* @see com.axonivy.persistence.beans.GenericEntity#getId() | ||
*/ | ||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
/* (non-Javadoc) | ||
* @see com.axonivy.persistence.beans.GenericEntity#setId(java.io.Serializable) | ||
*/ | ||
@Override | ||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* Get Ivy.session().getSessionUserName() as default session username, or override it later. | ||
*/ | ||
@Override | ||
public String getSessionUsername() { | ||
return Ivy.session().getSessionUserName(); | ||
} | ||
|
||
} |
Oops, something went wrong.