klass.model.meta.domain.OperatorCriteriaFinder 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 OperatorCriteriaFinder
{
private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/OperatorCriteria";
private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.OperatorCriteria";
private static final FinderMethodMap finderMethodMap;
private static boolean isFullCache;
private static boolean isOffHeap;
private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.OperatorCriteria");
private static final OperatorCriteriaSingleFinder finder = new OperatorCriteriaSingleFinder();
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(OperatorCriteriaFinder.OperatorCriteriaRelatedFinder.class);
finderMethodMap.addNormalAttributeName("id");
finderMethodMap.addNormalAttributeName("sourceExpressionId");
finderMethodMap.addNormalAttributeName("targetExpressionId");
finderMethodMap.addNormalAttributeName("operator");
finderMethodMap.addRelationshipName("sourceExpressionValue");
finderMethodMap.addRelationshipName("targetExpressionValue");
finderMethodMap.addRelationshipName("criteriaSuperClass");
}
public static Attribute[] allPersistentAttributes()
{
return finder.getPersistentAttributes();
}
public static List allRelatedFinders()
{
return finder.getRelationshipFinders();
}
public static List allDependentRelatedFinders()
{
return finder.getDependentRelationshipFinders();
}
public static ConstantStringSet zGetConstantStringSet(int index)
{
return constantStringSets[index];
}
public static ConstantIntSet zGetConstantIntSet(int index)
{
return constantIntSets[index];
}
public static ConstantShortSet zGetConstantShortSet(int index)
{
return constantShortSets[index];
}
public static Mapper zGetConstantJoin(int index)
{
return getConstantJoinPool()[index];
}
private static Mapper[] constantJoinPool;
private static Mapper[] getConstantJoinPool()
{
if (constantJoinPool == null)
{
Mapper[] result = new Mapper[4];
result[0] = OperatorCriteriaFinder.sourceExpressionId().constructEqualityMapper(ExpressionValueFinder.id());
result[1] = ExpressionValueFinder.id().constructEqualityMapper(OperatorCriteriaFinder.sourceExpressionId());
result[2] = OperatorCriteriaFinder.targetExpressionId().constructEqualityMapper(ExpressionValueFinder.id());
result[3] = ExpressionValueFinder.id().constructEqualityMapper(OperatorCriteriaFinder.targetExpressionId());
constantJoinPool = result;
}
return constantJoinPool;
}
public static SourceAttributeType getSourceAttributeType()
{
return null;
}
public static OperatorCriteria findOne(com.gs.fw.finder.Operation operation)
{
return findOne(operation, false);
}
public static OperatorCriteria findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return findOne(operation, true);
}
public static OperatorCriteriaList findMany(com.gs.fw.finder.Operation operation)
{
return (OperatorCriteriaList) finder.findMany(operation);
}
public static OperatorCriteriaList findManyBypassCache(com.gs.fw.finder.Operation operation)
{
return (OperatorCriteriaList) finder.findManyBypassCache(operation);
}
private static OperatorCriteria findOne(com.gs.fw.finder.Operation operation, boolean bypassCache)
{
List found = getMithraObjectPortal().find((Operation) operation, bypassCache);
return (OperatorCriteria) FinderUtils.findOne(found);
}
public static OperatorCriteria 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;
OperatorCriteriaData _castedTargetData = (OperatorCriteriaData) _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 OperatorCriteria zFindOneForRelationship(Operation operation)
{
List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
return (OperatorCriteria) 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 OperatorCriteriaRelatedFinder extends AbstractRelatedFinder
{
private List relationshipFinders;
private List dependentRelationshipFinders;
private LongAttribute id;
private LongAttribute sourceExpressionId;
private LongAttribute targetExpressionId;
private StringAttribute operator;
private OperatorCriteriaSourceExpressionValueFinderSubclass sourceExpressionValue;
private OperatorCriteriaTargetExpressionValueFinderSubclass targetExpressionValue;
private OperatorCriteriaCriteriaSuperClassFinderSubclass criteriaSuperClass;
public OperatorCriteriaRelatedFinder()
{
super();
}
public OperatorCriteriaRelatedFinder(Mapper mapper)
{
super(mapper);
}
public String getFinderClassName()
{
return "klass.model.meta.domain.OperatorCriteriaFinder";
}
public RelatedFinder getRelationshipFinderByName(String relationshipName)
{
return OperatorCriteriaFinder.finderMethodMap.getRelationshipFinderByName(relationshipName, this);
}
public Attribute getAttributeByName(String attributeName)
{
return OperatorCriteriaFinder.finderMethodMap.getAttributeByName(attributeName, this);
}
public com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
{
return OperatorCriteriaFinder.finderMethodMap.getAttributeOrRelationshipSelectorFunction(attributeName, this);
}
public Attribute[] getPersistentAttributes()
{
Attribute[] attributes = new Attribute[4];
attributes[0] = this.id();
attributes[1] = this.sourceExpressionId();
attributes[2] = this.targetExpressionId();
attributes[3] = this.operator();
return attributes;
}
public List getRelationshipFinders()
{
if (relationshipFinders == null)
{
List relatedFinders = new ArrayList(3);
relatedFinders.add(this.sourceExpressionValue());
relatedFinders.add(this.targetExpressionValue());
relatedFinders.add(this.criteriaSuperClass());
relationshipFinders = Collections.unmodifiableList(relatedFinders);
}
return relationshipFinders;
}
public List getDependentRelationshipFinders()
{
if (dependentRelationshipFinders == null)
{
List dependentRelatedFinders = new ArrayList(0);
dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
}
return dependentRelationshipFinders;
}
public OperatorCriteria findOne(com.gs.fw.finder.Operation operation)
{
return OperatorCriteriaFinder.findOne(operation, false);
}
public OperatorCriteria findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return OperatorCriteriaFinder.findOne(operation, true);
}
public MithraList extends OperatorCriteria> findMany(com.gs.fw.finder.Operation operation)
{
return new OperatorCriteriaList((Operation) operation);
}
public MithraList extends OperatorCriteria> findManyBypassCache(com.gs.fw.finder.Operation operation)
{
OperatorCriteriaList result = (OperatorCriteriaList) this.findMany(operation);
result.setBypassCache(true);
return result;
}
public MithraList extends OperatorCriteria> constructEmptyList()
{
return new OperatorCriteriaList();
}
public int getSerialVersionId()
{
return -1458735947;
}
public boolean isPure()
{
return false;
}
public boolean isTemporary()
{
return false;
}
public int getHierarchyDepth()
{
return 0;
}
public LongAttribute id()
{
LongAttribute result = this.id;
if (result == null)
{
result = mapper == null ? SingleColumnLongAttribute.generate("\"ID\"","","id",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
new MappedLongAttribute(OperatorCriteriaFinder.id(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("criteriaSuperClass");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "Criteria", "operatorCriteriaSubClass");
this.id = result;
}
return result;
}
public LongAttribute sourceExpressionId()
{
LongAttribute result = this.sourceExpressionId;
if (result == null)
{
result = mapper == null ? SingleColumnLongAttribute.generate("\"SOURCE_EXPRESSION_ID\"","","sourceExpressionId",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
new MappedLongAttribute(OperatorCriteriaFinder.sourceExpressionId(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("sourceExpressionValue");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "ExpressionValue", "operatorCriteriaSourceOf");
this.sourceExpressionId = result;
}
return result;
}
public LongAttribute targetExpressionId()
{
LongAttribute result = this.targetExpressionId;
if (result == null)
{
result = mapper == null ? SingleColumnLongAttribute.generate("\"TARGET_EXPRESSION_ID\"","","targetExpressionId",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
new MappedLongAttribute(OperatorCriteriaFinder.targetExpressionId(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("targetExpressionValue");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "ExpressionValue", "operatorCriteriaTargetOf");
this.targetExpressionId = result;
}
return result;
}
public StringAttribute operator()
{
StringAttribute result = this.operator;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"OPERATOR\"","","operator",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
new MappedStringAttribute(OperatorCriteriaFinder.operator(), this.mapper, this.zGetValueSelector());
this.operator = result;
}
return result;
}
public ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses sourceExpressionValue()
{
OperatorCriteriaSourceExpressionValueFinderSubclass result = this.sourceExpressionValue;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(OperatorCriteriaFinder.zGetOperatorCriteriaSourceExpressionValueReverseMapper());
newMapper.setToMany(false);
result = new OperatorCriteriaSourceExpressionValueFinderSubclass(newMapper , this.zGetValueSelector() );
this.sourceExpressionValue = result;
}
return result;
}
public ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses targetExpressionValue()
{
OperatorCriteriaTargetExpressionValueFinderSubclass result = this.targetExpressionValue;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(OperatorCriteriaFinder.zGetOperatorCriteriaTargetExpressionValueReverseMapper());
newMapper.setToMany(false);
result = new OperatorCriteriaTargetExpressionValueFinderSubclass(newMapper , this.zGetValueSelector() );
this.targetExpressionValue = result;
}
return result;
}
public CriteriaFinder.CriteriaSingleFinderForRelatedClasses criteriaSuperClass()
{
OperatorCriteriaCriteriaSuperClassFinderSubclass result = this.criteriaSuperClass;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(CriteriaFinder.zGetCriteriaOperatorCriteriaSubClassMapper());
newMapper.setToMany(false);
result = new OperatorCriteriaCriteriaSuperClassFinderSubclass(newMapper , this.zGetValueSelector() );
this.criteriaSuperClass = result;
}
return result;
}
public Attribute getSourceAttribute()
{
return null;
}
private Mapper combineWithMapperIfExists(Mapper newMapper)
{
if (this.mapper != null)
{
return new LinkedMapper(this.mapper, newMapper);
}
return newMapper;
}
public Attribute[] getPrimaryKeyAttributes()
{
return OperatorCriteriaFinder.getPrimaryKeyAttributes();
}
public VersionAttribute getVersionAttribute()
{
return null;
}
public MithraObjectPortal getMithraObjectPortal()
{
return OperatorCriteriaFinder.getMithraObjectPortal();
}
}
public static class OperatorCriteriaCollectionFinder extends OperatorCriteriaRelatedFinder
{
public OperatorCriteriaCollectionFinder(Mapper mapper)
{
super(mapper);
}
}
public static abstract class OperatorCriteriaCollectionFinderForRelatedClasses
extends OperatorCriteriaCollectionFinder
implements DeepRelationshipAttribute
{
public OperatorCriteriaCollectionFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
public static class OperatorCriteriaSingleFinder extends OperatorCriteriaRelatedFinder
implements ToOneFinder
{
public OperatorCriteriaSingleFinder(Mapper mapper)
{
super(mapper);
}
public OperatorCriteriaSingleFinder()
{
super(null);
}
public Operation eq(OperatorCriteria 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 OperatorCriteria findByPrimaryKey(long id)
{
OperatorCriteria _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 = (OperatorCriteria) _related;
if (_related == null)
{
_op = this.id().eq(id);
}
if (_op != null)
{
_result = this.findOne(_op);
}
return _result;
}
}
public static abstract class OperatorCriteriaSingleFinderForRelatedClasses extends OperatorCriteriaSingleFinder implements DeepRelationshipAttribute
{
public OperatorCriteriaSingleFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
private static Mapper sourceExpressionValueReverseMapper = null;
public static Mapper zGetOperatorCriteriaSourceExpressionValueReverseMapper()
{
if (sourceExpressionValueReverseMapper == null)
{
sourceExpressionValueReverseMapper = zConstructOperatorCriteriaSourceExpressionValueReverseMapper();
}
return sourceExpressionValueReverseMapper;
}
private static Mapper sourceExpressionValueMapper = null;
public static Mapper zGetOperatorCriteriaSourceExpressionValueMapper()
{
if (sourceExpressionValueMapper == null)
{
sourceExpressionValueMapper = zConstructOperatorCriteriaSourceExpressionValueMapper();
}
return sourceExpressionValueMapper;
}
private static Mapper sourceExpressionValuePureReverseMapper = null;
public static Mapper zGetOperatorCriteriaSourceExpressionValuePureReverseMapper()
{
if (sourceExpressionValuePureReverseMapper == null)
{
sourceExpressionValuePureReverseMapper = zConstructOperatorCriteriaSourceExpressionValuePureReverseMapper();
}
return sourceExpressionValuePureReverseMapper;
}
private static Mapper zConstructOperatorCriteriaSourceExpressionValuePureReverseMapper()
{
Mapper sourceExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(0);
sourceExpressionValueMapper.setName("sourceExpressionValue");
return sourceExpressionValueMapper;
}
private static Mapper zConstructOperatorCriteriaSourceExpressionValueReverseMapper()
{
Mapper sourceExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(0);
sourceExpressionValueMapper.setName("sourceExpressionValue");
return sourceExpressionValueMapper;
}
private static Mapper zConstructOperatorCriteriaSourceExpressionValueMapper()
{
Mapper sourceExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(1);
sourceExpressionValueMapper.setName("operatorCriteriaSourceOf");
return sourceExpressionValueMapper;
}
private static Mapper targetExpressionValueReverseMapper = null;
public static Mapper zGetOperatorCriteriaTargetExpressionValueReverseMapper()
{
if (targetExpressionValueReverseMapper == null)
{
targetExpressionValueReverseMapper = zConstructOperatorCriteriaTargetExpressionValueReverseMapper();
}
return targetExpressionValueReverseMapper;
}
private static Mapper targetExpressionValueMapper = null;
public static Mapper zGetOperatorCriteriaTargetExpressionValueMapper()
{
if (targetExpressionValueMapper == null)
{
targetExpressionValueMapper = zConstructOperatorCriteriaTargetExpressionValueMapper();
}
return targetExpressionValueMapper;
}
private static Mapper targetExpressionValuePureReverseMapper = null;
public static Mapper zGetOperatorCriteriaTargetExpressionValuePureReverseMapper()
{
if (targetExpressionValuePureReverseMapper == null)
{
targetExpressionValuePureReverseMapper = zConstructOperatorCriteriaTargetExpressionValuePureReverseMapper();
}
return targetExpressionValuePureReverseMapper;
}
private static Mapper zConstructOperatorCriteriaTargetExpressionValuePureReverseMapper()
{
Mapper targetExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(2);
targetExpressionValueMapper.setName("targetExpressionValue");
return targetExpressionValueMapper;
}
private static Mapper zConstructOperatorCriteriaTargetExpressionValueReverseMapper()
{
Mapper targetExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(2);
targetExpressionValueMapper.setName("targetExpressionValue");
return targetExpressionValueMapper;
}
private static Mapper zConstructOperatorCriteriaTargetExpressionValueMapper()
{
Mapper targetExpressionValueMapper = OperatorCriteriaFinder.zGetConstantJoin(3);
targetExpressionValueMapper.setName("operatorCriteriaTargetOf");
return targetExpressionValueMapper;
}
/** maps to \"OPERATOR_CRITERIA\".\"ID\" **/
public static LongAttribute id()
{
return finder.id();
}
/** maps to \"OPERATOR_CRITERIA\".\"SOURCE_EXPRESSION_ID\" **/
public static LongAttribute sourceExpressionId()
{
return finder.sourceExpressionId();
}
/** maps to \"OPERATOR_CRITERIA\".\"TARGET_EXPRESSION_ID\" **/
public static LongAttribute targetExpressionId()
{
return finder.targetExpressionId();
}
/** maps to \"OPERATOR_CRITERIA\".\"OPERATOR\" **/
public static StringAttribute operator()
{
return finder.operator();
}
public static ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses sourceExpressionValue()
{
return finder.sourceExpressionValue();
}
public static class OperatorCriteriaSourceExpressionValueFinderSubclass extends ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses
{
public OperatorCriteriaSourceExpressionValueFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "sourceExpressionValue";
}
public DeepRelationshipAttribute copy()
{
return new OperatorCriteriaSourceExpressionValueFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected ExpressionValue plainValueOf(OperatorCriteria _obj)
{
return _obj.getSourceExpressionValue();
}
protected ExpressionValueList plainListValueOf(Object _obj)
{
return ((OperatorCriteriaList)_obj).getSourceExpressionValues();
}
}
public static ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses targetExpressionValue()
{
return finder.targetExpressionValue();
}
public static class OperatorCriteriaTargetExpressionValueFinderSubclass extends ExpressionValueFinder.ExpressionValueSingleFinderForRelatedClasses
{
public OperatorCriteriaTargetExpressionValueFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "targetExpressionValue";
}
public DeepRelationshipAttribute copy()
{
return new OperatorCriteriaTargetExpressionValueFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected ExpressionValue plainValueOf(OperatorCriteria _obj)
{
return _obj.getTargetExpressionValue();
}
protected ExpressionValueList plainListValueOf(Object _obj)
{
return ((OperatorCriteriaList)_obj).getTargetExpressionValues();
}
}
public static CriteriaFinder.CriteriaSingleFinderForRelatedClasses criteriaSuperClass()
{
return finder.criteriaSuperClass();
}
public static class OperatorCriteriaCriteriaSuperClassFinderSubclass extends CriteriaFinder.CriteriaSingleFinderForRelatedClasses
{
public OperatorCriteriaCriteriaSuperClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "criteriaSuperClass";
}
public DeepRelationshipAttribute copy()
{
return new OperatorCriteriaCriteriaSuperClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected Criteria plainValueOf(OperatorCriteria _obj)
{
return _obj.getCriteriaSuperClass();
}
protected CriteriaList plainListValueOf(Object _obj)
{
return ((OperatorCriteriaList)_obj).getCriteriaSuperClass();
}
}
public static Operation eq(OperatorCriteria other)
{
return finder.eq(other);
}
public static Operation all()
{
return new All(id());
}
public static OperatorCriteriaSingleFinder getFinderInstance()
{
return finder;
}
public static Attribute[] getPrimaryKeyAttributes()
{
return new Attribute[]
{
id()
}
;
}
public static Attribute[] getImmutableAttributes()
{
return new Attribute[]
{
id()
, id()
}
;
}
public static AsOfAttribute[] getAsOfAttributes()
{
return null;
}
protected static void initializeIndicies(Cache cache)
{
cache.addIndex("0 Index", new Attribute[]
{
sourceExpressionId()
}
);
cache.addIndex("1 Index", new Attribute[]
{
targetExpressionId()
}
);
}
protected static void initializePortal(MithraObjectDeserializer objectFactory, Cache cache,
MithraConfigurationManager.Config config)
{
initializeIndicies(cache);
isFullCache = cache.isFullCache();
isOffHeap = cache.isOffHeap();
MithraObjectPortal portal;
if (config.isParticipatingInTx())
{
portal = new MithraTransactionalPortal(objectFactory, cache, getFinderInstance(),
config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null,
null, null, 0,
(MithraObjectPersister) objectFactory);
}
else
{
portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(),
config.getRelationshipCacheSize(), config.getMinQueriesToKeep(), null,
null, null, 0,
(MithraObjectPersister) objectFactory);
}
portal.setParentFinders(new RelatedFinder[]
{
CriteriaFinder.getFinderInstance(),
}
);
config.initializePortal(portal);
objectPortal.destroy();
objectPortal = portal;
}
protected static void initializeClientPortal(MithraObjectDeserializer objectFactory, Cache cache,
MithraConfigurationManager.Config config)
{
initializeIndicies(cache);
isFullCache = cache.isFullCache();
isOffHeap = cache.isOffHeap();
MithraObjectPortal portal;
if (config.isParticipatingInTx())
{
portal = new MithraTransactionalPortal(objectFactory, cache, getFinderInstance(),
config.getRelationshipCacheSize(), config.getMinQueriesToKeep(),
null, null,
null, 0,
new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), false));
}
else
{
portal = new MithraReadOnlyPortal(objectFactory, cache, getFinderInstance(),
config.getRelationshipCacheSize(), config.getMinQueriesToKeep(),
null, null,
null, 0,
new RemoteMithraObjectPersister(config.getRemoteMithraService(), getFinderInstance(), false));
}
portal.setParentFinders(new RelatedFinder[]
{
CriteriaFinder.getFinderInstance(),
}
);
config.initializePortal(portal);
objectPortal.destroy();
objectPortal = portal;
}
public static boolean isFullCache()
{
return isFullCache;
}
public static boolean isOffHeap()
{
return isOffHeap;
}
public static Attribute getAttributeByName(String attributeName)
{
return finder.getAttributeByName(attributeName);
}
public static com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
{
return finder.getAttributeOrRelationshipSelector(attributeName);
}
public static RelatedFinder getRelatedFinderByName(String relationshipName)
{
return finder.getRelationshipFinderByName(relationshipName);
}
public static DoubleAttribute[] zGetDoubleAttributes()
{
DoubleAttribute[] result = new DoubleAttribute[0];
return result;
}
public static BigDecimalAttribute[] zGetBigDecimalAttributes()
{
BigDecimalAttribute[] result = new BigDecimalAttribute[0];
return result;
}
public static void zResetPortal()
{
objectPortal.destroy();
objectPortal = new UninitializedPortal("klass.model.meta.domain.OperatorCriteria");
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