-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.java
180 lines (156 loc) · 5.06 KB
/
Image.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// This file was generated by Mendix Business Modeler.
//
// WARNING: Code you write here will be lost the next time you deploy the project.
package system.proxies;
import com.mendix.core.Core;
import com.mendix.core.CoreException;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.systemwideinterfaces.core.IMendixIdentifier;
import com.mendix.systemwideinterfaces.core.IMendixObject;
/**
*
*/
public class Image extends system.proxies.FileDocument
{
/**
* Internal name of this entity
*/
public static final String entityName = "System.Image";
/**
* Enum describing members of this entity
*/
public enum MemberNames
{
PublicThumbnailPath("PublicThumbnailPath"),
FileID("FileID"),
Name("Name"),
DeleteAfterDownload("DeleteAfterDownload"),
Contents("Contents"),
HasContents("HasContents");
private String metaName;
MemberNames(String s)
{
metaName = s;
}
@Override
public String toString()
{
return metaName;
}
}
public Image(IContext context)
{
this(context, Core.instantiate(context, "System.Image"));
}
protected Image(IContext context, IMendixObject imageMendixObject)
{
super(context, imageMendixObject);
if (!Core.isSubClassOf("System.Image", imageMendixObject.getType()))
throw new IllegalArgumentException("The given object is not a System.Image");
}
/**
* @deprecated Use 'new Image(Context)' instead. Note that the constructor will not insert the new object in the database.
*/
@Deprecated
public static system.proxies.Image create(IContext context) throws CoreException
{
IMendixObject mendixObject = Core.create(context, "System.Image");
return new system.proxies.Image(context, mendixObject);
}
/**
* @deprecated Use 'Image.load(IContext, IMendixIdentifier)' instead.
*/
@Deprecated
public static system.proxies.Image initialize(IContext context, IMendixIdentifier mendixIdentifier) throws CoreException
{
return system.proxies.Image.load(context, mendixIdentifier);
}
/**
* Initialize a proxy using context (recommended). This context will be used for security checking when the get- and set-methods without context parameters are called.
* The get- and set-methods with context parameter should be used when for instance sudo access is necessary (IContext.getSudoContext() can be used to obtain sudo access).
*/
public static system.proxies.Image initialize(IContext context, IMendixObject mendixObject)
{
if (Core.isSubClassOf("Bootswatch.Theme", mendixObject.getType()))
return bootswatch.proxies.Theme.initialize(context, mendixObject);
return new system.proxies.Image(context, mendixObject);
}
public static system.proxies.Image load(IContext context, IMendixIdentifier mendixIdentifier) throws CoreException
{
IMendixObject mendixObject = Core.retrieveId(context, mendixIdentifier);
return system.proxies.Image.initialize(context, mendixObject);
}
public static java.util.List<? extends system.proxies.Image> load(IContext context, String xpathConstraint) throws CoreException
{
java.util.List<system.proxies.Image> result = new java.util.ArrayList<system.proxies.Image>();
for (IMendixObject obj : Core.retrieveXPathQuery(context, "//System.Image" + xpathConstraint))
result.add(system.proxies.Image.initialize(context, obj));
return result;
}
/**
* @return value of PublicThumbnailPath
*/
public final String getPublicThumbnailPath()
{
return getPublicThumbnailPath(getContext());
}
/**
* @param context
* @return value of PublicThumbnailPath
*/
public final String getPublicThumbnailPath(IContext context)
{
return (String) getMendixObject().getValue(context, MemberNames.PublicThumbnailPath.toString());
}
/**
* Set value of PublicThumbnailPath
* @param publicthumbnailpath
*/
public final void setPublicThumbnailPath(String publicthumbnailpath)
{
setPublicThumbnailPath(getContext(), publicthumbnailpath);
}
/**
* Set value of PublicThumbnailPath
* @param context
* @param publicthumbnailpath
*/
public final void setPublicThumbnailPath(IContext context, String publicthumbnailpath)
{
getMendixObject().setValue(context, MemberNames.PublicThumbnailPath.toString(), publicthumbnailpath);
}
@Override
public boolean equals(Object obj)
{
if (obj == this)
return true;
if (obj != null && getClass().equals(obj.getClass()))
{
final system.proxies.Image that = (system.proxies.Image) obj;
return getMendixObject().equals(that.getMendixObject());
}
return false;
}
@Override
public int hashCode()
{
return getMendixObject().hashCode();
}
/**
* @return String name of this class
*/
public static String getType()
{
return "System.Image";
}
/**
* @return String GUID from this object, format: ID_0000000000
* @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object.
*/
@Override
@Deprecated
public String getGUID()
{
return "ID_" + getMendixObject().getId().toLong();
}
}