// This file was generated by Mendix Modeler.
//
// WARNING: Code you write here will be lost the next time you deploy the project.

package googlecharts.proxies;

public class Cell
{
	private final com.mendix.systemwideinterfaces.core.IMendixObject cellMendixObject;

	private final com.mendix.systemwideinterfaces.core.IContext context;

	/**
	 * Internal name of this entity
	 */
	public static final java.lang.String entityName = "GoogleCharts.Cell";

	/**
	 * Enum describing members of this entity
	 */
	public enum MemberNames
	{
		DecimalValue("DecimalValue"),
		StringValue("StringValue"),
		DateTimeValue("DateTimeValue"),
		c("GoogleCharts.c");

		private java.lang.String metaName;

		MemberNames(java.lang.String s)
		{
			metaName = s;
		}

		@Override
		public java.lang.String toString()
		{
			return metaName;
		}
	}

	public Cell(com.mendix.systemwideinterfaces.core.IContext context)
	{
		this(context, com.mendix.core.Core.instantiate(context, "GoogleCharts.Cell"));
	}

	protected Cell(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject cellMendixObject)
	{
		if (cellMendixObject == null)
			throw new java.lang.IllegalArgumentException("The given object cannot be null.");
		if (!com.mendix.core.Core.isSubClassOf("GoogleCharts.Cell", cellMendixObject.getType()))
			throw new java.lang.IllegalArgumentException("The given object is not a GoogleCharts.Cell");

		this.cellMendixObject = cellMendixObject;
		this.context = context;
	}

