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

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

The newest version!
package klass.model.meta.domain;
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.*;
import com.gs.fw.common.mithra.attribute.*;
import com.gs.fw.common.mithra.attribute.calculator.procedure.ObjectProcedure;
import com.gs.fw.common.mithra.behavior.txparticipation.*;
import com.gs.fw.common.mithra.cache.Cache;
import com.gs.fw.common.mithra.cache.bean.*;
import com.gs.fw.common.mithra.extractor.*;
import com.gs.fw.common.mithra.finder.*;
import com.gs.fw.common.mithra.finder.booleanop.*;
import com.gs.fw.common.mithra.finder.integer.*;
import com.gs.fw.common.mithra.finder.longop.*;
import com.gs.fw.common.mithra.finder.orderby.OrderBy;
import com.gs.fw.common.mithra.finder.string.*;
import com.gs.fw.common.mithra.extractor.NormalAndListValueSelector;
import com.gs.fw.common.mithra.list.NulledRelation;
import com.gs.fw.common.mithra.querycache.CachedQuery;
import com.gs.fw.common.mithra.querycache.QueryCache;
import com.gs.fw.common.mithra.portal.*;
import com.gs.fw.common.mithra.remote.*;
import com.gs.fw.common.mithra.transaction.MithraObjectPersister;
import com.gs.fw.common.mithra.util.TimestampPool;
import org.eclipse.collections.impl.map.mutable.UnifiedMap;
import java.io.Serializable;
/**
* This file was automatically generated using Mithra 18.0.0. Please do not modify it.
* Add custom logic to its subclass instead.
*/
public class BinaryCriteriaFinder
{
	private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/BinaryCriteria";
	private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.BinaryCriteria";
	private static final FinderMethodMap finderMethodMap;
	private static boolean isFullCache;
	private static boolean isOffHeap;
	private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.BinaryCriteria");
	private static final BinaryCriteriaSingleFinder finder = new BinaryCriteriaSingleFinder();
	private static ConstantStringSet[] constantStringSets = new ConstantStringSet[0];
	private static ConstantIntSet[] constantIntSets = new ConstantIntSet[0];
	private static ConstantShortSet[] constantShortSets = new ConstantShortSet[0];
	static
	{
		finderMethodMap = new FinderMethodMap(BinaryCriteriaFinder.BinaryCriteriaRelatedFinder.class);
		finderMethodMap.addNormalAttributeName("id");
		finderMethodMap.addNormalAttributeName("leftId");
		finderMethodMap.addNormalAttributeName("rightId");
		finderMethodMap.addRelationshipName("left");
		finderMethodMap.addRelationshipName("right");
		finderMethodMap.addRelationshipName("andCriteriaSubClass");
		finderMethodMap.addRelationshipName("orCriteriaSubClass");
		finderMethodMap.addRelationshipName("criteriaSuperClass");
	}

	public static Attribute[] allPersistentAttributes()
	{
		return finder.getPersistentAttributes();
	}

	public static List allRelatedFinders()
	{
		return finder.getRelationshipFinders();
	}

	public static List allDependentRelatedFinders()
	{
		return finder.getDependentRelationshipFinders();
	}

	public static ConstantStringSet zGetConstantStringSet(int index)
	{
		return constantStringSets[index];
	}

	public static ConstantIntSet zGetConstantIntSet(int index)
	{
		return constantIntSets[index];
	}

	public static ConstantShortSet zGetConstantShortSet(int index)
	{
		return constantShortSets[index];
	}

	public static Mapper zGetConstantJoin(int index)
	{
		return getConstantJoinPool()[index];
	}

