klass.model.meta.domain.KlassFinder 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 KlassFinder
{
private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/Klass";
private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.Klass";
private static final FinderMethodMap finderMethodMap;
private static boolean isFullCache;
private static boolean isOffHeap;
private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.Klass");
private static final KlassSingleFinder finder = new KlassSingleFinder();
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(KlassFinder.KlassRelatedFinder.class);
finderMethodMap.addNormalAttributeName("name");
finderMethodMap.addNormalAttributeName("superClassName");
finderMethodMap.addNormalAttributeName("abstractClass");
finderMethodMap.addRelationshipName("superClass");
finderMethodMap.addRelationshipName("associationEnds");
finderMethodMap.addRelationshipName("parameterizedProperties");
finderMethodMap.addRelationshipName("associationEndsResultTypeOf");
finderMethodMap.addRelationshipName("classifierSuperClass");
finderMethodMap.addRelationshipName("subClasses");
finderMethodMap.addRelationshipName("memberReferencePaths");
finderMethodMap.addRelationshipName("parameterizedPropertiesResultTypeOf");
finderMethodMap.addRelationshipName("serviceGroups");
}
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[6];
result[0] = KlassFinder.superClassName().constructEqualityMapper(KlassFinder.name());
result[1] = KlassFinder.name().constructEqualityMapper(KlassFinder.superClassName());
result[2] = KlassFinder.name().constructEqualityMapper(AssociationEndFinder.owningClassName());
result[3] = AssociationEndFinder.owningClassName().constructEqualityMapper(KlassFinder.name());
result[4] = KlassFinder.name().constructEqualityMapper(ParameterizedPropertyFinder.owningClassName());
result[5] = ParameterizedPropertyFinder.owningClassName().constructEqualityMapper(KlassFinder.name());
constantJoinPool = result;
}
return constantJoinPool;
}
public static SourceAttributeType getSourceAttributeType()
{
return null;
}
public static Klass findOne(com.gs.fw.finder.Operation operation)
{
return findOne(operation, false);
}
public static Klass findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return findOne(operation, true);
}
public static KlassList findMany(com.gs.fw.finder.Operation operation)
{
return (KlassList) finder.findMany(operation);
}
public static KlassList findManyBypassCache(com.gs.fw.finder.Operation operation)
{
return (KlassList) finder.findManyBypassCache(operation);
}
private static Klass findOne(com.gs.fw.finder.Operation operation, boolean bypassCache)
{
List found = getMithraObjectPortal().find((Operation) operation, bypassCache);
return (Klass) FinderUtils.findOne(found);
}
public static Klass findByPrimaryKey(String name)
{
return finder.findByPrimaryKey(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;
KlassData _castedTargetData = (KlassData) _targetData;
if (_bean.getO1AsString().equals(_castedTargetData.getName()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
I3O3L3 _bean = (I3O3L3) _srcData;
return HashUtil.hash(_bean.getO1AsString());
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
I3O3L3 _bean = (I3O3L3) _srcData;
return HashUtil.offHeapHash(_bean.getO1AsString());
}
}
public static Klass zFindOneForRelationship(Operation operation)
{
List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
return (Klass) 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 KlassRelatedFinder extends AbstractRelatedFinder
{
private List relationshipFinders;
private List dependentRelationshipFinders;
private StringAttribute name;
private StringAttribute superClassName;
private BooleanAttribute abstractClass;
private KlassSuperClassFinderSubclass superClass;
private KlassAssociationEndsFinderSubclass associationEnds;
private KlassParameterizedPropertiesFinderSubclass parameterizedProperties;
private KlassAssociationEndsResultTypeOfFinderSubclass associationEndsResultTypeOf;
private KlassClassifierSuperClassFinderSubclass classifierSuperClass;
private KlassSubClassesFinderSubclass subClasses;
private KlassMemberReferencePathsFinderSubclass memberReferencePaths;
private KlassParameterizedPropertiesResultTypeOfFinderSubclass parameterizedPropertiesResultTypeOf;
private KlassServiceGroupsFinderSubclass serviceGroups;
public KlassRelatedFinder()
{
super();
}
public KlassRelatedFinder(Mapper mapper)
{
super(mapper);
}
public String getFinderClassName()
{
return "klass.model.meta.domain.KlassFinder";
}
public RelatedFinder getRelationshipFinderByName(String relationshipName)
{
return KlassFinder.finderMethodMap.getRelationshipFinderByName(relationshipName, this);
}
public Attribute getAttributeByName(String attributeName)
{
return KlassFinder.finderMethodMap.getAttributeByName(attributeName, this);
}
public com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
{
return KlassFinder.finderMethodMap.getAttributeOrRelationshipSelectorFunction(attributeName, this);
}
public Attribute[] getPersistentAttributes()
{
Attribute[] attributes = new Attribute[3];
attributes[0] = this.name();
attributes[1] = this.superClassName();
attributes[2] = this.abstractClass();
return attributes;
}
public List getRelationshipFinders()
{
if (relationshipFinders == null)
{
List relatedFinders = new ArrayList(9);
relatedFinders.add(this.superClass());
relatedFinders.add(this.associationEnds());
relatedFinders.add(this.parameterizedProperties());
relatedFinders.add(this.associationEndsResultTypeOf());
relatedFinders.add(this.classifierSuperClass());
relatedFinders.add(this.subClasses());
relatedFinders.add(this.memberReferencePaths());
relatedFinders.add(this.parameterizedPropertiesResultTypeOf());
relatedFinders.add(this.serviceGroups());
relationshipFinders = Collections.unmodifiableList(relatedFinders);
}
return relationshipFinders;
}
public List getDependentRelationshipFinders()
{
if (dependentRelationshipFinders == null)
{
List dependentRelatedFinders = new ArrayList(1);
dependentRelatedFinders.add(this.parameterizedProperties());
dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
}
return dependentRelationshipFinders;
}
public Klass findOne(com.gs.fw.finder.Operation operation)
{
return KlassFinder.findOne(operation, false);
}
public Klass findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return KlassFinder.findOne(operation, true);
}
public MithraList extends Klass> findMany(com.gs.fw.finder.Operation operation)
{
return new KlassList((Operation) operation);
}
public MithraList extends Klass> findManyBypassCache(com.gs.fw.finder.Operation operation)
{
KlassList result = (KlassList) this.findMany(operation);
result.setBypassCache(true);
return result;
}
public MithraList extends Klass> constructEmptyList()
{
return new KlassList();
}
public int getSerialVersionId()
{
return 1931771583;
}
public boolean isPure()
{
return false;
}
public boolean isTemporary()
{
return false;
}
public int getHierarchyDepth()
{
return 0;
}
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(KlassFinder.name(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("classifierSuperClass");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "Classifier", "klassSubClass");
this.name = result;
}
return result;
}
public StringAttribute superClassName()
{
StringAttribute result = this.superClassName;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"SUPER_CLASS_NAME\"","","superClassName",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,true,false,this,null,true,false,-1,-1,-1,256,false, false) :
new MappedStringAttribute(KlassFinder.superClassName(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("superClass");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "Klass", "subClasses");
this.superClassName = result;
}
return result;
}
public BooleanAttribute abstractClass()
{
BooleanAttribute result = this.abstractClass;
if (result == null)
{
result = mapper == null ? SingleColumnBooleanAttribute.generate("\"ABSTRACT_CLASS\"","","abstractClass",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1, false) :
new MappedBooleanAttribute(KlassFinder.abstractClass(), this.mapper, this.zGetValueSelector());
this.abstractClass = result;
}
return result;
}
public KlassFinder.KlassSingleFinderForRelatedClasses superClass()
{
KlassSuperClassFinderSubclass result = this.superClass;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(KlassFinder.zGetKlassSuperClassReverseMapper());
newMapper.setToMany(false);
result = new KlassSuperClassFinderSubclass(newMapper , this.zGetValueSelector() );
this.superClass = result;
}
return result;
}
public AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses associationEnds()
{
KlassAssociationEndsFinderSubclass result = this.associationEnds;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(KlassFinder.zGetKlassAssociationEndsReverseMapper());
newMapper.setToMany(true);
result = new KlassAssociationEndsFinderSubclass(newMapper , this.zGetValueSelector() );
this.associationEnds = result;
}
return result;
}
public ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses parameterizedProperties()
{
KlassParameterizedPropertiesFinderSubclass result = this.parameterizedProperties;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(KlassFinder.zGetKlassParameterizedPropertiesReverseMapper());
newMapper.setToMany(true);
result = new KlassParameterizedPropertiesFinderSubclass(newMapper , this.zGetValueSelector() );
this.parameterizedProperties = result;
}
return result;
}
public AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses associationEndsResultTypeOf()
{
KlassAssociationEndsResultTypeOfFinderSubclass result = this.associationEndsResultTypeOf;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(AssociationEndFinder.zGetAssociationEndResultTypeMapper());
newMapper.setToMany(true);
result = new KlassAssociationEndsResultTypeOfFinderSubclass(newMapper , this.zGetValueSelector() );
this.associationEndsResultTypeOf = result;
}
return result;
}
public ClassifierFinder.ClassifierSingleFinderForRelatedClasses classifierSuperClass()
{
KlassClassifierSuperClassFinderSubclass result = this.classifierSuperClass;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(ClassifierFinder.zGetClassifierKlassSubClassMapper());
newMapper.setToMany(false);
result = new KlassClassifierSuperClassFinderSubclass(newMapper , this.zGetValueSelector() );
this.classifierSuperClass = result;
}
return result;
}
public KlassFinder.KlassCollectionFinderForRelatedClasses subClasses()
{
KlassSubClassesFinderSubclass result = this.subClasses;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(KlassFinder.zGetKlassSuperClassMapper());
newMapper.setToMany(true);
result = new KlassSubClassesFinderSubclass(newMapper , this.zGetValueSelector() );
this.subClasses = result;
}
return result;
}
public MemberReferencePathFinder.MemberReferencePathCollectionFinderForRelatedClasses memberReferencePaths()
{
KlassMemberReferencePathsFinderSubclass result = this.memberReferencePaths;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(MemberReferencePathFinder.zGetMemberReferencePathKlassMapper());
newMapper.setToMany(true);
result = new KlassMemberReferencePathsFinderSubclass(newMapper , this.zGetValueSelector() );
this.memberReferencePaths = result;
}
return result;
}
public ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses parameterizedPropertiesResultTypeOf()
{
KlassParameterizedPropertiesResultTypeOfFinderSubclass result = this.parameterizedPropertiesResultTypeOf;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(ParameterizedPropertyFinder.zGetParameterizedPropertyResultTypeMapper());
newMapper.setToMany(true);
result = new KlassParameterizedPropertiesResultTypeOfFinderSubclass(newMapper , this.zGetValueSelector() );
this.parameterizedPropertiesResultTypeOf = result;
}
return result;
}
public ServiceGroupFinder.ServiceGroupCollectionFinderForRelatedClasses serviceGroups()
{
KlassServiceGroupsFinderSubclass result = this.serviceGroups;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(ServiceGroupFinder.zGetServiceGroupOwningClassMapper());
newMapper.setToMany(true);
result = new KlassServiceGroupsFinderSubclass(newMapper , this.zGetValueSelector() );
this.serviceGroups = 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 KlassFinder.getPrimaryKeyAttributes();
}
public VersionAttribute getVersionAttribute()
{
return null;
}
public MithraObjectPortal getMithraObjectPortal()
{
return KlassFinder.getMithraObjectPortal();
}
}
public static class KlassCollectionFinder extends KlassRelatedFinder
{
public KlassCollectionFinder(Mapper mapper)
{
super(mapper);
}
}
public static abstract class KlassCollectionFinderForRelatedClasses
extends KlassCollectionFinder
implements DeepRelationshipAttribute
{
public KlassCollectionFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
public static class KlassSingleFinder extends KlassRelatedFinder
implements ToOneFinder
{
public KlassSingleFinder(Mapper mapper)
{
super(mapper);
}
public KlassSingleFinder()
{
super(null);
}
public Operation eq(Klass other)
{
return 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 Klass findByPrimaryKey(String name)
{
Klass _result = null;
Operation _op = null;
Object _related = null;
if (name != null)
{
I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
_bean.setO1(name);
MithraObjectPortal _portal = this.getMithraObjectPortal();
_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
_bean.release();
}
if (!(_related instanceof NulledRelation)) _result = (Klass) _related;
if (_related == null)
{
_op = this.name().eq(name);
}
if (_op != null)
{
_result = this.findOne(_op);
}
return _result;
}
}
public static abstract class KlassSingleFinderForRelatedClasses extends KlassSingleFinder implements DeepRelationshipAttribute
{
public KlassSingleFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
private static Mapper superClassReverseMapper = null;
public static Mapper zGetKlassSuperClassReverseMapper()
{
if (superClassReverseMapper == null)
{
superClassReverseMapper = zConstructKlassSuperClassReverseMapper();
}
return superClassReverseMapper;
}
private static Mapper superClassMapper = null;
public static Mapper zGetKlassSuperClassMapper()
{
if (superClassMapper == null)
{
superClassMapper = zConstructKlassSuperClassMapper();
}
return superClassMapper;
}
private static Mapper superClassPureReverseMapper = null;
public static Mapper zGetKlassSuperClassPureReverseMapper()
{
if (superClassPureReverseMapper == null)
{
superClassPureReverseMapper = zConstructKlassSuperClassPureReverseMapper();
}
return superClassPureReverseMapper;
}
private static Mapper zConstructKlassSuperClassPureReverseMapper()
{
Mapper superClassMapper = KlassFinder.zGetConstantJoin(0);
superClassMapper.setName("superClass");
return superClassMapper;
}
private static Mapper zConstructKlassSuperClassReverseMapper()
{
Mapper superClassMapper = KlassFinder.zGetConstantJoin(0);
superClassMapper.setName("superClass");
return superClassMapper;
}
private static Mapper zConstructKlassSuperClassMapper()
{
Mapper superClassMapper = KlassFinder.zGetConstantJoin(1);
superClassMapper.setName("subClasses");
return superClassMapper;
}
private static Mapper associationEndsReverseMapper = null;
public static Mapper zGetKlassAssociationEndsReverseMapper()
{
if (associationEndsReverseMapper == null)
{
associationEndsReverseMapper = zConstructKlassAssociationEndsReverseMapper();
}
return associationEndsReverseMapper;
}
private static Mapper associationEndsMapper = null;
public static Mapper zGetKlassAssociationEndsMapper()
{
if (associationEndsMapper == null)
{
associationEndsMapper = zConstructKlassAssociationEndsMapper();
}
return associationEndsMapper;
}
private static Mapper associationEndsPureReverseMapper = null;
public static Mapper zGetKlassAssociationEndsPureReverseMapper()
{
if (associationEndsPureReverseMapper == null)
{
associationEndsPureReverseMapper = zConstructKlassAssociationEndsPureReverseMapper();
}
return associationEndsPureReverseMapper;
}
private static Mapper zConstructKlassAssociationEndsPureReverseMapper()
{
Mapper associationEndsMapper = KlassFinder.zGetConstantJoin(2);
associationEndsMapper.setName("associationEnds");
return associationEndsMapper;
}
private static Mapper zConstructKlassAssociationEndsReverseMapper()
{
Mapper associationEndsMapper = KlassFinder.zGetConstantJoin(2);
associationEndsMapper.setName("associationEnds");
return associationEndsMapper;
}
private static Mapper zConstructKlassAssociationEndsMapper()
{
Mapper associationEndsMapper = KlassFinder.zGetConstantJoin(3);
associationEndsMapper.setName("owningClass");
return associationEndsMapper;
}
private static Mapper parameterizedPropertiesReverseMapper = null;
public static Mapper zGetKlassParameterizedPropertiesReverseMapper()
{
if (parameterizedPropertiesReverseMapper == null)
{
parameterizedPropertiesReverseMapper = zConstructKlassParameterizedPropertiesReverseMapper();
}
return parameterizedPropertiesReverseMapper;
}
private static Mapper parameterizedPropertiesMapper = null;
public static Mapper zGetKlassParameterizedPropertiesMapper()
{
if (parameterizedPropertiesMapper == null)
{
parameterizedPropertiesMapper = zConstructKlassParameterizedPropertiesMapper();
}
return parameterizedPropertiesMapper;
}
private static Mapper parameterizedPropertiesPureReverseMapper = null;
public static Mapper zGetKlassParameterizedPropertiesPureReverseMapper()
{
if (parameterizedPropertiesPureReverseMapper == null)
{
parameterizedPropertiesPureReverseMapper = zConstructKlassParameterizedPropertiesPureReverseMapper();
}
return parameterizedPropertiesPureReverseMapper;
}
private static Mapper zConstructKlassParameterizedPropertiesPureReverseMapper()
{
Mapper parameterizedPropertiesMapper = KlassFinder.zGetConstantJoin(4);
parameterizedPropertiesMapper.setName("parameterizedProperties");
return parameterizedPropertiesMapper;
}
private static Mapper zConstructKlassParameterizedPropertiesReverseMapper()
{
Mapper parameterizedPropertiesMapper = KlassFinder.zGetConstantJoin(4);
parameterizedPropertiesMapper.setName("parameterizedProperties");
return parameterizedPropertiesMapper;
}
private static Mapper zConstructKlassParameterizedPropertiesMapper()
{
Mapper parameterizedPropertiesMapper = KlassFinder.zGetConstantJoin(5);
parameterizedPropertiesMapper.setName("owningClass");
return parameterizedPropertiesMapper;
}
/** maps to \"KLASS\".\"NAME\" **/
public static StringAttribute name()
{
return finder.name();
}
/** maps to \"KLASS\".\"SUPER_CLASS_NAME\" **/
public static StringAttribute superClassName()
{
return finder.superClassName();
}
/** maps to \"KLASS\".\"ABSTRACT_CLASS\" **/
public static BooleanAttribute abstractClass()
{
return finder.abstractClass();
}
public static KlassFinder.KlassSingleFinderForRelatedClasses superClass()
{
return finder.superClass();
}
public static class KlassSuperClassFinderSubclass extends KlassFinder.KlassSingleFinderForRelatedClasses
{
public KlassSuperClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "superClass";
}
public DeepRelationshipAttribute copy()
{
return new KlassSuperClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected Klass plainValueOf(Klass _obj)
{
return _obj.getSuperClass();
}
protected KlassList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getSuperClass();
}
}
public static AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses associationEnds()
{
return finder.associationEnds();
}
public static class KlassAssociationEndsFinderSubclass extends AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses
{
public KlassAssociationEndsFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "associationEnds";
}
public DeepRelationshipAttribute copy()
{
return new KlassAssociationEndsFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected AssociationEndList plainValueOf(Klass _obj)
{
return _obj.getAssociationEnds();
}
protected AssociationEndList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getAssociationEnds();
}
}
public static ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses parameterizedProperties()
{
return finder.parameterizedProperties();
}
public static class KlassParameterizedPropertiesFinderSubclass extends ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses
{
public KlassParameterizedPropertiesFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = ParameterizedPropertyFinder.ordinal().ascendingOrderBy();
this._type = SIMPLE_TO_MANY;
this._name = "parameterizedProperties";
}
public DeepRelationshipAttribute copy()
{
return new KlassParameterizedPropertiesFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
{
return ((Klass) _obj).isParameterizedPropertiesModifiedSinceDetachment();
}
protected ParameterizedPropertyList plainValueOf(Klass _obj)
{
return _obj.getParameterizedProperties();
}
protected ParameterizedPropertyList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getParameterizedProperties();
}
}
public static AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses associationEndsResultTypeOf()
{
return finder.associationEndsResultTypeOf();
}
public static class KlassAssociationEndsResultTypeOfFinderSubclass extends AssociationEndFinder.AssociationEndCollectionFinderForRelatedClasses
{
public KlassAssociationEndsResultTypeOfFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "associationEndsResultTypeOf";
}
public DeepRelationshipAttribute copy()
{
return new KlassAssociationEndsResultTypeOfFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected AssociationEndList plainValueOf(Klass _obj)
{
return _obj.getAssociationEndsResultTypeOf();
}
protected AssociationEndList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getAssociationEndsResultTypeOf();
}
}
public static ClassifierFinder.ClassifierSingleFinderForRelatedClasses classifierSuperClass()
{
return finder.classifierSuperClass();
}
public static class KlassClassifierSuperClassFinderSubclass extends ClassifierFinder.ClassifierSingleFinderForRelatedClasses
{
public KlassClassifierSuperClassFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "classifierSuperClass";
}
public DeepRelationshipAttribute copy()
{
return new KlassClassifierSuperClassFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected Classifier plainValueOf(Klass _obj)
{
return _obj.getClassifierSuperClass();
}
protected ClassifierList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getClassifierSuperClass();
}
}
public static KlassFinder.KlassCollectionFinderForRelatedClasses subClasses()
{
return finder.subClasses();
}
public static class KlassSubClassesFinderSubclass extends KlassFinder.KlassCollectionFinderForRelatedClasses
{
public KlassSubClassesFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "subClasses";
}
public DeepRelationshipAttribute copy()
{
return new KlassSubClassesFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected KlassList plainValueOf(Klass _obj)
{
return _obj.getSubClasses();
}
protected KlassList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getSubClasses();
}
}
public static MemberReferencePathFinder.MemberReferencePathCollectionFinderForRelatedClasses memberReferencePaths()
{
return finder.memberReferencePaths();
}
public static class KlassMemberReferencePathsFinderSubclass extends MemberReferencePathFinder.MemberReferencePathCollectionFinderForRelatedClasses
{
public KlassMemberReferencePathsFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "memberReferencePaths";
}
public DeepRelationshipAttribute copy()
{
return new KlassMemberReferencePathsFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected MemberReferencePathList plainValueOf(Klass _obj)
{
return _obj.getMemberReferencePaths();
}
protected MemberReferencePathList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getMemberReferencePaths();
}
}
public static ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses parameterizedPropertiesResultTypeOf()
{
return finder.parameterizedPropertiesResultTypeOf();
}
public static class KlassParameterizedPropertiesResultTypeOfFinderSubclass extends ParameterizedPropertyFinder.ParameterizedPropertyCollectionFinderForRelatedClasses
{
public KlassParameterizedPropertiesResultTypeOfFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "parameterizedPropertiesResultTypeOf";
}
public DeepRelationshipAttribute copy()
{
return new KlassParameterizedPropertiesResultTypeOfFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected ParameterizedPropertyList plainValueOf(Klass _obj)
{
return _obj.getParameterizedPropertiesResultTypeOf();
}
protected ParameterizedPropertyList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getParameterizedPropertiesResultTypeOf();
}
}
public static ServiceGroupFinder.ServiceGroupCollectionFinderForRelatedClasses serviceGroups()
{
return finder.serviceGroups();
}
public static class KlassServiceGroupsFinderSubclass extends ServiceGroupFinder.ServiceGroupCollectionFinderForRelatedClasses
{
public KlassServiceGroupsFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_MANY;
this._name = "serviceGroups";
}
public DeepRelationshipAttribute copy()
{
return new KlassServiceGroupsFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected ServiceGroupList plainValueOf(Klass _obj)
{
return _obj.getServiceGroups();
}
protected ServiceGroupList plainListValueOf(Object _obj)
{
return ((KlassList)_obj).getServiceGroups();
}
}
public static Operation eq(Klass other)
{
return finder.eq(other);
}
public static Operation all()
{
return new All(name());
}
public static KlassSingleFinder getFinderInstance()
{
return finder;
}
public static Attribute[] getPrimaryKeyAttributes()
{
return new Attribute[]
{
name()
}
;
}
public static Attribute[] getImmutableAttributes()
{
return new Attribute[]
{
name()
, name()
}
;
}
public static AsOfAttribute[] getAsOfAttributes()
{
return null;
}
protected static void initializeIndicies(Cache cache)
{
cache.addIndex("0 Index", new Attribute[]
{
superClassName()
}
);
}
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[]
{
ClassifierFinder.getFinderInstance(),KlassFinder.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[]
{
ClassifierFinder.getFinderInstance(),KlassFinder.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.Klass");
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