	/**
	 * @deprecated Use 'Cell.load(IContext, IMendixIdentifier)' instead.
	 */
	@Deprecated
	public static googlecharts.proxies.Cell initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException
	{
		return googlecharts.proxies.Cell.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.createSudoClone() can be used to obtain sudo access).
	 */
	public static googlecharts.proxies.Cell initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)
	{
		return new googlecharts.proxies.Cell(context, mendixObject);
	}

	public static googlecharts.proxies.Cell load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException
	{
		com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier);
		return googlecharts.proxies.Cell.initialize(context, mendixObject);
	}

	/**
	 * Commit the changes made on this proxy object.
	 */
	public final void commit() throws com.mendix.core.CoreException
	{
		com.mendix.core.Core.commit(context, getMendixObject());
	}

	/**
	 * Commit the changes made on this proxy object using the specified context.
	 */
	public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException
	{
		com.mendix.core.Core.commit(context, getMendixObject());
	}

	/**
	 * Delete the object.
	 */
	public final void delete()
	{
		com.mendix.core.Core.delete(context, getMendixObject());
	}

	/**
	 * Delete the object using the specified context.
	 */
	public final void delete(com.mendix.systemwideinterfaces.core.IContext context)
	{
		com.mendix.core.Core.delete(context, getMendixObject());
	}
	/**
	 * @return value of DecimalValue
	 */
	public final java.math.BigDecimal getDecimalValue()
	{
		return getDecimalValue(getContext());
	}

	/**
	 * @param context
	 * @return value of DecimalValue
	 */
	public final java.math.BigDecimal getDecimalValue(com.mendix.systemwideinterfaces.core.IContext context)
	{
		return (java.math.BigDecimal) getMendixObject().getValue(context, MemberNames.DecimalValue.toString());
	}

	/**
	 * Set value of DecimalValue
	 * @param decimalvalue
	 */
	public final void setDecimalValue(java.math.BigDecimal decimalvalue)
	{
		setDecimalValue(getContext(), decimalvalue);
	}

	/**
	 * Set value of DecimalValue
	 * @param context
	 * @param decimalvalue
	 */
	public final void setDecimalValue(com.mendix.systemwideinterfaces.core.IContext context, java.math.BigDecimal decimalvalue)
	{
		getMendixObject().setValue(context, MemberNames.DecimalValue.toString(), decimalvalue);
	}

	/**
	 * @return value of StringValue
	 */
	public final java.lang.String getStringValue()
	{
		return getStringValue(getContext());
	}

	/**
	 * @param context
	 * @return value of StringValue
	 */
	public final java.lang.String getStringValue(com.mendix.systemwideinterfaces.core.IContext context)
	{
		return (java.lang.String) getMendixObject().getValue(context, MemberNames.StringValue.toString());
	}

	/**
	 * Set value of StringValue
	 * @param stringvalue
	 */
	public final void setStringValue(java.lang.String stringvalue)
	{
		setStringValue(getContext(), stringvalue);
	}

	/**
	 * Set value of StringValue
	 * @param context
	 * @param stringvalue
	 */
	public final void setStringValue(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String stringvalue)
	{
		getMendixObject().setValue(context, MemberNames.StringValue.toString(), stringvalue);
	}

	/**
	 * @return value of DateTimeValue
	 */
	public final java.util.Date getDateTimeValue()
	{
		return getDateTimeValue(getContext());
	}

	/**
	 * @param context
	 * @return value of DateTimeValue
	 */
	public final java.util.Date getDateTimeValue(com.mendix.systemwideinterfaces.core.IContext context)
	{
		return (java.util.Date) getMendixObject().getValue(context, MemberNames.DateTimeValue.toString());
	}

	/**
	 * Set value of DateTimeValue
	 * @param datetimevalue
	 */
	public final void setDateTimeValue(java.util.Date datetimevalue)
	{
		setDateTimeValue(getContext(), datetimevalue);
	}

	/**
	 * Set value of DateTimeValue
	 * @param context
	 * @param datetimevalue
	 */
	public final void setDateTimeValue(com.mendix.systemwideinterfaces.core.IContext context, java.util.Date datetimevalue)
	{
		getMendixObject().setValue(context, MemberNames.DateTimeValue.toString(), datetimevalue);
	}

	/**
	 * @return value of c
	 */
	public final googlecharts.proxies.Row getc() throws com.mendix.core.CoreException
	{
		return getc(getContext());
	}

	/**
	 * @param context
	 * @return value of c
	 */
	public final googlecharts.proxies.Row getc(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException
	{
		googlecharts.proxies.Row result = null;
		com.mendix.systemwideinterfaces.core.IMendixIdentifier identifier = getMendixObject().getValue(context, MemberNames.c.toString());
		if (identifier != null)
			result = googlecharts.proxies.Row.load(context, identifier);
		return result;
	}

	/**
	 * Set value of c
	 * @param c
	 */
	public final void setc(googlecharts.proxies.Row c)
	{
		setc(getContext(), c);
	}

	/**
	 * Set value of c
	 * @param context
	 * @param c
	 */
	public final void setc(com.mendix.systemwideinterfaces.core.IContext context, googlecharts.proxies.Row c)
	{
		if (c == null)
			getMendixObject().setValue(context, MemberNames.c.toString(), null);
		else
			getMendixObject().setValue(context, MemberNames.c.toString(), c.getMendixObject().getId());
	}

	/**
	 * @return the IMendixObject instance of this proxy for use in the Core interface.
	 */
	public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject()
	{
		return cellMendixObject;
	}

	/**
	 * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization.
	 */
	public final com.mendix.systemwideinterfaces.core.IContext getContext()
	{
		return context;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (obj == this)
			return true;

		if (obj != null && getClass().equals(obj.getClass()))
		{
			final googlecharts.proxies.Cell that = (googlecharts.proxies.Cell) obj;
			return getMendixObject().equals(that.getMendixObject());
		}
		return false;
	}

	@Override
	public int hashCode()
	{
		return getMendixObject().hashCode();
	}

	/**
	 * @return String name of this class
	 */
	public static java.lang.String getType()
	{
		return "GoogleCharts.Cell";
	}

	/**
	 * @return String GUID from this object, format: ID_0000000000
	 * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object.
	 */
	@Deprecated
	public java.lang.String getGUID()
	{
		return "ID_" + getMendixObject().getId().toLong();
	}
}
