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

klass.model.meta.domain.MemberReferencePathAssociationEndMappingData Maven / Gradle / Ivy

The newest version!
package klass.model.meta.domain;
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 18.0.0. Please do not modify it.
* Add custom logic to its subclass instead.
*/
public class MemberReferencePathAssociationEndMappingData
implements MithraDataObject
{
	private Object[] _relationships;
	private String associationEndName;
	private String associationOwningClassName;
	private long memberReferencePathId;
	private int ordinal;
	public final boolean isAssociationEndNameNull()
	{
		return this.getAssociationEndName() == null;
	}

	public final boolean isAssociationOwningClassNameNull()
	{
		return this.getAssociationOwningClassName() == null;
	}

	public final boolean isMemberReferencePathIdNull()
	{
		return false;
	}

	public boolean isOrdinalNull()
	{
		return false;
	}

	public void zSerializeFullData(ObjectOutput out) throws IOException
	{
		zWriteNullBits(out);
		out.writeObject(this.associationEndName);
		out.writeObject(this.associationOwningClassName);
		out.writeLong(this.memberReferencePathId);
		out.writeInt(this.ordinal);
	}

	private void zWriteNullBits(ObjectOutput out) throws IOException
	{
	}

	public String getAssociationEndName()
	{
		return this.associationEndName;
	}

	public int zGetAssociationEndNameAsInt()
	{
		return StringPool.getInstance().getOffHeapAddressWithoutAdding(associationEndName);
	}

	public void setAssociationEndName(String value)
	{
		this.associationEndName = StringPool.getInstance().getOrAddToCache(value, MemberReferencePathAssociationEndMappingFinder.isFullCache());
	}

	public void setAssociationEndNameNull()
	{
		this.setAssociationEndName(null);
	}

	public String getAssociationOwningClassName()
	{
		return this.associationOwningClassName;
	}

	public int zGetAssociationOwningClassNameAsInt()
	{
		return StringPool.getInstance().getOffHeapAddressWithoutAdding(associationOwningClassName);
	}

	public void setAssociationOwningClassName(String value)
	{
		this.associationOwningClassName = StringPool.getInstance().getOrAddToCache(value, MemberReferencePathAssociationEndMappingFinder.isFullCache());
	}

	public void setAssociationOwningClassNameNull()
	{
		this.setAssociationOwningClassName(null);
	}

	public long getMemberReferencePathId()
	{
		return this.memberReferencePathId;
	}

	public void setMemberReferencePathId(long value)
	{
		this.memberReferencePathId = value;
	}

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

	public int getOrdinal()
	{
		return this.ordinal;
	}

	public void setOrdinal(int value)
	{
		this.ordinal = value;
	}

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

	protected void copyInto(MemberReferencePathAssociationEndMappingData copy, boolean withRelationships)
	{
		copy.associationEndName = this.associationEndName;
		copy.associationOwningClassName = this.associationOwningClassName;
		copy.memberReferencePathId = this.memberReferencePathId;
		copy.ordinal = this.ordinal;
		if (withRelationships)
		{
			if (_relationships != null)
			{
				copy._relationships = new Object[2];
				System.arraycopy(_relationships, 0, copy._relationships, 0, _relationships.length);
			}
		}
	}

	public void zDeserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.associationEndName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), MemberReferencePathAssociationEndMappingFinder.isFullCache());
		this.associationOwningClassName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), MemberReferencePathAssociationEndMappingFinder.isFullCache());
		this.memberReferencePathId = in.readLong();
		this.ordinal = in.readInt();
	}

	public boolean hasSamePrimaryKeyIgnoringAsOfAttributes(MithraDataObject other)
	{
		if (this == other) return true;
		final MemberReferencePathAssociationEndMappingData otherData = (MemberReferencePathAssociationEndMappingData) other;
		if (!isAssociationEndNameNull() ? !getAssociationEndName().equals(otherData.getAssociationEndName()) : !otherData.isAssociationEndNameNull())
		{
			return false;
		}

		if (!isAssociationOwningClassNameNull() ? !getAssociationOwningClassName().equals(otherData.getAssociationOwningClassName()) : !otherData.isAssociationOwningClassNameNull())
		{
			return false;
		}

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

		return true;
	}

	public void zSerializePrimaryKey(ObjectOutput out) throws IOException
	{
		out.writeObject(this.associationEndName);
		out.writeObject(this.associationOwningClassName);
		out.writeLong(this.memberReferencePathId);
	}

	public void zDeserializePrimaryKey(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.associationEndName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), MemberReferencePathAssociationEndMappingFinder.isFullCache());
		this.associationOwningClassName = StringPool.getInstance().getOrAddToCache((String)in.readObject(), MemberReferencePathAssociationEndMappingFinder.isFullCache());
		this.memberReferencePathId = in.readLong();
	}

	public void clearRelationships()
	{
		_relationships = null;
		clearAllDirectRefs();
	}

	public void clearAllDirectRefs()
	{
	}

	public Object getAssociationEnd()
	{
		if (_relationships != null)
		{
			return _relationships[0];
		}

		return null;
	}

	public void setAssociationEnd(Object related)
	{
		if (_relationships == null)
		{
			_relationships = new Object[2];
		}

		_relationships[0] = related;
	}

	public Object getMemberReferencePath()
	{
		if (_relationships != null)
		{
			return _relationships[1];
		}

		return null;
	}

	public void setMemberReferencePath(Object related)
	{
		if (_relationships == null)
		{
			_relationships = new Object[2];
		}

		_relationships[1] = related;
	}

	public void zSerializeRelationships(ObjectOutputStream out) throws IOException
	{
		if (_relationships == null)
		{
			out.writeInt(0);
			return;
		}

		out.writeInt(_relationships.length);
		for(int i=0;i<_relationships.length;i++)
		{
			out.writeObject(_relationships[i]);
		}
	}

	public void zDeserializeRelationships(ObjectInputStream in) throws IOException, ClassNotFoundException
	{
		int total = in.readInt();
		if(total > 0)
		{
			_relationships = new Object[total];
			for(int i=0;i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy