|
| 1 | +// This file was generated by Mendix Studio Pro. |
| 2 | +// |
| 3 | +// WARNING: Code you write here will be lost the next time you deploy the project. |
| 4 | + |
| 5 | +package system.proxies; |
| 6 | + |
| 7 | +public class ODataResponse |
| 8 | +{ |
| 9 | + private final com.mendix.systemwideinterfaces.core.IMendixObject oDataResponseMendixObject; |
| 10 | + |
| 11 | + private final com.mendix.systemwideinterfaces.core.IContext context; |
| 12 | + |
| 13 | + /** |
| 14 | + * Internal name of this entity |
| 15 | + */ |
| 16 | + public static final java.lang.String entityName = "System.ODataResponse"; |
| 17 | + |
| 18 | + /** |
| 19 | + * Enum describing members of this entity |
| 20 | + */ |
| 21 | + public enum MemberNames |
| 22 | + { |
| 23 | + Count("Count"); |
| 24 | + |
| 25 | + private final java.lang.String metaName; |
| 26 | + |
| 27 | + MemberNames(java.lang.String s) |
| 28 | + { |
| 29 | + metaName = s; |
| 30 | + } |
| 31 | + |
| 32 | + @java.lang.Override |
| 33 | + public java.lang.String toString() |
| 34 | + { |
| 35 | + return metaName; |
| 36 | + } |
| 37 | + } |
| 38 | + |
| 39 | + public ODataResponse(com.mendix.systemwideinterfaces.core.IContext context) |
| 40 | + { |
| 41 | + this(context, com.mendix.core.Core.instantiate(context, entityName)); |
| 42 | + } |
| 43 | + |
| 44 | + protected ODataResponse(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject oDataResponseMendixObject) |
| 45 | + { |
| 46 | + if (oDataResponseMendixObject == null) { |
| 47 | + throw new java.lang.IllegalArgumentException("The given object cannot be null."); |
| 48 | + } |
| 49 | + if (!com.mendix.core.Core.isSubClassOf(entityName, oDataResponseMendixObject.getType())) { |
| 50 | + throw new java.lang.IllegalArgumentException(String.format("The given object is not a %s", entityName)); |
| 51 | + } |
| 52 | + |
| 53 | + this.oDataResponseMendixObject = oDataResponseMendixObject; |
| 54 | + this.context = context; |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * @deprecated Use 'ODataResponse.load(IContext, IMendixIdentifier)' instead. |
| 59 | + */ |
| 60 | + @java.lang.Deprecated |
| 61 | + public static system.proxies.ODataResponse initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException |
| 62 | + { |
| 63 | + return system.proxies.ODataResponse.load(context, mendixIdentifier); |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * 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. |
| 68 | + * The get- and set-methods with context parameter should be used when for instance sudo access is necessary (IContext.createSudoClone() can be used to obtain sudo access). |
| 69 | + * @param context The context to be used |
| 70 | + * @param mendixObject The Mendix object for the new instance |
| 71 | + * @return a new instance of this proxy class |
| 72 | + */ |
| 73 | + public static system.proxies.ODataResponse initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject) |
| 74 | + { |
| 75 | + return new system.proxies.ODataResponse(context, mendixObject); |
| 76 | + } |
| 77 | + |
| 78 | + public static system.proxies.ODataResponse load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException |
| 79 | + { |
| 80 | + com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier); |
| 81 | + return system.proxies.ODataResponse.initialize(context, mendixObject); |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Commit the changes made on this proxy object. |
| 86 | + * @throws com.mendix.core.CoreException |
| 87 | + */ |
| 88 | + public final void commit() throws com.mendix.core.CoreException |
| 89 | + { |
| 90 | + com.mendix.core.Core.commit(context, getMendixObject()); |
| 91 | + } |
| 92 | + |
| 93 | + /** |
| 94 | + * Commit the changes made on this proxy object using the specified context. |
| 95 | + * @throws com.mendix.core.CoreException |
| 96 | + */ |
| 97 | + public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException |
| 98 | + { |
| 99 | + com.mendix.core.Core.commit(context, getMendixObject()); |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Delete the object. |
| 104 | + */ |
| 105 | + public final void delete() |
| 106 | + { |
| 107 | + com.mendix.core.Core.delete(context, getMendixObject()); |
| 108 | + } |
| 109 | + |
| 110 | + /** |
| 111 | + * Delete the object using the specified context. |
| 112 | + */ |
| 113 | + public final void delete(com.mendix.systemwideinterfaces.core.IContext context) |
| 114 | + { |
| 115 | + com.mendix.core.Core.delete(context, getMendixObject()); |
| 116 | + } |
| 117 | + /** |
| 118 | + * @return value of Count |
| 119 | + */ |
| 120 | + public final java.lang.Long getCount() |
| 121 | + { |
| 122 | + return getCount(getContext()); |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * @param context |
| 127 | + * @return value of Count |
| 128 | + */ |
| 129 | + public final java.lang.Long getCount(com.mendix.systemwideinterfaces.core.IContext context) |
| 130 | + { |
| 131 | + return (java.lang.Long) getMendixObject().getValue(context, MemberNames.Count.toString()); |
| 132 | + } |
| 133 | + |
| 134 | + /** |
| 135 | + * Set value of Count |
| 136 | + * @param count |
| 137 | + */ |
| 138 | + public final void setCount(java.lang.Long count) |
| 139 | + { |
| 140 | + setCount(getContext(), count); |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * Set value of Count |
| 145 | + * @param context |
| 146 | + * @param count |
| 147 | + */ |
| 148 | + public final void setCount(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Long count) |
| 149 | + { |
| 150 | + getMendixObject().setValue(context, MemberNames.Count.toString(), count); |
| 151 | + } |
| 152 | + |
| 153 | + /** |
| 154 | + * @return the IMendixObject instance of this proxy for use in the Core interface. |
| 155 | + */ |
| 156 | + public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject() |
| 157 | + { |
| 158 | + return oDataResponseMendixObject; |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization. |
| 163 | + */ |
| 164 | + public final com.mendix.systemwideinterfaces.core.IContext getContext() |
| 165 | + { |
| 166 | + return context; |
| 167 | + } |
| 168 | + |
| 169 | + @java.lang.Override |
| 170 | + public boolean equals(Object obj) |
| 171 | + { |
| 172 | + if (obj == this) { |
| 173 | + return true; |
| 174 | + } |
| 175 | + if (obj != null && getClass().equals(obj.getClass())) |
| 176 | + { |
| 177 | + final system.proxies.ODataResponse that = (system.proxies.ODataResponse) obj; |
| 178 | + return getMendixObject().equals(that.getMendixObject()); |
| 179 | + } |
| 180 | + return false; |
| 181 | + } |
| 182 | + |
| 183 | + @java.lang.Override |
| 184 | + public int hashCode() |
| 185 | + { |
| 186 | + return getMendixObject().hashCode(); |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * @return String name of this class |
| 191 | + */ |
| 192 | + public static java.lang.String getType() |
| 193 | + { |
| 194 | + return entityName; |
| 195 | + } |
| 196 | + |
| 197 | + /** |
| 198 | + * @return String GUID from this object, format: ID_0000000000 |
| 199 | + * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. |
| 200 | + */ |
| 201 | + @java.lang.Deprecated |
| 202 | + public java.lang.String getGUID() |
| 203 | + { |
| 204 | + return "ID_" + getMendixObject().getId().toLong(); |
| 205 | + } |
| 206 | +} |
0 commit comments