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

klass.model.meta.domain.ServiceOrderByFinder 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 ServiceOrderByFinder
{
	private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/ServiceOrderBy";
	private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.ServiceOrderBy";
	private static final FinderMethodMap finderMethodMap;
	private static boolean isFullCache;
	private static boolean isOffHeap;
	private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.ServiceOrderBy");
	private static final ServiceOrderBySingleFinder finder = new ServiceOrderBySingleFinder();
	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(ServiceOrderByFinder.ServiceOrderByRelatedFinder.class);
		finderMethodMap.addNormalAttributeName("serviceGroupName");
		finderMethodMap.addNormalAttributeName("serviceUrlString");
		finderMethodMap.addNormalAttributeName("serviceVerb");
		finderMethodMap.addNormalAttributeName("thisMemberReferencePathId");
		finderMethodMap.addNormalAttributeName("orderByDirection");
		finderMethodMap.addNormalAttributeName("ordinal");
		finderMethodMap.addRelationshipName("thisMemberReferencePath");
		finderMethodMap.addRelationshipName("service");
	}

	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[2];
			result[0] = ServiceOrderByFinder.thisMemberReferencePathId().constructEqualityMapper(ThisMemberReferencePathFinder.id());
			result[1] = ThisMemberReferencePathFinder.id().constructEqualityMapper(ServiceOrderByFinder.thisMemberReferencePathId());
			constantJoinPool = result;
		}

		return constantJoinPool;
	}

	public static SourceAttributeType getSourceAttributeType()
	{
		return null;
	}

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

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

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

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

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

	public static ServiceOrderBy findByPrimaryKey(String serviceGroupName, String serviceUrlString, String serviceVerb, long thisMemberReferencePathId)
	{
		return finder.findByPrimaryKey(serviceGroupName, serviceUrlString, serviceVerb, thisMemberReferencePathId);
	}

	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;
			ServiceOrderByData _castedTargetData = (ServiceOrderByData) _targetData;
			if (_bean.getO1AsString().equals(_castedTargetData.getServiceGroupName()) && _bean.getO2AsString().equals(_castedTargetData.getServiceUrlString()) && _bean.getO3AsString().equals(_castedTargetData.getServiceVerb()) && _bean.getL1AsLong() == _castedTargetData.getThisMemberReferencePathId())
			{
				return true;
			}

			return false;
		}

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

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

	public static ServiceOrderBy zFindOneForRelationship(Operation operation)
	{
		List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
		return (ServiceOrderBy) 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 ServiceOrderByRelatedFinder extends AbstractRelatedFinder
	{
		private List relationshipFinders;
		private List dependentRelationshipFinders;
		private StringAttribute serviceGroupName;
		private StringAttribute serviceUrlString;
		private StringAttribute serviceVerb;
		private LongAttribute thisMemberReferencePathId;
		private StringAttribute orderByDirection;
		private IntegerAttribute ordinal;
		private ServiceOrderByThisMemberReferencePathFinderSubclass thisMemberReferencePath;
		private ServiceOrderByServiceFinderSubclass service;
		public ServiceOrderByRelatedFinder()
		{
			super();
		}

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

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

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

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

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

		public Attribute[] getPersistentAttributes()
		{
			Attribute[] attributes = new Attribute[6];
			attributes[0] = this.serviceGroupName();
			attributes[1] = this.serviceUrlString();
			attributes[2] = this.serviceVerb();
			attributes[3] = this.thisMemberReferencePathId();
			attributes[4] = this.orderByDirection();
			attributes[5] = this.ordinal();
			return attributes;
		}

		public List getRelationshipFinders()
		{
			if (relationshipFinders == null)
			{
				List relatedFinders = new ArrayList(2);
				relatedFinders.add(this.thisMemberReferencePath());
				relatedFinders.add(this.service());
				relationshipFinders = Collections.unmodifiableList(relatedFinders);
			}

			return relationshipFinders;
		}

		public List getDependentRelationshipFinders()
		{
			if (dependentRelationshipFinders == null)
			{
				List dependentRelatedFinders = new ArrayList(0);
				dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
			}

			return dependentRelationshipFinders;
		}

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

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

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

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

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

		public int getSerialVersionId()
		{
			return -272524883;
		}

		public boolean isPure()
		{
			return false;
		}

		public boolean isTemporary()
		{
			return false;
		}

		public int getHierarchyDepth()
		{
			return 0;
		}

		public StringAttribute serviceGroupName()
		{
			StringAttribute result = this.serviceGroupName;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"SERVICE_GROUP_NAME\"","","serviceGroupName",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
					new MappedStringAttribute(ServiceOrderByFinder.serviceGroupName(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("service");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Service", "orderBys");
				this.serviceGroupName = result;
			}

			return result;
		}

		public StringAttribute serviceUrlString()
		{
			StringAttribute result = this.serviceUrlString;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"SERVICE_URL_STRING\"","","serviceUrlString",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,8192,false, false) :
					new MappedStringAttribute(ServiceOrderByFinder.serviceUrlString(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("service");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Service", "orderBys");
				this.serviceUrlString = result;
			}

			return result;
		}

		public StringAttribute serviceVerb()
		{
			StringAttribute result = this.serviceVerb;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"SERVICE_VERB\"","","serviceVerb",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,Integer.MAX_VALUE,false, false) :
					new MappedStringAttribute(ServiceOrderByFinder.serviceVerb(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("service");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "Service", "orderBys");
				this.serviceVerb = result;
			}

			return result;
		}

		public LongAttribute thisMemberReferencePathId()
		{
			LongAttribute result = this.thisMemberReferencePathId;
			if (result == null)
			{
				result = mapper == null ? SingleColumnLongAttribute.generate("\"THIS_MEMBER_REFERENCE_PATH_ID\"","","thisMemberReferencePathId",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
					new MappedLongAttribute(ServiceOrderByFinder.thisMemberReferencePathId(), this.mapper, this.zGetValueSelector());
				this.thisMemberReferencePathId = result;
			}

			return result;
		}

		public StringAttribute orderByDirection()
		{
			StringAttribute result = this.orderByDirection;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"ORDER_BY_DIRECTION\"","","orderByDirection",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,Integer.MAX_VALUE,false, false) :
					new MappedStringAttribute(ServiceOrderByFinder.orderByDirection(), this.mapper, this.zGetValueSelector());
				this.orderByDirection = result;
			}

			return result;
		}

		public IntegerAttribute ordinal()
		{
			IntegerAttribute result = this.ordinal;
			if (result == null)
			{
				result = mapper == null ? SingleColumnIntegerAttribute.generate("\"ORDINAL\"","","ordinal",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
					new MappedIntegerAttribute(ServiceOrderByFinder.ordinal(), this.mapper, this.zGetValueSelector());
				this.ordinal = result;
			}

			return result;
		}

		public ThisMemberReferencePathFinder.ThisMemberReferencePathSingleFinderForRelatedClasses thisMemberReferencePath()
		{
			ServiceOrderByThisMemberReferencePathFinderSubclass result = this.thisMemberReferencePath;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceOrderByFinder.zGetServiceOrderByThisMemberReferencePathReverseMapper());
				newMapper.setToMany(false);
				result = new ServiceOrderByThisMemberReferencePathFinderSubclass(newMapper , this.zGetValueSelector() );
				this.thisMemberReferencePath = result;
			}

			return result;
		}

		public ServiceFinder.ServiceSingleFinderForRelatedClasses service()
		{
			ServiceOrderByServiceFinderSubclass result = this.service;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(ServiceFinder.zGetServiceOrderBysMapper());
				newMapper.setToMany(false);
				result = new ServiceOrderByServiceFinderSubclass(newMapper , this.zGetValueSelector() );
				this.service = 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 ServiceOrderByFinder.getPrimaryKeyAttributes();
		}

		public VersionAttribute getVersionAttribute()
		{
			return null;
		}

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

	public static class ServiceOrderByCollectionFinder extends ServiceOrderByRelatedFinder
	{
		public ServiceOrderByCollectionFinder(Mapper mapper)
		{
			super(mapper);
		}
	}

	public static abstract class ServiceOrderByCollectionFinderForRelatedClasses
	extends ServiceOrderByCollectionFinder
	implements DeepRelationshipAttribute
	{
		public ServiceOrderByCollectionFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	public static class ServiceOrderBySingleFinder extends ServiceOrderByRelatedFinder
	implements ToOneFinder
	{
		public ServiceOrderBySingleFinder(Mapper mapper)
		{
			super(mapper);
		}

		public ServiceOrderBySingleFinder()
		{
			super(null);
		}

		public Operation eq(ServiceOrderBy other)
		{
			return this.serviceGroupName().eq(other.getServiceGroupName())
			.and(this.serviceUrlString().eq(other.getServiceUrlString()))
			.and(this.serviceVerb().eq(other.getServiceVerb()))
			.and(this.thisMemberReferencePathId().eq(other.getThisMemberReferencePathId()))
			;
		}
		// this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
		public ServiceOrderBy findByPrimaryKey(String serviceGroupName, String serviceUrlString, String serviceVerb, long thisMemberReferencePathId)
		{
			ServiceOrderBy _result = null;
			Operation _op = null;
			Object _related = null;
			if (serviceGroupName != null && serviceUrlString != null && serviceVerb != null)
			{
				I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
				_bean.setO1(serviceGroupName);
				_bean.setO2(serviceUrlString);
				_bean.setO3(serviceVerb);
				_bean.setL1AsLong(thisMemberReferencePathId);
				MithraObjectPortal _portal = this.getMithraObjectPortal();
				_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
				_bean.release();
			}

			if (!(_related instanceof NulledRelation)) _result = (ServiceOrderBy) _related;
			if (_related == null)
			{
				_op = this.serviceGroupName().eq(serviceGroupName).and(this.serviceUrlString().eq(serviceUrlString)).and(this.serviceVerb().eq(serviceVerb)).and(this.thisMemberReferencePathId().eq(thisMemberReferencePathId));
			}

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

			return _result;
		}
	}

	public static abstract class ServiceOrderBySingleFinderForRelatedClasses extends ServiceOrderBySingleFinder implements DeepRelationshipAttribute
	{
		public ServiceOrderBySingleFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	private static Mapper thisMemberReferencePathReverseMapper = null;
	public static Mapper zGetServiceOrderByThisMemberReferencePathReverseMapper()
	{
		if (thisMemberReferencePathReverseMapper == null)
		{
			thisMemberReferencePathReverseMapper = zConstructServiceOrderByThisMemberReferencePathReverseMapper();
		}

		return thisMemberReferencePathReverseMapper;
	}

	private static Mapper thisMemberReferencePathMapper = null;
	public static Mapper zGetServiceOrderByThisMemberReferencePathMapper()
	{
		if (thisMemberReferencePathMapper == null)
		{
			thisMemberReferencePathMapper = zConstructServiceOrderByThisMemberReferencePathMapper();
		}

		return thisMemberReferencePathMapper;
	}

	private static Mapper thisMemberReferencePathPureReverseMapper = null;
	public static Mapper zGetServiceOrderByThisMemberReferencePathPureReverseMapper()
	{
		if (thisMemberReferencePathPureReverseMapper == null)
		{
			thisMemberReferencePathPureReverseMapper = zConstructServiceOrderByThisMemberReferencePathPureReverseMapper();
		}

		return thisMemberReferencePathPureReverseMapper;
	}

	private static Mapper zConstructServiceOrderByThisMemberReferencePathPureReverseMapper()
	{
		Mapper thisMemberReferencePathMapper = ServiceOrderByFinder.zGetConstantJoin(0);
		thisMemberReferencePathMapper.setName("thisMemberReferencePath");
		return thisMemberReferencePathMapper;
	}

	private static Mapper zConstructServiceOrderByThisMemberReferencePathReverseMapper()
	{
		Mapper thisMemberReferencePathMapper = ServiceOrderByFinder.zGetConstantJoin(0);
		thisMemberReferencePathMapper.setName("thisMemberReferencePath");
		return thisMemberReferencePathMapper;
	}

	private static Mapper zConstructServiceOrderByThisMemberReferencePathMapper()
	{
		Mapper thisMemberReferencePathMapper = ServiceOrderByFinder.zGetConstantJoin(1);
		thisMemberReferencePathMapper.setName("serviceOrderBy");
		return thisMemberReferencePathMapper;
	}

	/** maps to \"SERVICE_ORDER_BY\".\"SERVICE_GROUP_NAME\" **/
	public static StringAttribute serviceGroupName()
	{
		return finder.serviceGroupName();
	}

	/** maps to \"SERVICE_ORDER_BY\".\"SERVICE_URL_STRING\" **/
	public static StringAttribute serviceUrlString()
	{
		return finder.serviceUrlString();
	}

	/** maps to \"SERVICE_ORDER_BY\".\"SERVICE_VERB\" **/
	public static StringAttribute serviceVerb()
	{
		return finder.serviceVerb();
	}

	/** maps to \"SERVICE_ORDER_BY\".\"THIS_MEMBER_REFERENCE_PATH_ID\" **/
	public static LongAttribute thisMemberReferencePathId()
	{
		return finder.thisMemberReferencePathId();
	}

	/** maps to \"SERVICE_ORDER_BY\".\"ORDER_BY_DIRECTION\" **/
	public static StringAttribute orderByDirection()
	{
		return finder.orderByDirection();
	}

	/** maps to \"SERVICE_ORDER_BY\".\"ORDINAL\" **/
	public static IntegerAttribute ordinal()
	{
		return finder.ordinal();
	}

	public static ThisMemberReferencePathFinder.ThisMemberReferencePathSingleFinderForRelatedClasses thisMemberReferencePath()
	{
		return finder.thisMemberReferencePath();
	}

	public static class ServiceOrderByThisMemberReferencePathFinderSubclass extends ThisMemberReferencePathFinder.ThisMemberReferencePathSingleFinderForRelatedClasses
	{
		public ServiceOrderByThisMemberReferencePathFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "thisMemberReferencePath";
		}

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

		protected ThisMemberReferencePath plainValueOf(ServiceOrderBy _obj)
		{
			return _obj.getThisMemberReferencePath();
		}

		protected ThisMemberReferencePathList plainListValueOf(Object _obj)
		{
			return ((ServiceOrderByList)_obj).getThisMemberReferencePaths();
		}
	}

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

	public static class ServiceOrderByServiceFinderSubclass extends ServiceFinder.ServiceSingleFinderForRelatedClasses
	{
		public ServiceOrderByServiceFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "service";
			this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
				ServiceFinder.serviceGroupName(),
				ServiceFinder.urlString(),
				ServiceFinder.verb()).withExtractors(
				ServiceOrderByFinder.serviceGroupName(),
				ServiceOrderByFinder.serviceUrlString(),
				ServiceOrderByFinder.serviceVerb()));
		}

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

		protected Service plainValueOf(ServiceOrderBy _obj)
		{
			return _obj.getService();
		}

		protected ServiceList plainListValueOf(Object _obj)
		{
			return ((ServiceOrderByList)_obj).getServices();
		}
	}

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

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

	public static ServiceOrderBySingleFinder getFinderInstance()
	{
		return finder;
	}

	public static Attribute[] getPrimaryKeyAttributes()
	{
		return new Attribute[] 
		{
			serviceGroupName()
			, serviceUrlString()
			, serviceVerb()
			, thisMemberReferencePathId()
		}

		;
	}

	public static Attribute[] getImmutableAttributes()
	{
		return new Attribute[] 
		{
			serviceGroupName()
			, serviceGroupName()
			, serviceUrlString()
			, serviceVerb()
			, thisMemberReferencePathId()
		}

		;
	}

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

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

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

		);
	}

	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[] 
		{
			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[] 
		{
			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.ServiceOrderBy");
		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