	private static Mapper[] constantJoinPool;
	private static Mapper[] getConstantJoinPool()
	{
		if (constantJoinPool == null)
		{
			Mapper[] result = new Mapper[8];
			result[0] = BinaryCriteriaFinder.leftId().constructEqualityMapper(CriteriaFinder.id());
			result[1] = CriteriaFinder.id().constructEqualityMapper(BinaryCriteriaFinder.leftId());
			result[2] = BinaryCriteriaFinder.rightId().constructEqualityMapper(CriteriaFinder.id());
			result[3] = CriteriaFinder.id().constructEqualityMapper(BinaryCriteriaFinder.rightId());
			result[4] = BinaryCriteriaFinder.id().constructEqualityMapper(AndCriteriaFinder.id());
			result[5] = AndCriteriaFinder.id().constructEqualityMapper(BinaryCriteriaFinder.id());
			result[6] = BinaryCriteriaFinder.id().constructEqualityMapper(OrCriteriaFinder.id());
			result[7] = OrCriteriaFinder.id().constructEqualityMapper(BinaryCriteriaFinder.id());
			constantJoinPool = result;
		}

		return constantJoinPool;
	}

	public static SourceAttributeType getSourceAttributeType()
	{
		return null;
	}

	public static BinaryCriteria findOne(com.gs.fw.finder.Operation operation)
	{
		return findOne(operation, false);
	}

	public static BinaryCriteria findOneBypassCache(com.gs.fw.finder.Operation operation)
	{
		return findOne(operation, true);
	}

	public static BinaryCriteriaList findMany(com.gs.fw.finder.Operation operation)
	{
		return (BinaryCriteriaList) finder.findMany(operation);
	}

	public static BinaryCriteriaList findManyBypassCache(com.gs.fw.finder.Operation operation)
	{
		return (BinaryCriteriaList) finder.findManyBypassCache(operation);
	}

	private static BinaryCriteria findOne(com.gs.fw.finder.Operation operation, boolean bypassCache)
	{
		List found = getMithraObjectPortal().find((Operation) operation, bypassCache);
		return (BinaryCriteria) FinderUtils.findOne(found);
	}

	public static BinaryCriteria findByPrimaryKey(long id)
	{
		return finder.findByPrimaryKey(id);
	}

	private static final RelationshipHashStrategy forPrimaryKey = new PrimaryKeyRhs();
	private static final class PrimaryKeyRhs implements RelationshipHashStrategy
	{
		public boolean equalsForRelationship(Object _srcObject, Object _srcData, Object _targetData, Timestamp _asOfDate0, Timestamp _asOfDate1)
		{
			I3O3L3 _bean = (I3O3L3) _srcData;
			BinaryCriteriaData _castedTargetData = (BinaryCriteriaData) _targetData;
			if (_bean.getL1AsLong() == _castedTargetData.getId())
			{
				return true;
			}

			return false;
		}

		public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
		{
			I3O3L3 _bean = (I3O3L3) _srcData;
			return HashUtil.hash(_bean.getL1AsLong());
		}

		public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
		{
			I3O3L3 _bean = (I3O3L3) _srcData;
			return HashUtil.hash(_bean.getL1AsLong());
		}
	}

	public static BinaryCriteria zFindOneForRelationship(Operation operation)
	{
		List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
		return (BinaryCriteria) FinderUtils.findOne(found);
	}

	public static MithraObjectPortal getMithraObjectPortal()
	{
		return objectPortal.getInitializedPortal();
	}

	public static void clearQueryCache()
	{
		objectPortal.clearQueryCache();
	}

	public static void reloadCache()
	{
		objectPortal.reloadCache();
	}

	public static class BinaryCriteriaRelatedFinder extends AbstractRelatedFinder
	{
		private List relationshipFinders;
		private List dependentRelationshipFinders;
		private LongAttribute id;
		private LongAttribute leftId;
		private LongAttribute rightId;
		private BinaryCriteriaLeftFinderSubclass left;
		private BinaryCriteriaRightFinderSubclass right;
		private BinaryCriteriaAndCriteriaSubClassFinderSubclass andCriteriaSubClass;
		private BinaryCriteriaOrCriteriaSubClassFinderSubclass orCriteriaSubClass;
		private BinaryCriteriaCriteriaSuperClassFinderSubclass criteriaSuperClass;
		public BinaryCriteriaRelatedFinder()
		{
			super();
		}

		public BinaryCriteriaRelatedFinder(Mapper mapper)
		{
			super(mapper);
		}

