Skip to content

Commit 7598edd

Browse files
author
JelteMX
committed
Update
1 parent 107c8fe commit 7598edd

21 files changed

+239
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.DS_Store
2+
dist/tmp

dist/FakeData.mpk

1.91 MB
Binary file not shown.

src/javasource/fakedata/actions/GenerateApp.java

100755100644
File mode changed.

src/javasource/fakedata/actions/GenerateArtist.java

100755100644
File mode changed.

src/javasource/fakedata/actions/GenerateCat.java

100755100644
File mode changed.

src/javasource/fakedata/actions/GenerateCommerce.java

100755100644
File mode changed.

src/javasource/fakedata/actions/GenerateCountry.java

100755100644
File mode changed.

src/javasource/fakedata/actions/GenerateDateBetween.java

100755100644
File mode changed.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 java.math.BigDecimal;
13+
14+
import com.github.javafaker.Faker;
15+
import com.mendix.systemwideinterfaces.core.IContext;
16+
import com.mendix.webui.CustomJavaAction;
17+
18+
public class GenerateDecimalBetween extends CustomJavaAction<java.math.BigDecimal>
19+
{
20+
private java.lang.Long Min;
21+
private java.lang.Long Max;
22+
private java.lang.Long NumberOfDecimals;
23+
24+
public GenerateDecimalBetween(IContext context, java.lang.Long Min, java.lang.Long Max, java.lang.Long NumberOfDecimals)
25+
{
26+
super(context);
27+
this.Min = Min;
28+
this.Max = Max;
29+
this.NumberOfDecimals = NumberOfDecimals;
30+
}
31+
32+
@java.lang.Override
33+
public java.math.BigDecimal executeAction() throws Exception
34+
{
35+
// BEGIN USER CODE
36+
Faker faker = new Faker();
37+
38+
Long min = (this.Min > this.Max) ? this.Max : this.Min;
39+
Long max = (this.Max < this.Min) ? this.Min : this.Max;
40+
double result = faker.number().randomDouble(this.NumberOfDecimals.intValue(), min, max);
41+
return BigDecimal.valueOf(result);
42+
// END USER CODE
43+
}
44+
45+
/**
46+
* Returns a string representation of this action
47+
*/
48+
@java.lang.Override
49+
public java.lang.String toString()
50+
{
51+
return "GenerateDecimalBetween";
52+
}
53+
54+
// BEGIN EXTRA CODE
55+
// END EXTRA CODE
56+
}

src/javasource/fakedata/actions/GenerateFakeString.java

100755100644
File mode changed.

0 commit comments

Comments
 (0)