Skip to content

Commit 82e06f7

Browse files
author
Roeland.Salij
committed
Added getmember values by list functions
1 parent 38fda9e commit 82e06f7

16 files changed

+432
-0
lines changed

src/ObjectHandling/GPUCache/data_0

44 KB
Binary file not shown.

src/ObjectHandling/GPUCache/data_1

264 KB
Binary file not shown.

src/ObjectHandling/GPUCache/data_2

8 KB
Binary file not shown.

src/ObjectHandling/GPUCache/data_3

4.01 MB
Binary file not shown.

src/ObjectHandling/GPUCache/index

256 KB
Binary file not shown.

src/ObjectHandling/ObjectHandling.mpr

28 KB
Binary file not shown.
8.54 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 metamodel.actions;
11+
12+
import java.util.ArrayList;
13+
import com.mendix.core.Core;
14+
import com.mendix.systemwideinterfaces.core.IContext;
15+
import com.mendix.webui.CustomJavaAction;
16+
import metamodel.proxies.Entity;
17+
import com.mendix.systemwideinterfaces.core.IMendixObject;
18+
import com.mendix.systemwideinterfaces.core.meta.IMetaObject;
19+
20+
public class GetAllEntityNames extends CustomJavaAction<java.util.List<IMendixObject>>
21+
{
22+
public GetAllEntityNames(IContext context)
23+
{
24+
super(context);
25+
}
26+
27+
@java.lang.Override
28+
public java.util.List<IMendixObject> executeAction() throws Exception
29+
{
30+
// BEGIN USER CODE
31+
ArrayList<IMendixObject> result = new ArrayList<IMendixObject>();
32+
for(IMetaObject metaObject : Core.getMetaObjects())
33+
{
34+
IMendixObject entity = Core.instantiate(getContext(), Entity.getType());
35+
entity.setValue(getContext(), Entity.MemberNames.CompleteName.toString(), metaObject.getName());
36+
result.add(entity);
37+
}
38+
return result;
39+
// END USER CODE
40+
}
41+
42+
/**
43+
* Returns a string representation of this action
44+
*/
45+
@java.lang.Override
46+
public java.lang.String toString()
47+
{
48+
return "GetAllEntityNames";
49+
}
50+
51+
// BEGIN EXTRA CODE
52+
// END EXTRA CODE
53+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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 metamodel.actions;
11+
12+
import java.util.ArrayList;
13+
import com.mendix.core.Core;
14+
import com.mendix.systemwideinterfaces.core.IContext;
15+
import com.mendix.webui.CustomJavaAction;
16+
import metamodel.proxies.Association;
17+
import com.mendix.systemwideinterfaces.core.IMendixObject;
18+
import com.mendix.systemwideinterfaces.core.meta.IMetaAssociation;
19+
import com.mendix.systemwideinterfaces.core.meta.IMetaObject;
20+
21+
public class GetAssociationsOfEntity extends CustomJavaAction<java.util.List<IMendixObject>>
22+
{
23+
private java.lang.String entityName;
24+
25+
public GetAssociationsOfEntity(IContext context, java.lang.String entityName)
26+
{
27+
super(context);
28+
this.entityName = entityName;
29+
}
30+
31+
@java.lang.Override
32+
public java.util.List<IMendixObject> executeAction() throws Exception
33+
{
34+
// BEGIN USER CODE
35+
IMetaObject metaObject = Core.getMetaObject(entityName);
36+
if (metaObject==null) return null;
37+
ArrayList<IMendixObject> result = new ArrayList<IMendixObject>();
38+
for(IMetaAssociation metaAssoc : metaObject.getMetaAssociationsParent())
39+
{
40+
IMendixObject assoc = Core.instantiate(getContext(), Association.getType());
41+
assoc.setValue(getContext(), Association.MemberNames.CompleteName.toString(), metaAssoc.getName());
42+
assoc.setValue(getContext(), Association.MemberNames.TargetEntityName.toString(), metaAssoc.getChild().getName());
43+
result.add(assoc);
44+
}
45+
return result;
46+
// END USER CODE
47+
}
48+
49+
/**
50+
* Returns a string representation of this action
51+
*/
52+
@java.lang.Override
53+
public java.lang.String toString()
54+
{
55+
return "GetAssociationsOfEntity";
56+
}
57+
58+
// BEGIN EXTRA CODE
59+
// END EXTRA CODE
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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 metamodel.actions;
11+
12+
import java.util.ArrayList;
13+
import com.mendix.core.Core;
14+
import com.mendix.systemwideinterfaces.core.IContext;
15+
import com.mendix.webui.CustomJavaAction;
16+
import metamodel.proxies.Attribute;
17+
import com.mendix.systemwideinterfaces.core.IMendixObject;
18+
import com.mendix.systemwideinterfaces.core.meta.IMetaObject;
19+
import com.mendix.systemwideinterfaces.core.meta.IMetaPrimitive;
20+
21+
public class GetAttributesOfEntity extends CustomJavaAction<java.util.List<IMendixObject>>
22+
{
23+
private java.lang.String entityName;
24+
25+
public GetAttributesOfEntity(IContext context, java.lang.String entityName)
26+
{
27+
super(context);
28+
this.entityName = entityName;
29+
}
30+
31+
@java.lang.Override
32+
public java.util.List<IMendixObject> executeAction() throws Exception
33+
{
34+
// BEGIN USER CODE
35+
IMetaObject metaObject = Core.getMetaObject(entityName);
36+
if (metaObject==null) return null;
37+
ArrayList<IMendixObject> result = new ArrayList<IMendixObject>();
38+
for(IMetaPrimitive metaPrim : metaObject.getMetaPrimitives())
39+
{
40+
IMendixObject attribute = Core.instantiate(getContext(), Attribute.getType());
41+
attribute.setValue(getContext(), Attribute.MemberNames.AttributeName.toString(), metaPrim.getName());
42+
attribute.setValue(getContext(), Attribute.MemberNames.AttributeType.toString(), metaPrim.getType().toString());
43+
result.add(attribute);
44+
}
45+
return result;
46+
// END USER CODE
47+
}
48+
49+
/**
50+
* Returns a string representation of this action
51+
*/
52+
@java.lang.Override
53+
public java.lang.String toString()
54+
{
55+
return "GetAttributesOfEntity";
56+
}
57+
58+
// BEGIN EXTRA CODE
59+
// END EXTRA CODE
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 metamodel.actions;
11+
12+
import java.util.Stack;
13+
import com.mendix.core.actionmanagement.CoreAction;
14+
import com.mendix.systemwideinterfaces.core.IContext;
15+
import com.mendix.webui.CustomJavaAction;
16+
17+
public class GetMicroflowName extends CustomJavaAction<java.lang.String>
18+
{
19+
public GetMicroflowName(IContext context)
20+
{
21+
super(context);
22+
}
23+
24+
@java.lang.Override
25+
public java.lang.String executeAction() throws Exception
26+
{
27+
// BEGIN USER CODE
28+
Stack<CoreAction<?>> actionStack = getContext().getActionStack();
29+
if (!actionStack.isEmpty()) {
30+
CoreAction<?> lastAction = actionStack.get(actionStack.size()-2);
31+
return lastAction.getActionName();
32+
} else {
33+
return "";
34+
}
35+
// END USER CODE
36+
}
37+
38+
/**
39+
* Returns a string representation of this action
40+
*/
41+
@java.lang.Override
42+
public java.lang.String toString()
43+
{
44+
return "GetMicroflowName";
45+
}
46+
47+
// BEGIN EXTRA CODE
48+
// END EXTRA CODE
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 metamodel.actions;
11+
12+
import java.util.ArrayList;
13+
import java.util.TreeSet;
14+
import com.mendix.core.Core;
15+
import com.mendix.systemwideinterfaces.core.IContext;
16+
import com.mendix.webui.CustomJavaAction;
17+
import metamodel.proxies.Microflow;
18+
import com.mendix.systemwideinterfaces.core.IMendixObject;
19+
20+
public class GetMicroflowNames extends CustomJavaAction<java.util.List<IMendixObject>>
21+
{
22+
public GetMicroflowNames(IContext context)
23+
{
24+
super(context);
25+
}
26+
27+
@java.lang.Override
28+
public java.util.List<IMendixObject> executeAction() throws Exception
29+
{
30+
// BEGIN USER CODE
31+
ArrayList<IMendixObject> result = new ArrayList<IMendixObject>();
32+
TreeSet<String> mfSet = new TreeSet<String>(Core.getMicroflowNames());
33+
for(String mfName : mfSet)
34+
{
35+
IMendixObject entity = Core.instantiate(getContext(), Microflow.getType());
36+
entity.setValue(getContext(), Microflow.MemberNames.CompleteName.toString(), mfName);
37+
result.add(entity);
38+
}
39+
return result;
40+
// END USER CODE
41+
}
42+
43+
/**
44+
* Returns a string representation of this action
45+
*/
46+
@java.lang.Override
47+
public java.lang.String toString()
48+
{
49+
return "GetMicroflowNames";
50+
}
51+
52+
// BEGIN EXTRA CODE
53+
// END EXTRA CODE
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 metamodel.actions;
11+
12+
import java.util.Stack;
13+
import com.mendix.core.actionmanagement.CoreAction;
14+
import com.mendix.systemwideinterfaces.core.IContext;
15+
import com.mendix.webui.CustomJavaAction;
16+
17+
public class GetModuleName extends CustomJavaAction<java.lang.String>
18+
{
19+
public GetModuleName(IContext context)
20+
{
21+
super(context);
22+
}
23+
24+
@java.lang.Override
25+
public java.lang.String executeAction() throws Exception
26+
{
27+
// BEGIN USER CODE
28+
Stack<CoreAction<?>> actionStack = getContext().getActionStack();
29+
if (!actionStack.isEmpty()) {
30+
CoreAction<?> lastAction = actionStack.get(actionStack.size()-2);
31+
return lastAction.getActionName().split("\\.")[0];
32+
} else {
33+
return "";
34+
}
35+
// END USER CODE
36+
}
37+
38+
/**
39+
* Returns a string representation of this action
40+
*/
41+
@java.lang.Override
42+
public java.lang.String toString()
43+
{
44+
return "GetModuleName";
45+
}
46+
47+
// BEGIN EXTRA CODE
48+
// END EXTRA CODE
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 objecthandling.actions;
11+
12+
import com.mendix.systemwideinterfaces.core.IContext;
13+
import com.mendix.systemwideinterfaces.core.IMendixObject;
14+
import com.mendix.webui.CustomJavaAction;
15+
16+
public class getMemberValueByMemberName extends CustomJavaAction<java.lang.String>
17+
{
18+
private IMendixObject MxObject;
19+
private java.lang.String AttributeName;
20+
21+
public getMemberValueByMemberName(IContext context, IMendixObject MxObject, java.lang.String AttributeName)
22+
{
23+
super(context);
24+
this.MxObject = MxObject;
25+
this.AttributeName = AttributeName;
26+
}
27+
28+
@java.lang.Override
29+
public java.lang.String executeAction() throws Exception
30+
{
31+
// BEGIN USER CODE
32+
33+
return MxObject.getValue(getContext(), AttributeName);
34+
35+
// END USER CODE
36+
}
37+
38+
/**
39+
* Returns a string representation of this action
40+
*/
41+
@java.lang.Override
42+
public java.lang.String toString()
43+
{
44+
return "getMemberValueByMemberName";
45+
}
46+
47+
// BEGIN EXTRA CODE
48+
// END EXTRA CODE
49+
}

0 commit comments

Comments
 (0)