		public String getFinderClassName()
		{
			return "klass.model.meta.domain.BinaryCriteriaFinder";
		}

		public RelatedFinder getRelationshipFinderByName(String relationshipName)
		{
			return BinaryCriteriaFinder.finderMethodMap.getRelationshipFinderByName(relationshipName, this);
		}

		public Attribute getAttributeByName(String attributeName)
		{
			return BinaryCriteriaFinder.finderMethodMap.getAttributeByName(attributeName, this);
		}

		public com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
		{
			return BinaryCriteriaFinder.finderMethodMap.getAttributeOrRelationshipSelectorFunction(attributeName, this);
		}

		public Attribute[] getPersistentAttributes()
		{
			Attribute[] attributes = new Attribute[3];
			attributes[0] = this.id();
			attributes[1] = this.leftId();
			attributes[2] = this.rightId();
			return attributes;
		}

		public List getRelationshipFinders()
		{
			if (relationshipFinders == null)
			{
				List relatedFinders = new ArrayList(5);
				relatedFinders.add(this.left());
				relatedFinders.add(this.right());
				relatedFinders.add(this.andCriteriaSubClass());
				relatedFinders.add(this.orCriteriaSubClass());
				relatedFinders.add(this.criteriaSuperClass());
				relationshipFinders = Collections.unmodifiableList(relatedFinders);
			}

			return relationshipFinders;
		}

		public List getDependentRelationshipFinders()
		{
			if (dependentRelationshipFinders == null)
			{
				List dependentRelatedFinders = new ArrayList(2);
				dependentRelatedFinders.add(this.andCriteriaSubClass());
				dependentRelatedFinders.add(this.orCriteriaSubClass());
				dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
			}

			return dependentRelationshipFinders;
		}

		public BinaryCriteria findOne(com.gs.fw.finder.Operation operation)
		{
			return BinaryCriteriaFinder.findOne(operation, false);
		}

		public BinaryCriteria findOneBypassCache(com.gs.fw.finder.Operation operation)
		{
			return BinaryCriteriaFinder.findOne(operation, true);
		}

		public MithraList findMany(com.gs.fw.finder.Operation operation)
		{
			return new BinaryCriteriaList((Operation) operation);
		}

		public MithraList findManyBypassCache(com.gs.fw.finder.Operation operation)
		{
			BinaryCriteriaList result = (BinaryCriteriaList) this.findMany(operation);
			result.setBypassCache(true);
			return result;
		}

		public MithraList constructEmptyList()
		{
			return new BinaryCriteriaList();
		}

		public int getSerialVersionId()
		{
			return 1829270643;
		}

		public boolean isPure()
		{
			return false;
		}

		public boolean isTemporary()
		{
			return false;
		}

		public int getHierarchyDepth()
		{
			return 0;
		}

