-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support time converter, support oplock exception
- Loading branch information
1 parent
b0d9a5f
commit feaedcd
Showing
13 changed files
with
189 additions
and
13 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
allprojects { | ||
group = "org.babyfish.jimmer" | ||
version = "0.0.18" | ||
version = "0.0.19" | ||
} |
49 changes: 49 additions & 0 deletions
49
project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/OptimisticLockException.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,49 @@ | ||
package org.babyfish.jimmer.sql; | ||
|
||
import org.babyfish.jimmer.meta.ImmutableType; | ||
|
||
public class OptimisticLockException extends RuntimeException { | ||
|
||
private final ImmutableType entityType; | ||
|
||
private final Object entityId; | ||
|
||
private final int entityVersion; | ||
|
||
private final String path; | ||
|
||
public OptimisticLockException( | ||
ImmutableType entityType, | ||
Object entityId, | ||
int entityVersion, | ||
String path | ||
) { | ||
super( | ||
"Cannot update the entity whose type is \"" + | ||
entityType + | ||
"\", id is \"" + | ||
entityId + | ||
"\" and version is \"" + | ||
entityVersion + | ||
"\" at the path \"" + | ||
path + | ||
"\"" | ||
); | ||
this.entityType = entityType; | ||
this.entityId = entityId; | ||
this.entityVersion = entityVersion; | ||
this.path = path; | ||
} | ||
|
||
public ImmutableType getEntityType() { | ||
return entityType; | ||
} | ||
|
||
public Object getEntityId() { | ||
return entityId; | ||
} | ||
|
||
public String getPath() { | ||
return path; | ||
} | ||
} |
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