Skip to content

Commit 364b235

Browse files
author
JelteMX
committed
Add UUID
1 parent 76b034e commit 364b235

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
// Special characters, e.g., é, ö, à, etc. are supported in comments.
9+
10+
package fakedata.actions;
11+
12+
import com.mendix.systemwideinterfaces.core.IContext;
13+
import com.mendix.webui.CustomJavaAction;
14+
import java.util.UUID;
15+
16+
public class GenerateUUID extends CustomJavaAction<java.lang.String>
17+
{
18+
public GenerateUUID(IContext context)
19+
{
20+
super(context);
21+
}
22+
23+
@java.lang.Override
24+
public java.lang.String executeAction() throws Exception
25+
{
26+
// BEGIN USER CODE
27+
UUID uuid = UUID.randomUUID();
28+
String randomUUIDString = uuid.toString();
29+
return randomUUIDString;
30+
// END USER CODE
31+
}
32+
33+
/**
34+
* Returns a string representation of this action
35+
*/
36+
@java.lang.Override
37+
public java.lang.String toString()
38+
{
39+
return "GenerateUUID";
40+
}
41+
42+
// BEGIN EXTRA CODE
43+
// END EXTRA CODE
44+
}

src/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<file path="javasource\fakedata\actions\GenerateRandomRegexString.java" />
1414
<file path="javasource\fakedata\actions\GenerateRandomStringFromFaker.java" />
1515
<file path="javasource\fakedata\actions\GenerateQuote.java" />
16+
<file path="javasource\fakedata\actions\GenerateUUID.java" />
1617
<file path="javasource\fakedata\actions\GenerateDateBetween.java" />
1718
<file path="javasource\fakedata\actions\GenerateCat.java" />
1819
<file path="javasource\fakedata\actions\GenerateName.java" />

src/project.mpr

4 KB
Binary file not shown.

0 commit comments

Comments
 (0)