		public LongAttribute id()
		{
			LongAttribute result = this.id;
			if (result == null)
			{
				result = mapper == null ? SingleColumnLongAttribute.generate("\"ID\"","","id",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
					new MappedLongAttribute(BinaryCriteriaFinder.id(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("criteriaSuperClass");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Criteria", "binaryCriteriaSubClass");
				this.id = result;
			}

			return result;
		}

		public LongAttribute leftId()
		{
			LongAttribute result = this.leftId;
			if (result == null)
			{
				result = mapper == null ? SingleColumnLongAttribute.generate("\"LEFT_ID\"","","leftId",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
					new MappedLongAttribute(BinaryCriteriaFinder.leftId(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("left");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Criteria", "ownerOfLeftCriteria");
				this.leftId = result;
			}

			return result;
		}

		public LongAttribute rightId()
		{
			LongAttribute result = this.rightId;
			if (result == null)
			{
				result = mapper == null ? SingleColumnLongAttribute.generate("\"RIGHT_ID\"","","rightId",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
					new MappedLongAttribute(BinaryCriteriaFinder.rightId(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("right");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Criteria", "ownerOfRightCriteria");
				this.rightId = result;
			}

			return result;
		}

		public CriteriaFinder.CriteriaSingleFinderForRelatedClasses left()
		{
			BinaryCriteriaLeftFinderSubclass result = this.left;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaLeftReverseMapper());
				newMapper.setToMany(false);
				result = new BinaryCriteriaLeftFinderSubclass(newMapper , this.zGetValueSelector() );
				this.left = result;
			}

			return result;
		}

		public CriteriaFinder.CriteriaSingleFinderForRelatedClasses right()
		{
			BinaryCriteriaRightFinderSubclass result = this.right;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaRightReverseMapper());
				newMapper.setToMany(false);
				result = new BinaryCriteriaRightFinderSubclass(newMapper , this.zGetValueSelector() );
				this.right = result;
			}

			return result;
		}

		public AndCriteriaFinder.AndCriteriaSingleFinderForRelatedClasses andCriteriaSubClass()
		{
			BinaryCriteriaAndCriteriaSubClassFinderSubclass result = this.andCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaAndCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new BinaryCriteriaAndCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.andCriteriaSubClass = result;
			}

			return result;
		}

		public OrCriteriaFinder.OrCriteriaSingleFinderForRelatedClasses orCriteriaSubClass()
		{
			BinaryCriteriaOrCriteriaSubClassFinderSubclass result = this.orCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaOrCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new BinaryCriteriaOrCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.orCriteriaSubClass = result;
			}

			return result;
		}

		public CriteriaFinder.CriteriaSingleFinderForRelatedClasses criteriaSuperClass()
		{
			BinaryCriteriaCriteriaSuperClassFinderSubclass result = this.criteriaSuperClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaBinaryCriteriaSubClassMapper());
				newMapper.setToMany(false);
				result = new BinaryCriteriaCriteriaSuperClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.criteriaSuperClass = result;
			}

			return result;
		}

		public Attribute getSourceAttribute()
		{
			return null;
		}

		private Mapper combineWithMapperIfExists(Mapper newMapper)
		{
			if (this.mapper != null)
			{
				return new LinkedMapper(this.mapper, newMapper);
			}

			return newMapper;
		}

		public Attribute[] getPrimaryKeyAttributes()
		{
			return BinaryCriteriaFinder.getPrimaryKeyAttributes();
		}

		public VersionAttribute getVersionAttribute()
		{
			return null;
		}

		public MithraObjectPortal getMithraObjectPortal()
		{
			return BinaryCriteriaFinder.getMithraObjectPortal();
		}
	}

	public static class BinaryCriteriaCollectionFinder extends BinaryCriteriaRelatedFinder
	{
		public BinaryCriteriaCollectionFinder(Mapper mapper)
		{
			super(mapper);
		}
	}

	public static abstract class BinaryCriteriaCollectionFinderForRelatedClasses
	extends BinaryCriteriaCollectionFinder
	implements DeepRelationshipAttribute
	{
		public BinaryCriteriaCollectionFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	public static class BinaryCriteriaSingleFinder extends BinaryCriteriaRelatedFinder
	implements ToOneFinder
	{
		public BinaryCriteriaSingleFinder(Mapper mapper)
		{
			super(mapper);
		}

		public BinaryCriteriaSingleFinder()
		{
			super(null);
		}

		public Operation eq(BinaryCriteria other)
		{
			return this.id().eq(other.getId())
			;
		}
		// this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
		public BinaryCriteria findByPrimaryKey(long id)
		{
			BinaryCriteria _result = null;
			Operation _op = null;
			Object _related = null;
			{
				I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
				_bean.setL1AsLong(id);
				MithraObjectPortal _portal = this.getMithraObjectPortal();
				_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
				_bean.release();
			}

			if (!(_related instanceof NulledRelation)) _result = (BinaryCriteria) _related;
			if (_related == null)
			{
				_op = this.id().eq(id);
			}

			if (_op != null)
			{
				_result = this.findOne(_op);
			}

			return _result;
		}
	}

	public static abstract class BinaryCriteriaSingleFinderForRelatedClasses extends BinaryCriteriaSingleFinder implements DeepRelationshipAttribute
	{
		public BinaryCriteriaSingleFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	private static Mapper leftReverseMapper = null;
	public static Mapper zGetBinaryCriteriaLeftReverseMapper()
	{
		if (leftReverseMapper == null)
		{
			leftReverseMapper = zConstructBinaryCriteriaLeftReverseMapper();
		}

		return leftReverseMapper;
	}

	private static Mapper leftMapper = null;
	public static Mapper zGetBinaryCriteriaLeftMapper()
	{
		if (leftMapper == null)
		{
			leftMapper = zConstructBinaryCriteriaLeftMapper();
		}

		return leftMapper;
	}

	private static Mapper leftPureReverseMapper = null;
	public static Mapper zGetBinaryCriteriaLeftPureReverseMapper()
	{
		if (leftPureReverseMapper == null)
		{
			leftPureReverseMapper = zConstructBinaryCriteriaLeftPureReverseMapper();
		}

		return leftPureReverseMapper;
	}

	private static Mapper zConstructBinaryCriteriaLeftPureReverseMapper()
	{
		Mapper leftMapper = BinaryCriteriaFinder.zGetConstantJoin(0);
		leftMapper.setName("left");
		return leftMapper;
	}

	private static Mapper zConstructBinaryCriteriaLeftReverseMapper()
	{
		Mapper leftMapper = BinaryCriteriaFinder.zGetConstantJoin(0);
		leftMapper.setName("left");
		return leftMapper;
	}

	private static Mapper zConstructBinaryCriteriaLeftMapper()
	{
		Mapper leftMapper = BinaryCriteriaFinder.zGetConstantJoin(1);
		leftMapper.setName("ownerOfLeftCriteria");
		return leftMapper;
	}

	private static Mapper rightReverseMapper = null;
	public static Mapper zGetBinaryCriteriaRightReverseMapper()
	{
		if (rightReverseMapper == null)
		{
			rightReverseMapper = zConstructBinaryCriteriaRightReverseMapper();
		}

		return rightReverseMapper;
	}

	private static Mapper rightMapper = null;
	public static Mapper zGetBinaryCriteriaRightMapper()
	{
		if (rightMapper == null)
		{
			rightMapper = zConstructBinaryCriteriaRightMapper();
		}

		return rightMapper;
	}

	private static Mapper rightPureReverseMapper = null;
	public static Mapper zGetBinaryCriteriaRightPureReverseMapper()
	{
		if (rightPureReverseMapper == null)
		{
			rightPureReverseMapper = zConstructBinaryCriteriaRightPureReverseMapper();
		}

		return rightPureReverseMapper;
	}

	private static Mapper zConstructBinaryCriteriaRightPureReverseMapper()
	{
		Mapper rightMapper = BinaryCriteriaFinder.zGetConstantJoin(2);
		rightMapper.setName("right");
		return rightMapper;
	}

	private static Mapper zConstructBinaryCriteriaRightReverseMapper()
	{
		Mapper rightMapper = BinaryCriteriaFinder.zGetConstantJoin(2);
		rightMapper.setName("right");
		return rightMapper;
	}

	private static Mapper zConstructBinaryCriteriaRightMapper()
	{
		Mapper rightMapper = BinaryCriteriaFinder.zGetConstantJoin(3);
		rightMapper.setName("ownerOfRightCriteria");
		return rightMapper;
	}

	private static Mapper andCriteriaSubClassReverseMapper = null;
	public static Mapper zGetBinaryCriteriaAndCriteriaSubClassReverseMapper()
	{
		if (andCriteriaSubClassReverseMapper == null)
		{
			andCriteriaSubClassReverseMapper = zConstructBinaryCriteriaAndCriteriaSubClassReverseMapper();
		}

		return andCriteriaSubClassReverseMapper;
	}

	private static Mapper andCriteriaSubClassMapper = null;
	public static Mapper zGetBinaryCriteriaAndCriteriaSubClassMapper()
	{
		if (andCriteriaSubClassMapper == null)
		{
			andCriteriaSubClassMapper = zConstructBinaryCriteriaAndCriteriaSubClassMapper();
		}

		return andCriteriaSubClassMapper;
	}

	private static Mapper andCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetBinaryCriteriaAndCriteriaSubClassPureReverseMapper()
	{
		if (andCriteriaSubClassPureReverseMapper == null)
		{
			andCriteriaSubClassPureReverseMapper = zConstructBinaryCriteriaAndCriteriaSubClassPureReverseMapper();
		}

		return andCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructBinaryCriteriaAndCriteriaSubClassPureReverseMapper()
	{
		Mapper andCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(4);
		andCriteriaSubClassMapper.setName("andCriteriaSubClass");
		return andCriteriaSubClassMapper;
	}

	private static Mapper zConstructBinaryCriteriaAndCriteriaSubClassReverseMapper()
	{
		Mapper andCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(4);
		andCriteriaSubClassMapper.setName("andCriteriaSubClass");
		return andCriteriaSubClassMapper;
	}

	private static Mapper zConstructBinaryCriteriaAndCriteriaSubClassMapper()
	{
		Mapper andCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(5);
		andCriteriaSubClassMapper.setName("binaryCriteriaSuperClass");
		return andCriteriaSubClassMapper;
	}

	private static Mapper orCriteriaSubClassReverseMapper = null;
	public static Mapper zGetBinaryCriteriaOrCriteriaSubClassReverseMapper()
	{
		if (orCriteriaSubClassReverseMapper == null)
		{
			orCriteriaSubClassReverseMapper = zConstructBinaryCriteriaOrCriteriaSubClassReverseMapper();
		}

		return orCriteriaSubClassReverseMapper;
	}

	private static Mapper orCriteriaSubClassMapper = null;
	public static Mapper zGetBinaryCriteriaOrCriteriaSubClassMapper()
	{
		if (orCriteriaSubClassMapper == null)
		{
			orCriteriaSubClassMapper = zConstructBinaryCriteriaOrCriteriaSubClassMapper();
		}

		return orCriteriaSubClassMapper;
	}

	private static Mapper orCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetBinaryCriteriaOrCriteriaSubClassPureReverseMapper()
	{
		if (orCriteriaSubClassPureReverseMapper == null)
		{
			orCriteriaSubClassPureReverseMapper = zConstructBinaryCriteriaOrCriteriaSubClassPureReverseMapper();
		}

		return orCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructBinaryCriteriaOrCriteriaSubClassPureReverseMapper()
	{
		Mapper orCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(6);
		orCriteriaSubClassMapper.setName("orCriteriaSubClass");
		return orCriteriaSubClassMapper;
	}

	private static Mapper zConstructBinaryCriteriaOrCriteriaSubClassReverseMapper()
	{
		Mapper orCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(6);
		orCriteriaSubClassMapper.setName("orCriteriaSubClass");
		return orCriteriaSubClassMapper;
	}

	private static Mapper zConstructBinaryCriteriaOrCriteriaSubClassMapper()
	{
		Mapper orCriteriaSubClassMapper = BinaryCriteriaFinder.zGetConstantJoin(7);
		orCriteriaSubClassMapper.setName("binaryCriteriaSuperClass");
		return orCriteriaSubClassMapper;
	}

	/** maps to \"BINARY_CRITERIA\".\"ID\" **/
	public static LongAttribute id()
	{
		return finder.id();
	}

	/** maps to \"BINARY_CRITERIA\".\"LEFT_ID\" **/
	public static LongAttribute leftId()
	{
		return finder.leftId();
	}

	/** maps to \"BINARY_CRITERIA\".\"RIGHT_ID\" **/
	public static LongAttribute rightId()
	{
		return finder.rightId();
	}

	public static CriteriaFinder.CriteriaSingleFinderForRelatedClasses left()
	{
		return finder.left();
	}

	public static class BinaryCriteriaLeftFinderSubclass extends CriteriaFinder.CriteriaSingleFinderForRelatedClasses
	{
		public BinaryCriteriaLeftFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "left";
		}

		public DeepRelationshipAttribute copy()
		{
			return new BinaryCriteriaLeftFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
			);
		}

		protected Criteria plainValueOf(BinaryCriteria _obj)
		{
			return _obj.getLeft();
		}

		protected CriteriaList plainListValueOf(Object _obj)
		{
			return ((BinaryCriteriaList)_obj).getLefts();
		}
	}

	public static CriteriaFinder.CriteriaSingleFinderForRelatedClasses right()
	{
		return finder.right();
	}

	public static class BinaryCriteriaRightFinderSubclass extends CriteriaFinder.CriteriaSingleFinderForRelatedClasses
	{
		public BinaryCriteriaRightFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "right";
		}

		public DeepRelationshipAttribute copy()
		{
			return new BinaryCriteriaRightFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
			);
		}

		protected Criteria plainValueOf(BinaryCriteria _obj)
		{
			return _obj.getRight();
		}

		protected CriteriaList plainListValueOf(Object _obj)
		{
			return ((BinaryCriteriaList)_obj).getRights();
		}
	}

	public static AndCriteriaFinder.AndCriteriaSingleFinderForRelatedClasses andCriteriaSubClass()
	{
		return finder.andCriteriaSubClass();
	}

	public static class BinaryCriteriaAndCriteriaSubClassFinderSubclass extends AndCriteriaFinder.AndCriteriaSingleFinderForRelatedClasses
	{
		public BinaryCriteriaAndCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "andCriteriaSubClass";
		}

		public DeepRelationshipAttribute copy()
		{
			return new BinaryCriteriaAndCriteriaSubClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
			);
		}

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((BinaryCriteria) _obj).isAndCriteriaSubClassModifiedSinceDetachment();
		}

		protected AndCriteria plainValueOf(BinaryCriteria _obj)
		{
			return _obj.getAndCriteriaSubClass();
		}

		protected AndCriteriaList plainListValueOf(Object _obj)
		{
			return ((BinaryCriteriaList)_obj).getAndCriteriaSubClass();
		}
	}

	public static OrCriteriaFinder.OrCriteriaSingleFinderForRelatedClasses orCriteriaSubClass()
	{
		return finder.orCriteriaSubClass();
	}

	public static class BinaryCriteriaOrCriteriaSubClassFinderSubclass extends OrCriteriaFinder.OrCriteriaSingleFinderForRelatedClasses
	{
		public BinaryCriteriaOrCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "orCriteriaSubClass";
		}

		public DeepRelationshipAttribute copy()
		{
			return new BinaryCriteriaOrCriteriaSubClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
			);
		}

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((BinaryCriteria) _obj).isOrCriteriaSubClassModifiedSinceDetachment();
		}

		protected OrCriteria plainValueOf(BinaryCriteria _obj)
		{
			return _obj.getOrCriteriaSubClass();
		}

		protected OrCriteriaList plainListValueOf(Object _obj)
		{
			return ((BinaryCriteriaList)_obj).getOrCriteriaSubClass();
		}
	}

	public static CriteriaFinder.CriteriaSingleFinderForRelatedClasses criteriaSuperClass()
	{
		return finder.criteriaSuperClass();
	}

	public static class BinaryCriteriaCriteriaSuperClassFinderSubclass extends CriteriaFinder.CriteriaSingleFinderForRelatedClasses
	{
		public BinaryCriteriaCriteriaSuperClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "criteriaSuperClass";
		}

		public DeepRelationshipAttribute copy()
		{
			return new BinaryCriteriaCriteriaSuperClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
			);
		}

		protected Criteria plainValueOf(BinaryCriteria _obj)
		{
			return _obj.getCriteriaSuperClass();
		}

		protected CriteriaList plainListValueOf(Object _obj)
		{
			return ((BinaryCriteriaList)_obj).getCriteriaSuperClass();
		}
	}

	public static Operation eq(BinaryCriteria other)
	{
		return finder.eq(other);
	}

	public static Operation all()
	{
		return new All(id());
	}

	public static BinaryCriteriaSingleFinder getFinderInstance()
	{
		return finder;
	}

	public static Attribute[] getPrimaryKeyAttributes()
	{
		return new Attribute[] 
		{
			id()
		}

		;
	}

	public static Attribute[] getImmutableAttributes()
	{
		return new Attribute[] 
		{
			id()
			, id()
		}

		;
	}

	public static AsOfAttribute[] getAsOfAttributes()
	{
		return null;
	}

	protected static void initializeIndicies(Cache cache)
	{
		cache.addIndex("0 Index", new Attribute[] 
		{
			leftId()
		}

		);
		cache.addIndex("1 Index", new Attribute[] 
		{
			rightId()
		}

		);
	}

	protected static void initializePortal(MithraObjectDeserializer objectFactory, Cache cache,
		MithraConfigurationManager.Config config)
	{
		initializeIndicies(cache);
		isFullCache = cache.isFullCache();
		isOffHeap = cache.isOffHeap();
		MithraObjectPortal portal;
		if (config.isParticipatingInTx())
		{
			portal = new MithraTransactionalPortal(objectFactory, cache, getFinderInstance(),
				config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null,
				null, null, 0,
				(MithraObjectPersister) objectFactory);
		}
		else
		{
			portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(),
				config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null,
				null, null, 0,
				(MithraObjectPersister) objectFactory);
		}

		portal.setParentFinders(new RelatedFinder[] 
		{
			CriteriaFinder.getFinderInstance(),
		}

		);
		config.initializePortal(portal);
		objectPortal.destroy();
		objectPortal = portal;
	}

	protected static void initializeClientPortal(MithraObjectDeserializer objectFactory, Cache cache,
		MithraConfigurationManager.Config config)
	{
		initializeIndicies(cache);
		isFullCache = cache.isFullCache();
		isOffHeap = cache.isOffHeap();
		MithraObjectPortal portal;
		if (config.isParticipatingInTx())
		{
			portal = new MithraTransactionalPortal(objectFactory, cache, getFinderInstance(),
				config.getRelationshipCacheSize(), config.getMinQueriesToKeep(),
				null, null,
				null, 0,
				new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), false));
		}
		else
		{
			portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(),
				config.getRelationshipCacheSize(), config.getMinQueriesToKeep(),
				null, null,
				null, 0,
				new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), false));
		}

		portal.setParentFinders(new RelatedFinder[] 
		{
			CriteriaFinder.getFinderInstance(),
		}

		);
		config.initializePortal(portal);
		objectPortal.destroy();
		objectPortal = portal;
	}

	public static boolean isFullCache()
	{
		return isFullCache;
	}

	public static boolean isOffHeap()
	{
		return isOffHeap;
	}

	public static Attribute getAttributeByName(String attributeName)
	{
		return finder.getAttributeByName(attributeName);
	}

	public static com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
	{
		return finder.getAttributeOrRelationshipSelector(attributeName);
	}

	public static RelatedFinder getRelatedFinderByName(String relationshipName)
	{
		return finder.getRelationshipFinderByName(relationshipName);
	}

	public static DoubleAttribute[] zGetDoubleAttributes()
	{
		DoubleAttribute[] result = new DoubleAttribute[0];
		return result;
	}

	public static BigDecimalAttribute[] zGetBigDecimalAttributes()
	{
		BigDecimalAttribute[] result = new BigDecimalAttribute[0];
		return result;
	}

	public static void zResetPortal()
	{
		objectPortal.destroy();
		objectPortal = new UninitializedPortal("klass.model.meta.domain.BinaryCriteria");
		isFullCache = false;
		isOffHeap = false;
	}

	public static void setTransactionModeFullTransactionParticipation(MithraTransaction tx)
	{
		tx.setTxParticipationMode(objectPortal, FullTransactionalParticipationMode.getInstance());
	}

	public static void setTransactionModeReadCacheUpdateCausesRefreshAndLock(MithraTransaction tx)
	{
		tx.setTxParticipationMode(objectPortal, ReadCacheUpdateCausesRefreshAndLockTxParticipationMode.getInstance());
	}

	public static void registerForNotification(MithraApplicationClassLevelNotificationListener listener)
	{
		getMithraObjectPortal().registerForApplicationClassLevelNotification(listener);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy