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

klass.model.meta.domain.PrimitivePropertyFinder 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 PrimitivePropertyFinder
{
	private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/PrimitiveProperty";
	private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.PrimitiveProperty";
	private static final FinderMethodMap finderMethodMap;
	private static boolean isFullCache;
	private static boolean isOffHeap;
	private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.PrimitiveProperty");
	private static final PrimitivePropertySingleFinder finder = new PrimitivePropertySingleFinder();
	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(PrimitivePropertyFinder.PrimitivePropertyRelatedFinder.class);
		finderMethodMap.addNormalAttributeName("classifierName");
		finderMethodMap.addNormalAttributeName("name");
		finderMethodMap.addNormalAttributeName("primitiveType");
		finderMethodMap.addRelationshipName("minValidation");
		finderMethodMap.addRelationshipName("maxValidation");
		finderMethodMap.addRelationshipName("dataTypePropertySuperClass");
	}

	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] = PrimitivePropertyFinder.classifierName().constructEqualityMapper(MinPropertyValidationFinder.classifierName());
			result[1] = MinPropertyValidationFinder.classifierName().constructEqualityMapper(PrimitivePropertyFinder.classifierName());
			result[2] = PrimitivePropertyFinder.name().constructEqualityMapper(MinPropertyValidationFinder.propertyName());
			result[3] = MinPropertyValidationFinder.propertyName().constructEqualityMapper(PrimitivePropertyFinder.name());
			result[4] = PrimitivePropertyFinder.classifierName().constructEqualityMapper(MaxPropertyValidationFinder.classifierName());
			result[5] = MaxPropertyValidationFinder.classifierName().constructEqualityMapper(PrimitivePropertyFinder.classifierName());
			result[6] = PrimitivePropertyFinder.name().constructEqualityMapper(MaxPropertyValidationFinder.propertyName());
			result[7] = MaxPropertyValidationFinder.propertyName().constructEqualityMapper(PrimitivePropertyFinder.name());
			constantJoinPool = result;
		}

		return constantJoinPool;
	}

	public static SourceAttributeType getSourceAttributeType()
	{
		return null;
	}

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

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

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

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

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

	public static PrimitiveProperty findByPrimaryKey(String classifierName, String name)
	{
		return finder.findByPrimaryKey(classifierName, name);
	}

	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;
			PrimitivePropertyData _castedTargetData = (PrimitivePropertyData) _targetData;
			if (_bean.getO1AsString().equals(_castedTargetData.getClassifierName()) && _bean.getO2AsString().equals(_castedTargetData.getName()))
			{
				return true;
			}

			return false;
		}

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

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

	public static PrimitiveProperty zFindOneForRelationship(Operation operation)
	{
		List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
		return (PrimitiveProperty) 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 PrimitivePropertyRelatedFinder extends AbstractRelatedFinder
	{
		private List relationshipFinders;
		private List dependentRelationshipFinders;
		private StringAttribute classifierName;
		private StringAttribute name;
		private StringAttribute primitiveType;
		private PrimitivePropertyMinValidationFinderSubclass minValidation;
		private PrimitivePropertyMaxValidationFinderSubclass maxValidation;
		private PrimitivePropertyDataTypePropertySuperClassFinderSubclass dataTypePropertySuperClass;
		public PrimitivePropertyRelatedFinder()
		{
			super();
		}

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

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

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

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

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

		public Attribute[] getPersistentAttributes()
		{
			Attribute[] attributes = new Attribute[3];
			attributes[0] = this.classifierName();
			attributes[1] = this.name();
			attributes[2] = this.primitiveType();
			return attributes;
		}

		public List getRelationshipFinders()
		{
			if (relationshipFinders == null)
			{
				List relatedFinders = new ArrayList(3);
				relatedFinders.add(this.minValidation());
				relatedFinders.add(this.maxValidation());
				relatedFinders.add(this.dataTypePropertySuperClass());
				relationshipFinders = Collections.unmodifiableList(relatedFinders);
			}

			return relationshipFinders;
		}

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

			return dependentRelationshipFinders;
		}

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

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

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

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

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

		public int getSerialVersionId()
		{
			return -376939756;
		}

		public boolean isPure()
		{
			return false;
		}

		public boolean isTemporary()
		{
			return false;
		}

		public int getHierarchyDepth()
		{
			return 0;
		}

		public StringAttribute classifierName()
		{
			StringAttribute result = this.classifierName;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"CLASSIFIER_NAME\"","","classifierName",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
					new MappedStringAttribute(PrimitivePropertyFinder.classifierName(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("dataTypePropertySuperClass");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "DataTypeProperty", "primitivePropertySubClass");
				this.classifierName = result;
			}

			return result;
		}

		public StringAttribute name()
		{
			StringAttribute result = this.name;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"NAME\"","","name",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
					new MappedStringAttribute(PrimitivePropertyFinder.name(), this.mapper, this.zGetValueSelector());
				result.zSetOwningRelationship("dataTypePropertySuperClass");
				result.zSetOwningReverseRelationship("klass.model.meta.domain", "DataTypeProperty", "primitivePropertySubClass");
				this.name = result;
			}

			return result;
		}

		public StringAttribute primitiveType()
		{
			StringAttribute result = this.primitiveType;
			if (result == null)
			{
				result = mapper == null ? SingleColumnStringAttribute.generate("\"PRIMITIVE_TYPE\"","","primitiveType",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
					new MappedStringAttribute(PrimitivePropertyFinder.primitiveType(), this.mapper, this.zGetValueSelector());
				this.primitiveType = result;
			}

			return result;
		}

		public MinPropertyValidationFinder.MinPropertyValidationSingleFinderForRelatedClasses minValidation()
		{
			PrimitivePropertyMinValidationFinderSubclass result = this.minValidation;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(PrimitivePropertyFinder.zGetPrimitivePropertyMinValidationReverseMapper());
				newMapper.setToMany(false);
				result = new PrimitivePropertyMinValidationFinderSubclass(newMapper , this.zGetValueSelector() );
				this.minValidation = result;
			}

			return result;
		}

		public MaxPropertyValidationFinder.MaxPropertyValidationSingleFinderForRelatedClasses maxValidation()
		{
			PrimitivePropertyMaxValidationFinderSubclass result = this.maxValidation;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(PrimitivePropertyFinder.zGetPrimitivePropertyMaxValidationReverseMapper());
				newMapper.setToMany(false);
				result = new PrimitivePropertyMaxValidationFinderSubclass(newMapper , this.zGetValueSelector() );
				this.maxValidation = result;
			}

			return result;
		}

		public DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses dataTypePropertySuperClass()
		{
			PrimitivePropertyDataTypePropertySuperClassFinderSubclass result = this.dataTypePropertySuperClass;
			if (result == null)
			{
				Mapper newMapper = combineWithMapperIfExists(DataTypePropertyFinder.zGetDataTypePropertyPrimitivePropertySubClassMapper());
				newMapper.setToMany(false);
				result = new PrimitivePropertyDataTypePropertySuperClassFinderSubclass(newMapper , this.zGetValueSelector() );
				this.dataTypePropertySuperClass = 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 PrimitivePropertyFinder.getPrimaryKeyAttributes();
		}

		public VersionAttribute getVersionAttribute()
		{
			return null;
		}

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

	public static class PrimitivePropertyCollectionFinder extends PrimitivePropertyRelatedFinder
	{
		public PrimitivePropertyCollectionFinder(Mapper mapper)
		{
			super(mapper);
		}
	}

	public static abstract class PrimitivePropertyCollectionFinderForRelatedClasses
	extends PrimitivePropertyCollectionFinder
	implements DeepRelationshipAttribute
	{
		public PrimitivePropertyCollectionFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	public static class PrimitivePropertySingleFinder extends PrimitivePropertyRelatedFinder
	implements ToOneFinder
	{
		public PrimitivePropertySingleFinder(Mapper mapper)
		{
			super(mapper);
		}

		public PrimitivePropertySingleFinder()
		{
			super(null);
		}

		public Operation eq(PrimitiveProperty other)
		{
			return this.classifierName().eq(other.getClassifierName())
			.and(this.name().eq(other.getName()))
			;
		}
		// this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
		public PrimitiveProperty findByPrimaryKey(String classifierName, String name)
		{
			PrimitiveProperty _result = null;
			Operation _op = null;
			Object _related = null;
			if (classifierName != null && name != null)
			{
				I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
				_bean.setO1(classifierName);
				_bean.setO2(name);
				MithraObjectPortal _portal = this.getMithraObjectPortal();
				_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
				_bean.release();
			}

			if (!(_related instanceof NulledRelation)) _result = (PrimitiveProperty) _related;
			if (_related == null)
			{
				_op = this.classifierName().eq(classifierName).and(this.name().eq(name));
			}

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

			return _result;
		}
	}

	public static abstract class PrimitivePropertySingleFinderForRelatedClasses extends PrimitivePropertySingleFinder implements DeepRelationshipAttribute
	{
		public PrimitivePropertySingleFinderForRelatedClasses(Mapper mapper)
		{
			super(mapper);
		}

		protected NormalAndListValueSelector zGetValueSelector()
		{
			return this;
		}
	}

	private static Mapper minValidationReverseMapper = null;
	public static Mapper zGetPrimitivePropertyMinValidationReverseMapper()
	{
		if (minValidationReverseMapper == null)
		{
			minValidationReverseMapper = zConstructPrimitivePropertyMinValidationReverseMapper();
		}

		return minValidationReverseMapper;
	}

	private static Mapper minValidationMapper = null;
	public static Mapper zGetPrimitivePropertyMinValidationMapper()
	{
		if (minValidationMapper == null)
		{
			minValidationMapper = zConstructPrimitivePropertyMinValidationMapper();
		}

		return minValidationMapper;
	}

	private static Mapper minValidationPureReverseMapper = null;
	public static Mapper zGetPrimitivePropertyMinValidationPureReverseMapper()
	{
		if (minValidationPureReverseMapper == null)
		{
			minValidationPureReverseMapper = zConstructPrimitivePropertyMinValidationPureReverseMapper();
		}

		return minValidationPureReverseMapper;
	}

	private static Mapper zConstructPrimitivePropertyMinValidationPureReverseMapper()
	{
		InternalList minValidationMapperMapperList = new InternalList(2);
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(0));
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(2));
		Mapper minValidationMapper = new MultiEqualityMapper(minValidationMapperMapperList);
		minValidationMapper.setName("minValidation");
		return minValidationMapper;
	}

	private static Mapper zConstructPrimitivePropertyMinValidationReverseMapper()
	{
		InternalList minValidationMapperMapperList = new InternalList(2);
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(0));
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(2));
		Mapper minValidationMapper = new MultiEqualityMapper(minValidationMapperMapperList);
		minValidationMapper.setName("minValidation");
		return minValidationMapper;
	}

	private static Mapper zConstructPrimitivePropertyMinValidationMapper()
	{
		InternalList minValidationMapperMapperList = new InternalList(2);
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(1));
		minValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(3));
		Mapper minValidationMapper = new MultiEqualityMapper(minValidationMapperMapperList);
		minValidationMapper.setName("primitiveProperty");
		return minValidationMapper;
	}

	private static Mapper maxValidationReverseMapper = null;
	public static Mapper zGetPrimitivePropertyMaxValidationReverseMapper()
	{
		if (maxValidationReverseMapper == null)
		{
			maxValidationReverseMapper = zConstructPrimitivePropertyMaxValidationReverseMapper();
		}

		return maxValidationReverseMapper;
	}

	private static Mapper maxValidationMapper = null;
	public static Mapper zGetPrimitivePropertyMaxValidationMapper()
	{
		if (maxValidationMapper == null)
		{
			maxValidationMapper = zConstructPrimitivePropertyMaxValidationMapper();
		}

		return maxValidationMapper;
	}

	private static Mapper maxValidationPureReverseMapper = null;
	public static Mapper zGetPrimitivePropertyMaxValidationPureReverseMapper()
	{
		if (maxValidationPureReverseMapper == null)
		{
			maxValidationPureReverseMapper = zConstructPrimitivePropertyMaxValidationPureReverseMapper();
		}

		return maxValidationPureReverseMapper;
	}

	private static Mapper zConstructPrimitivePropertyMaxValidationPureReverseMapper()
	{
		InternalList maxValidationMapperMapperList = new InternalList(2);
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(4));
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(6));
		Mapper maxValidationMapper = new MultiEqualityMapper(maxValidationMapperMapperList);
		maxValidationMapper.setName("maxValidation");
		return maxValidationMapper;
	}

	private static Mapper zConstructPrimitivePropertyMaxValidationReverseMapper()
	{
		InternalList maxValidationMapperMapperList = new InternalList(2);
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(4));
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(6));
		Mapper maxValidationMapper = new MultiEqualityMapper(maxValidationMapperMapperList);
		maxValidationMapper.setName("maxValidation");
		return maxValidationMapper;
	}

	private static Mapper zConstructPrimitivePropertyMaxValidationMapper()
	{
		InternalList maxValidationMapperMapperList = new InternalList(2);
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(5));
		maxValidationMapperMapperList.add(PrimitivePropertyFinder.zGetConstantJoin(7));
		Mapper maxValidationMapper = new MultiEqualityMapper(maxValidationMapperMapperList);
		maxValidationMapper.setName("primitiveProperty");
		return maxValidationMapper;
	}

	/** maps to \"PRIMITIVE_PROPERTY\".\"CLASSIFIER_NAME\" **/
	public static StringAttribute classifierName()
	{
		return finder.classifierName();
	}

	/** maps to \"PRIMITIVE_PROPERTY\".\"NAME\" **/
	public static StringAttribute name()
	{
		return finder.name();
	}

	/** maps to \"PRIMITIVE_PROPERTY\".\"PRIMITIVE_TYPE\" **/
	public static StringAttribute primitiveType()
	{
		return finder.primitiveType();
	}

	public static MinPropertyValidationFinder.MinPropertyValidationSingleFinderForRelatedClasses minValidation()
	{
		return finder.minValidation();
	}

	public static class PrimitivePropertyMinValidationFinderSubclass extends MinPropertyValidationFinder.MinPropertyValidationSingleFinderForRelatedClasses
	{
		public PrimitivePropertyMinValidationFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "minValidation";
			this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
				MinPropertyValidationFinder.classifierName(),
				MinPropertyValidationFinder.propertyName()).withExtractors(
				PrimitivePropertyFinder.classifierName(),
				PrimitivePropertyFinder.name()));
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((PrimitiveProperty) _obj).isMinValidationModifiedSinceDetachment();
		}

		protected MinPropertyValidation plainValueOf(PrimitiveProperty _obj)
		{
			return _obj.getMinValidation();
		}

		protected MinPropertyValidationList plainListValueOf(Object _obj)
		{
			return ((PrimitivePropertyList)_obj).getMinValidations();
		}
	}

	public static MaxPropertyValidationFinder.MaxPropertyValidationSingleFinderForRelatedClasses maxValidation()
	{
		return finder.maxValidation();
	}

	public static class PrimitivePropertyMaxValidationFinderSubclass extends MaxPropertyValidationFinder.MaxPropertyValidationSingleFinderForRelatedClasses
	{
		public PrimitivePropertyMaxValidationFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "maxValidation";
			this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
				MaxPropertyValidationFinder.classifierName(),
				MaxPropertyValidationFinder.propertyName()).withExtractors(
				PrimitivePropertyFinder.classifierName(),
				PrimitivePropertyFinder.name()));
		}

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

		public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
		{
			return ((PrimitiveProperty) _obj).isMaxValidationModifiedSinceDetachment();
		}

		protected MaxPropertyValidation plainValueOf(PrimitiveProperty _obj)
		{
			return _obj.getMaxValidation();
		}

		protected MaxPropertyValidationList plainListValueOf(Object _obj)
		{
			return ((PrimitivePropertyList)_obj).getMaxValidations();
		}
	}

	public static DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses dataTypePropertySuperClass()
	{
		return finder.dataTypePropertySuperClass();
	}

	public static class PrimitivePropertyDataTypePropertySuperClassFinderSubclass extends DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses
	{
		public PrimitivePropertyDataTypePropertySuperClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
		{
			super(mapper);
			this._parentSelector = (AbstractRelatedFinder) parentSelector;
			this._orderBy = null;
			this._type = SIMPLE_TO_ONE;
			this._name = "dataTypePropertySuperClass";
			this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
				DataTypePropertyFinder.classifierName(),
				DataTypePropertyFinder.name()).withExtractors(
				PrimitivePropertyFinder.classifierName(),
				PrimitivePropertyFinder.name()));
		}

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

		protected DataTypeProperty plainValueOf(PrimitiveProperty _obj)
		{
			return _obj.getDataTypePropertySuperClass();
		}

		protected DataTypePropertyList plainListValueOf(Object _obj)
		{
			return ((PrimitivePropertyList)_obj).getDataTypePropertySuperClass();
		}
	}

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

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

	public static PrimitivePropertySingleFinder getFinderInstance()
	{
		return finder;
	}

	public static Attribute[] getPrimaryKeyAttributes()
	{
		return new Attribute[] 
		{
			classifierName()
			, name()
		}

		;
	}

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

		;
	}

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