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

klass.model.meta.domain.AssociationData 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 AssociationData
implements MithraDataObject
{
	private Object[] _relationships;
	private long criteriaId;
	private String name;
	public boolean isCriteriaIdNull()
	{
		return false;
	}

	public final boolean isNameNull()
	{
		return this.getName() == null;
	}

	public void zSerializeFullData(ObjectOutput out) throws IOException
	{
		zWriteNullBits(out);
		out.writeLong(this.criteriaId);
		out.writeObject(this.name);
	}

	private void zWriteNullBits(ObjectOutput out) throws IOException
	{
	}

	public long getCriteriaId()
	{
		return this.criteriaId;
	}

	public void setCriteriaId(long value)
	{
		this.criteriaId = value;
	}

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

	public String getName()
	{
		return this.name;
	}

	public int zGetNameAsInt()
	{
		return StringPool.getInstance().getOffHeapAddressWithoutAdding(name);
	}

	public void setName(String value)
	{
		this.name = StringPool.getInstance().getOrAddToCache(value, AssociationFinder.isFullCache());
	}

	public void setNameNull()
	{
		this.setName(null);
	}

	protected void copyInto(AssociationData copy, boolean withRelationships)
	{
		copy.criteriaId = this.criteriaId;
		copy.name = this.name;
		if (withRelationships)
		{
			if (_relationships != null)
			{
				copy._relationships = new Object[3];
				System.arraycopy(_relationships, 0, copy._relationships, 0, _relationships.length);
			}
		}
	}

	public void zDeserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.criteriaId = in.readLong();
		this.name = StringPool.getInstance().getOrAddToCache((String)in.readObject(), AssociationFinder.isFullCache());
	}

	public boolean hasSamePrimaryKeyIgnoringAsOfAttributes(MithraDataObject other)
	{
		if (this == other) return true;
		final AssociationData otherData = (AssociationData) other;
		if (!isNameNull() ? !getName().equals(otherData.getName()) : !otherData.isNameNull())
		{
			return false;
		}

		return true;
	}

	public void zSerializePrimaryKey(ObjectOutput out) throws IOException
	{
		out.writeObject(this.name);
	}

	public void zDeserializePrimaryKey(ObjectInput in) throws IOException, ClassNotFoundException
	{
		this.name = StringPool.getInstance().getOrAddToCache((String)in.readObject(), AssociationFinder.isFullCache());
	}

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

	public void clearAllDirectRefs()
	{
	}

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

		return null;
	}

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

		_relationships[0] = related;
	}

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

		return null;
	}

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

		_relationships[1] = related;
	}

	public Object getPackageableElementSuperClass()
	{
		if (_relationships != null)
		{
			return _relationships[2];
		}

		return null;
	}

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

		_relationships[2] = 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