All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gs.fw.common.mithra.notification.RunsMasterQueueData Maven / Gradle / Ivy

There is a newer version: 18.1.0
Show newest version
package com.gs.fw.common.mithra.notification;
import java.util.*;
import java.sql.Timestamp;
import java.sql.Date;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
import java.io.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.attribute.*;
import com.gs.fw.common.mithra.util.*;
import com.gs.fw.common.mithra.notification.*;
import com.gs.fw.common.mithra.notification.listener.*;
import com.gs.fw.common.mithra.list.cursor.Cursor;
import com.gs.fw.common.mithra.bulkloader.*;
import com.gs.fw.common.mithra.finder.PrintablePreparedStatement;
import com.gs.fw.common.mithra.finder.RelatedFinder;
import com.gs.fw.common.mithra.cache.offheap.MithraOffHeapDataObject;
import com.gs.fw.common.mithra.cache.offheap.OffHeapDataStorage;
/**
* This file was automatically generated using Mithra 16.7.1. Please do not modify it.
* Add custom logic to its subclass instead.
*/
public class RunsMasterQueueData
implements MithraDataObject
{
	private String entity;
	private int eventId;
	private Timestamp lastUpdateTime;
	private String lastUpdateUserId;
	private int sourceId;
	private byte[] tranId;
	public boolean isEntityNull()
	{
		return this.getEntity() == null;
	}

	public boolean isEventIdNull()
	{
		return false;
	}

	public boolean isLastUpdateTimeNull()
	{
		return this.getLastUpdateTime() == null;
	}

	public boolean isLastUpdateUserIdNull()
	{
		return this.getLastUpdateUserId() == null;
	}

	public boolean isSourceIdNull()
	{
		return false;
	}

	public boolean isTranIdNull()
	{
		return this.getTranId() == null;
	}

	public void zSerializeFullData(ObjectOutput out) throws IOException
	{
		zWriteNullBits(out);
		out.writeObject(this.entity);
		out.writeInt(this.eventId);
		MithraTimestamp.writeTimezoneInsensitiveTimestamp(out, this.lastUpdateTime);
		out.writeObject(this.lastUpdateUserId);
		out.writeInt(this.sourceId);
		if (tranId == null) out.writeInt(-1); else 
		{
			out.writeInt(tranId.length); out.write(tranId); 
		}

		;
	}

	private void zWriteNullBits(ObjectOutput out) throws IOException
	{
	}

	public String getEntity()
	{
		return this.entity;
	}

	public int zGetEntityAsInt()
	{
		return StringPool.getInstance().getOffHeapAddressWithoutAdding(entity);
	}

	public void setEntity(String value)
	{
		this.entity = StringPool.getInstance().getOrAddToCache(value, RunsMasterQueueFinder.isFullCache());
	}

	public void setEntityNull()
	{
		this.setEntity(null);
	}

	public int getEventId()
	{
		return this.eventId;
	}

	public void setEventId(int value)
	{
		this.eventId = value;
	}

	public void setEventIdNull()
	{
		throw new RuntimeException("should never be called");
	}

	public Timestamp getLastUpdateTime()
	{
		return this.lastUpdateTime;
	}

	public long zGetLastUpdateTimeAsLong()
	{
		if (lastUpdateTime == null) return TimestampPool.OFF_HEAP_NULL;
		return lastUpdateTime.getTime();
	}

	public void setLastUpdateTime(Timestamp value)
	{
		this.lastUpdateTime = TimestampPool.getInstance().getOrAddToCache(value, RunsMasterQueueFinder.isFullCache(), RunsMasterQueueFinder.isOffHeap());
	}

	public void setLastUpdateTimeNull()
	{
		this.setLastUpdateTime(null);
	}

	public String getLastUpdateUserId()
	{
		return this.lastUpdateUserId;
	}

	public int zGetLastUpdateUserIdAsInt()
	{
		return StringPool.getInstance().getOffHeapAddressWithoutAdding(lastUpdateUserId);
	}

	public void setLastUpdateUserId(String value)
	{
		this.lastUpdateUserId = StringPool.getInstance().getOrAddToCache(value, RunsMasterQueueFinder.isFullCache());
	}

	public void setLastUpdateUserIdNull()
	{
		this.setLastUpdateUserId(null);
	}

	public int getSourceId()
	{
		return this.sourceId;
	}

	public void setSourceId(int value)
	{
		this.sourceId = value;
	}

	public void setSourceIdNull()
	{
		throw new RuntimeException("should never be called");
	}

	public byte[] getTranId()
	{
		return this.tranId;
	}

	public void setTranId(byte[] value)
	{
		this.tranId = value;
	}

	public void setTranIdNull()
	{
		this.setTranId(null);
	}

	protected void copyInto(RunsMasterQueueData copy, boolean withRelationships)
	{
		copy.entity = this.entity;
		copy.eventId = this.eventId;
		copy.lastUpdateTime = this.lastUpdateTime;
		copy.lastUpdateUserId = this.lastUpdateUserId;
		copy.sourceId = this.sourceId;
		copy.tranId = this.tranId;
		if (withRelationships)
		{
		}
	}

	public void zDeserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.entity = StringPool.getInstance().getOrAddToCache((String)in.readObject(), RunsMasterQueueFinder.isFullCache());
		this.eventId = in.readInt();
		this.lastUpdateTime = TimestampPool.getInstance().getOrAddToCache(MithraTimestamp.readTimezoneInsensitiveTimestamp(in), RunsMasterQueueFinder.isFullCache(), RunsMasterQueueFinder.isOffHeap());
		this.lastUpdateUserId = StringPool.getInstance().getOrAddToCache((String)in.readObject(), RunsMasterQueueFinder.isFullCache());
		this.sourceId = in.readInt();
		int _tranIdLength = in.readInt(); if (_tranIdLength == -1) tranId = null; else 
		{
			tranId = new byte[_tranIdLength];in.readFully(tranId);
		}

		;
	}

	public boolean hasSamePrimaryKeyIgnoringAsOfAttributes(MithraDataObject other)
	{
		if (this == other) return true;
		final RunsMasterQueueData otherData = (RunsMasterQueueData) other;
		if (getEventId() != otherData.getEventId())
		{
			return false;
		}

		if (getSourceId() != otherData.getSourceId())
		{
			return false;
		}

		return true;
	}

	public void zSerializePrimaryKey(ObjectOutput out) throws IOException
	{
		out.writeInt(this.eventId);
		out.writeInt(this.sourceId);
	}

	public void zDeserializePrimaryKey(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.eventId = in.readInt();
		this.sourceId = in.readInt();
	}

	public void clearRelationships()
	{
		clearAllDirectRefs();
	}

	public void clearAllDirectRefs()
	{
	}

	public void zSerializeRelationships(ObjectOutputStream out) throws IOException
	{
	}

	public void zDeserializeRelationships(ObjectInputStream in) throws IOException, ClassNotFoundException
	{
	}

	public MithraOffHeapDataObject zCopyOffHeap()
	{
		throw new RuntimeException("off heap no supported");
	}

	public void copyNonPkAttributes(MithraDataObject newData)
	{
		final RunsMasterQueueData runsMasterQueueData = (RunsMasterQueueData) newData;
		this.setEntity(runsMasterQueueData.getEntity());
		this.setLastUpdateTime(runsMasterQueueData.getLastUpdateTime());
		this.setLastUpdateUserId(runsMasterQueueData.getLastUpdateUserId());
		this.setSourceId(runsMasterQueueData.getSourceId());
		this.setTranId(runsMasterQueueData.getTranId());
	}

	public byte zGetDataVersion() 
	{
		return (byte)0; 
	}

	public void zSetDataVersion(byte version) 
	{
	}
	// only used by dated objects
	public void zIncrementDataVersion() 
	{
	}

	public boolean zNonPrimaryKeyAttributesChanged(MithraDataObject newData)
	{
		return this.zNonPrimaryKeyAttributesChanged(newData, 0.0);
	}

	public boolean zNonPrimaryKeyAttributesChanged(MithraDataObject newData, double toleranceForFloatingPointFields)
	{
		final RunsMasterQueueData other = (RunsMasterQueueData) newData;
		if (!isEntityNull() ? !getEntity().equals(other.getEntity()) : !other.isEntityNull())
		{
			return true;
		}

		if (!isLastUpdateTimeNull() ? !getLastUpdateTime().equals(other.getLastUpdateTime()) : !other.isLastUpdateTimeNull())
		{
			return true;
		}

		if (!isLastUpdateUserIdNull() ? !getLastUpdateUserId().equals(other.getLastUpdateUserId()) : !other.isLastUpdateUserIdNull())
		{
			return true;
		}

		if ( getSourceId() != other.getSourceId())
		{
			return true;
		}

		if (!isTranIdNull() ? !Arrays.equals(getTranId(),other.getTranId()) : !other.isTranIdNull())
		{
			return true;
		}

		return false;
	}

	public MithraDataObject copy()
	{
		RunsMasterQueueData copy = new RunsMasterQueueData();
		this.copyInto(copy, true);
		return copy;
	}

	public MithraDataObject copy(boolean withRelationships)
	{
		RunsMasterQueueData copy = new RunsMasterQueueData();
		this.copyInto(copy, withRelationships);
		return copy;
	}

	public String zGetPrintablePrimaryKey()
	{
		String result = "";
		result += "eventId: "+(""+getEventId())+ " / ";
		result += "sourceId: "+(""+getSourceId())+ " / ";
		return result;
	}

	public boolean zAsOfAttributesFromEquals(MithraDataObject other)
	{
		return true;
	}

	public boolean zAsOfAttributesChanged(MithraDataObject other)
	{
		return false;
	}

	public void zWriteDataClassName(ObjectOutput out) throws IOException
	{
	}

	public String zReadDataClassName(ObjectInput in) throws IOException, ClassNotFoundException
	{
		return "com.gs.fw.common.mithra.notification.RunsMasterQueueData";
	}

	public boolean changed(MithraDataObject newData)
	{
		if(zNonPrimaryKeyAttributesChanged(newData))
		{
			return true;
		}
		else
		{
			return zAsOfAttributesChanged(newData);
		}
	}

	public boolean zHasSameNullPrimaryKeyAttributes(MithraDataObject newData)
	{
		return true;
	}

	public MithraObjectPortal zGetMithraObjectPortal(int hierarchyDepth)
	{
		return RunsMasterQueueFinder.getMithraObjectPortal();
	}

	public MithraObjectPortal zGetMithraObjectPortal()
	{
		return RunsMasterQueueFinder.getMithraObjectPortal();
	}

	public Number zGetIdentityValue()
	{
		return null;
	}

	public boolean zHasIdentity()
	{
		return false;
	}

	public void zSetIdentity(Number identityValue)
	{
	}

	public String zGetSerializationClassName()
	{
		return "com.gs.fw.common.mithra.notification.RunsMasterQueueData";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy