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

klass.model.meta.domain.CriteriaFinder 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 CriteriaFinder
{
	private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/Criteria";
	private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.Criteria";
	private static final FinderMethodMap finderMethodMap;
	private static boolean isFullCache;
	private static boolean isOffHeap;
	private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.Criteria");
	private static final CriteriaSingleFinder finder = new CriteriaSingleFinder();
	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(CriteriaFinder.CriteriaRelatedFinder.class);
		finderMethodMap.addNormalAttributeName("id");
		finderMethodMap.addRelationshipName("allCriteriaSubClass");
		finderMethodMap.addRelationshipName("binaryCriteriaSubClass");
		finderMethodMap.addRelationshipName("operatorCriteriaSubClass");
		finderMethodMap.addRelationshipName("edgePointCriteriaSubClass");
		finderMethodMap.addRelationshipName("association");
		finderMethodMap.addRelationshipName("ownerOfLeftCriteria");
		finderMethodMap.addRelationshipName("ownerOfRightCriteria");
		finderMethodMap.addRelationshipName("queryService");
		finderMethodMap.addRelationshipName("authorizeService");
		finderMethodMap.addRelationshipName("validateService");
		finderMethodMap.addRelationshipName("conflictService");
	}

	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] = CriteriaFinder.id().constructEqualityMapper(AllCriteriaFinder.id());
			result[1] = AllCriteriaFinder.id().constructEqualityMapper(CriteriaFinder.id());
			result[2] = CriteriaFinder.id().constructEqualityMapper(BinaryCriteriaFinder.id());
			result[3] = BinaryCriteriaFinder.id().constructEqualityMapper(CriteriaFinder.id());
			result[4] = CriteriaFinder.id().constructEqualityMapper(OperatorCriteriaFinder.id());
			result[5] = OperatorCriteriaFinder.id().constructEqualityMapper(CriteriaFinder.id());
			result[6] = CriteriaFinder.id().constructEqualityMapper(EdgePointCriteriaFinder.id());
			result[7] = EdgePointCriteriaFinder.id().constructEqualityMapper(CriteriaFinder.id());
			constantJoinPool = result;
		}

		return constantJoinPool;
	}

	public static SourceAttributeType getSourceAttributeType()
	{
		return null;
	}

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

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

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

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

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

	public static Criteria 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;
			CriteriaData _castedTargetData = (CriteriaData) _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 Criteria zFindOneForRelationship(Operation operation)
	{
		List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
		return (Criteria) 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 CriteriaRelatedFinder extends AbstractRelatedFinder
	implements ElementFinder
	{
		private List relationshipFinders;
		private List dependentRelationshipFinders;
		private LongAttribute id;
		private CriteriaAllCriteriaSubClassFinderSubclass allCriteriaSubClass;
		private CriteriaBinaryCriteriaSubClassFinderSubclass binaryCriteriaSubClass;
		private CriteriaOperatorCriteriaSubClassFinderSubclass operatorCriteriaSubClass;
		private CriteriaEdgePointCriteriaSubClassFinderSubclass edgePointCriteriaSubClass;
		private CriteriaAssociationFinderSubclass association;
		private CriteriaOwnerOfLeftCriteriaFinderSubclass ownerOfLeftCriteria;
		private CriteriaOwnerOfRightCriteriaFinderSubclass ownerOfRightCriteria;
		private CriteriaQueryServiceFinderSubclass queryService;
		private CriteriaAuthorizeServiceFinderSubclass authorizeService;
		private CriteriaValidateServiceFinderSubclass validateService;
		private CriteriaConflictServiceFinderSubclass conflictService;
		public CriteriaRelatedFinder()
		{
			super();
		}

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

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

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

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

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

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

		public List getRelationshipFinders()
		{
			if (relationshipFinders == null)
			{
				List relatedFinders = new ArrayList(11);
				relatedFinders.add(this.allCriteriaSubClass());
				relatedFinders.add(this.binaryCriteriaSubClass());
				relatedFinders.add(this.operatorCriteriaSubClass());
				relatedFinders.add(this.edgePointCriteriaSubClass());
				relatedFinders.add(this.association());
				relatedFinders.add(this.ownerOfLeftCriteria());
				relatedFinders.add(this.ownerOfRightCriteria());
				relatedFinders.add(this.queryService());
				relatedFinders.add(this.authorizeService());
				relatedFinders.add(this.validateService());
				relatedFinders.add(this.conflictService());
				relationshipFinders = Collections.unmodifiableList(relatedFinders);
			}

			return relationshipFinders;
		}

		public List getDependentRelationshipFinders()
		{
			if (dependentRelationshipFinders == null)
			{
				List dependentRelatedFinders = new ArrayList(4);
				dependentRelatedFinders.add(this.allCriteriaSubClass());
				dependentRelatedFinders.add(this.binaryCriteriaSubClass());
				dependentRelatedFinders.add(this.operatorCriteriaSubClass());
				dependentRelatedFinders.add(this.edgePointCriteriaSubClass());
				dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
			}

			return dependentRelationshipFinders;
		}

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

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

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

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

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

		public int getSerialVersionId()
		{
			return -1472220267;
		}

		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,true, false) :
					new MappedLongAttribute(CriteriaFinder.id(), this.mapper, this.zGetValueSelector());
				this.id = result;
			}

			return result;
		}

		public AllCriteriaFinder.AllCriteriaSingleFinderForRelatedClasses allCriteriaSubClass()
		{
			CriteriaAllCriteriaSubClassFinderSubclass result = this.allCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaAllCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new CriteriaAllCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.allCriteriaSubClass = result;
			}

			return result;
		}

		public BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses binaryCriteriaSubClass()
		{
			CriteriaBinaryCriteriaSubClassFinderSubclass result = this.binaryCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaBinaryCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new CriteriaBinaryCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.binaryCriteriaSubClass = result;
			}

			return result;
		}

		public OperatorCriteriaFinder.OperatorCriteriaSingleFinderForRelatedClasses operatorCriteriaSubClass()
		{
			CriteriaOperatorCriteriaSubClassFinderSubclass result = this.operatorCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaOperatorCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new CriteriaOperatorCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.operatorCriteriaSubClass = result;
			}

			return result;
		}

		public EdgePointCriteriaFinder.EdgePointCriteriaSingleFinderForRelatedClasses edgePointCriteriaSubClass()
		{
			CriteriaEdgePointCriteriaSubClassFinderSubclass result = this.edgePointCriteriaSubClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaEdgePointCriteriaSubClassReverseMapper());
				newMapper.setToMany(false);
				result = new CriteriaEdgePointCriteriaSubClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.edgePointCriteriaSubClass = result;
			}

			return result;
		}

		public AssociationFinder.AssociationSingleFinderForRelatedClasses association()
		{
			CriteriaAssociationFinderSubclass result = this.association;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(AssociationFinder.zGetAssociationCriteriaMapper());
				newMapper.setToMany(false);
				result = new CriteriaAssociationFinderSubclass(newMapper , this.zGetValueSelector() );
				this.association = result;
			}

			return result;
		}

		public BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses ownerOfLeftCriteria()
		{
			CriteriaOwnerOfLeftCriteriaFinderSubclass result = this.ownerOfLeftCriteria;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaLeftMapper());
				newMapper.setToMany(false);
				result = new CriteriaOwnerOfLeftCriteriaFinderSubclass(newMapper , this.zGetValueSelector() );
				this.ownerOfLeftCriteria = result;
			}

			return result;
		}

		public BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses ownerOfRightCriteria()
		{
			CriteriaOwnerOfRightCriteriaFinderSubclass result = this.ownerOfRightCriteria;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(BinaryCriteriaFinder.zGetBinaryCriteriaRightMapper());
				newMapper.setToMany(false);
				result = new CriteriaOwnerOfRightCriteriaFinderSubclass(newMapper , this.zGetValueSelector() );
				this.ownerOfRightCriteria = result;
			}

			return result;
		}

		public ServiceFinder.ServiceSingleFinderForRelatedClasses queryService()
		{
			CriteriaQueryServiceFinderSubclass result = this.queryService;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceFinder.zGetServiceQueryCriteriaMapper());
				newMapper.setToMany(false);
				result = new CriteriaQueryServiceFinderSubclass(newMapper , this.zGetValueSelector() );
				this.queryService = result;
			}

			return result;
		}

		public ServiceFinder.ServiceSingleFinderForRelatedClasses authorizeService()
		{
			CriteriaAuthorizeServiceFinderSubclass result = this.authorizeService;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceFinder.zGetServiceAuthorizeCriteriaMapper());
				newMapper.setToMany(false);
				result = new CriteriaAuthorizeServiceFinderSubclass(newMapper , this.zGetValueSelector() );
				this.authorizeService = result;
			}

			return result;
		}

		public ServiceFinder.ServiceSingleFinderForRelatedClasses validateService()
		{
			CriteriaValidateServiceFinderSubclass result = this.validateService;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceFinder.zGetServiceValidateCriteriaMapper());
				newMapper.setToMany(false);
				result = new CriteriaValidateServiceFinderSubclass(newMapper , this.zGetValueSelector() );
				this.validateService = result;
			}

			return result;
		}

		public ServiceFinder.ServiceSingleFinderForRelatedClasses conflictService()
		{
			CriteriaConflictServiceFinderSubclass result = this.conflictService;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceFinder.zGetServiceConflictCriteriaMapper());
				newMapper.setToMany(false);
				result = new CriteriaConflictServiceFinderSubclass(newMapper , this.zGetValueSelector() );
				this.conflictService = 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 CriteriaFinder.getPrimaryKeyAttributes();
		}

		public VersionAttribute getVersionAttribute()
		{
			return null;
		}

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

	public static class CriteriaCollectionFinder extends CriteriaRelatedFinder
	{
		public CriteriaCollectionFinder(Mapper mapper)
		{
			super(mapper);
		}
	}

	public static abstract class CriteriaCollectionFinderForRelatedClasses
	extends CriteriaCollectionFinder
	implements DeepRelationshipAttribute
	{
		public CriteriaCollectionFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	public static class CriteriaSingleFinder extends CriteriaRelatedFinder
	implements ToOneFinder
	{
		public CriteriaSingleFinder(Mapper mapper)
		{
			super(mapper);
		}

		public CriteriaSingleFinder()
		{
			super(null);
		}

		public Operation eq(Criteria 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 Criteria findByPrimaryKey(long id)
		{
			Criteria _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 = (Criteria) _related;
			if (_related == null)
			{
				_op = this.id().eq(id);
			}

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

			return _result;
		}
	}

	public static abstract class CriteriaSingleFinderForRelatedClasses extends CriteriaSingleFinder implements DeepRelationshipAttribute
	{
		public CriteriaSingleFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	private static Mapper allCriteriaSubClassReverseMapper = null;
	public static Mapper zGetCriteriaAllCriteriaSubClassReverseMapper()
	{
		if (allCriteriaSubClassReverseMapper == null)
		{
			allCriteriaSubClassReverseMapper = zConstructCriteriaAllCriteriaSubClassReverseMapper();
		}

		return allCriteriaSubClassReverseMapper;
	}

	private static Mapper allCriteriaSubClassMapper = null;
	public static Mapper zGetCriteriaAllCriteriaSubClassMapper()
	{
		if (allCriteriaSubClassMapper == null)
		{
			allCriteriaSubClassMapper = zConstructCriteriaAllCriteriaSubClassMapper();
		}

		return allCriteriaSubClassMapper;
	}

	private static Mapper allCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetCriteriaAllCriteriaSubClassPureReverseMapper()
	{
		if (allCriteriaSubClassPureReverseMapper == null)
		{
			allCriteriaSubClassPureReverseMapper = zConstructCriteriaAllCriteriaSubClassPureReverseMapper();
		}

		return allCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructCriteriaAllCriteriaSubClassPureReverseMapper()
	{
		Mapper allCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(0);
		allCriteriaSubClassMapper.setName("allCriteriaSubClass");
		return allCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaAllCriteriaSubClassReverseMapper()
	{
		Mapper allCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(0);
		allCriteriaSubClassMapper.setName("allCriteriaSubClass");
		return allCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaAllCriteriaSubClassMapper()
	{
		Mapper allCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(1);
		allCriteriaSubClassMapper.setName("criteriaSuperClass");
		return allCriteriaSubClassMapper;
	}

	private static Mapper binaryCriteriaSubClassReverseMapper = null;
	public static Mapper zGetCriteriaBinaryCriteriaSubClassReverseMapper()
	{
		if (binaryCriteriaSubClassReverseMapper == null)
		{
			binaryCriteriaSubClassReverseMapper = zConstructCriteriaBinaryCriteriaSubClassReverseMapper();
		}

		return binaryCriteriaSubClassReverseMapper;
	}

	private static Mapper binaryCriteriaSubClassMapper = null;
	public static Mapper zGetCriteriaBinaryCriteriaSubClassMapper()
	{
		if (binaryCriteriaSubClassMapper == null)
		{
			binaryCriteriaSubClassMapper = zConstructCriteriaBinaryCriteriaSubClassMapper();
		}

		return binaryCriteriaSubClassMapper;
	}

	private static Mapper binaryCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetCriteriaBinaryCriteriaSubClassPureReverseMapper()
	{
		if (binaryCriteriaSubClassPureReverseMapper == null)
		{
			binaryCriteriaSubClassPureReverseMapper = zConstructCriteriaBinaryCriteriaSubClassPureReverseMapper();
		}

		return binaryCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructCriteriaBinaryCriteriaSubClassPureReverseMapper()
	{
		Mapper binaryCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(2);
		binaryCriteriaSubClassMapper.setName("binaryCriteriaSubClass");
		return binaryCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaBinaryCriteriaSubClassReverseMapper()
	{
		Mapper binaryCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(2);
		binaryCriteriaSubClassMapper.setName("binaryCriteriaSubClass");
		return binaryCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaBinaryCriteriaSubClassMapper()
	{
		Mapper binaryCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(3);
		binaryCriteriaSubClassMapper.setName("criteriaSuperClass");
		return binaryCriteriaSubClassMapper;
	}

	private static Mapper operatorCriteriaSubClassReverseMapper = null;
	public static Mapper zGetCriteriaOperatorCriteriaSubClassReverseMapper()
	{
		if (operatorCriteriaSubClassReverseMapper == null)
		{
			operatorCriteriaSubClassReverseMapper = zConstructCriteriaOperatorCriteriaSubClassReverseMapper();
		}

		return operatorCriteriaSubClassReverseMapper;
	}

	private static Mapper operatorCriteriaSubClassMapper = null;
	public static Mapper zGetCriteriaOperatorCriteriaSubClassMapper()
	{
		if (operatorCriteriaSubClassMapper == null)
		{
			operatorCriteriaSubClassMapper = zConstructCriteriaOperatorCriteriaSubClassMapper();
		}

		return operatorCriteriaSubClassMapper;
	}

	private static Mapper operatorCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetCriteriaOperatorCriteriaSubClassPureReverseMapper()
	{
		if (operatorCriteriaSubClassPureReverseMapper == null)
		{
			operatorCriteriaSubClassPureReverseMapper = zConstructCriteriaOperatorCriteriaSubClassPureReverseMapper();
		}

		return operatorCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructCriteriaOperatorCriteriaSubClassPureReverseMapper()
	{
		Mapper operatorCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(4);
		operatorCriteriaSubClassMapper.setName("operatorCriteriaSubClass");
		return operatorCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaOperatorCriteriaSubClassReverseMapper()
	{
		Mapper operatorCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(4);
		operatorCriteriaSubClassMapper.setName("operatorCriteriaSubClass");
		return operatorCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaOperatorCriteriaSubClassMapper()
	{
		Mapper operatorCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(5);
		operatorCriteriaSubClassMapper.setName("criteriaSuperClass");
		return operatorCriteriaSubClassMapper;
	}

	private static Mapper edgePointCriteriaSubClassReverseMapper = null;
	public static Mapper zGetCriteriaEdgePointCriteriaSubClassReverseMapper()
	{
		if (edgePointCriteriaSubClassReverseMapper == null)
		{
			edgePointCriteriaSubClassReverseMapper = zConstructCriteriaEdgePointCriteriaSubClassReverseMapper();
		}

		return edgePointCriteriaSubClassReverseMapper;
	}

	private static Mapper edgePointCriteriaSubClassMapper = null;
	public static Mapper zGetCriteriaEdgePointCriteriaSubClassMapper()
	{
		if (edgePointCriteriaSubClassMapper == null)
		{
			edgePointCriteriaSubClassMapper = zConstructCriteriaEdgePointCriteriaSubClassMapper();
		}

		return edgePointCriteriaSubClassMapper;
	}

	private static Mapper edgePointCriteriaSubClassPureReverseMapper = null;
	public static Mapper zGetCriteriaEdgePointCriteriaSubClassPureReverseMapper()
	{
		if (edgePointCriteriaSubClassPureReverseMapper == null)
		{
			edgePointCriteriaSubClassPureReverseMapper = zConstructCriteriaEdgePointCriteriaSubClassPureReverseMapper();
		}

		return edgePointCriteriaSubClassPureReverseMapper;
	}

	private static Mapper zConstructCriteriaEdgePointCriteriaSubClassPureReverseMapper()
	{
		Mapper edgePointCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(6);
		edgePointCriteriaSubClassMapper.setName("edgePointCriteriaSubClass");
		return edgePointCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaEdgePointCriteriaSubClassReverseMapper()
	{
		Mapper edgePointCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(6);
		edgePointCriteriaSubClassMapper.setName("edgePointCriteriaSubClass");
		return edgePointCriteriaSubClassMapper;
	}

	private static Mapper zConstructCriteriaEdgePointCriteriaSubClassMapper()
	{
		Mapper edgePointCriteriaSubClassMapper = CriteriaFinder.zGetConstantJoin(7);
		edgePointCriteriaSubClassMapper.setName("criteriaSuperClass");
		return edgePointCriteriaSubClassMapper;
	}

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

	public static AllCriteriaFinder.AllCriteriaSingleFinderForRelatedClasses allCriteriaSubClass()
	{
		return finder.allCriteriaSubClass();
	}

	public static class CriteriaAllCriteriaSubClassFinderSubclass extends AllCriteriaFinder.AllCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaAllCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "allCriteriaSubClass";
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((Criteria) _obj).isAllCriteriaSubClassModifiedSinceDetachment();
		}

		protected AllCriteria plainValueOf(Criteria _obj)
		{
			return _obj.getAllCriteriaSubClass();
		}

		protected AllCriteriaList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getAllCriteriaSubClass();
		}
	}

	public static BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses binaryCriteriaSubClass()
	{
		return finder.binaryCriteriaSubClass();
	}

	public static class CriteriaBinaryCriteriaSubClassFinderSubclass extends BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaBinaryCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "binaryCriteriaSubClass";
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((Criteria) _obj).isBinaryCriteriaSubClassModifiedSinceDetachment();
		}

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

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

	public static OperatorCriteriaFinder.OperatorCriteriaSingleFinderForRelatedClasses operatorCriteriaSubClass()
	{
		return finder.operatorCriteriaSubClass();
	}

	public static class CriteriaOperatorCriteriaSubClassFinderSubclass extends OperatorCriteriaFinder.OperatorCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaOperatorCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "operatorCriteriaSubClass";
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((Criteria) _obj).isOperatorCriteriaSubClassModifiedSinceDetachment();
		}

		protected OperatorCriteria plainValueOf(Criteria _obj)
		{
			return _obj.getOperatorCriteriaSubClass();
		}

		protected OperatorCriteriaList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getOperatorCriteriaSubClass();
		}
	}

	public static EdgePointCriteriaFinder.EdgePointCriteriaSingleFinderForRelatedClasses edgePointCriteriaSubClass()
	{
		return finder.edgePointCriteriaSubClass();
	}

	public static class CriteriaEdgePointCriteriaSubClassFinderSubclass extends EdgePointCriteriaFinder.EdgePointCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaEdgePointCriteriaSubClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "edgePointCriteriaSubClass";
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((Criteria) _obj).isEdgePointCriteriaSubClassModifiedSinceDetachment();
		}

		protected EdgePointCriteria plainValueOf(Criteria _obj)
		{
			return _obj.getEdgePointCriteriaSubClass();
		}

		protected EdgePointCriteriaList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getEdgePointCriteriaSubClass();
		}
	}

	public static AssociationFinder.AssociationSingleFinderForRelatedClasses association()
	{
		return finder.association();
	}

	public static class CriteriaAssociationFinderSubclass extends AssociationFinder.AssociationSingleFinderForRelatedClasses
	{
		public CriteriaAssociationFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "association";
		}

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

		protected Association plainValueOf(Criteria _obj)
		{
			return _obj.getAssociation();
		}

		protected AssociationList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getAssociations();
		}
	}

	public static BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses ownerOfLeftCriteria()
	{
		return finder.ownerOfLeftCriteria();
	}

	public static class CriteriaOwnerOfLeftCriteriaFinderSubclass extends BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaOwnerOfLeftCriteriaFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "ownerOfLeftCriteria";
		}

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

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

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

	public static BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses ownerOfRightCriteria()
	{
		return finder.ownerOfRightCriteria();
	}

	public static class CriteriaOwnerOfRightCriteriaFinderSubclass extends BinaryCriteriaFinder.BinaryCriteriaSingleFinderForRelatedClasses
	{
		public CriteriaOwnerOfRightCriteriaFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "ownerOfRightCriteria";
		}

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

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

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

	public static ServiceFinder.ServiceSingleFinderForRelatedClasses queryService()
	{
		return finder.queryService();
	}

	public static class CriteriaQueryServiceFinderSubclass extends ServiceFinder.ServiceSingleFinderForRelatedClasses
	{
		public CriteriaQueryServiceFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "queryService";
		}

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

		protected Service plainValueOf(Criteria _obj)
		{
			return _obj.getQueryService();
		}

		protected ServiceList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getQueryServices();
		}
	}

	public static ServiceFinder.ServiceSingleFinderForRelatedClasses authorizeService()
	{
		return finder.authorizeService();
	}

	public static class CriteriaAuthorizeServiceFinderSubclass extends ServiceFinder.ServiceSingleFinderForRelatedClasses
	{
		public CriteriaAuthorizeServiceFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "authorizeService";
		}

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

		protected Service plainValueOf(Criteria _obj)
		{
			return _obj.getAuthorizeService();
		}

		protected ServiceList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getAuthorizeServices();
		}
	}

	public static ServiceFinder.ServiceSingleFinderForRelatedClasses validateService()
	{
		return finder.validateService();
	}

	public static class CriteriaValidateServiceFinderSubclass extends ServiceFinder.ServiceSingleFinderForRelatedClasses
	{
		public CriteriaValidateServiceFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "validateService";
		}

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

		protected Service plainValueOf(Criteria _obj)
		{
			return _obj.getValidateService();
		}

		protected ServiceList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getValidateServices();
		}
	}

	public static ServiceFinder.ServiceSingleFinderForRelatedClasses conflictService()
	{
		return finder.conflictService();
	}

	public static class CriteriaConflictServiceFinderSubclass extends ServiceFinder.ServiceSingleFinderForRelatedClasses
	{
		public CriteriaConflictServiceFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "conflictService";
		}

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

		protected Service plainValueOf(Criteria _obj)
		{
			return _obj.getConflictService();
		}

		protected ServiceList plainListValueOf(Object _obj)
		{
			return ((CriteriaList)_obj).getConflictServices();
		}
	}

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

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

	public static CriteriaSingleFinder 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)
	{
	}

	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[] 
		{
			AssociationFinder.getFinderInstance(),BinaryCriteriaFinder.getFinderInstance(),ServiceFinder.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[] 
		{
			AssociationFinder.getFinderInstance(),BinaryCriteriaFinder.getFinderInstance(),ServiceFinder.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.Criteria");
		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