klass.model.meta.domain.PropertyModifierFinder 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 PropertyModifierFinder
{
private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/PropertyModifier";
private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.PropertyModifier";
private static final FinderMethodMap finderMethodMap;
private static boolean isFullCache;
private static boolean isOffHeap;
private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.PropertyModifier");
private static final PropertyModifierSingleFinder finder = new PropertyModifierSingleFinder();
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(PropertyModifierFinder.PropertyModifierRelatedFinder.class);
finderMethodMap.addNormalAttributeName("classifierName");
finderMethodMap.addNormalAttributeName("propertyName");
finderMethodMap.addNormalAttributeName("keyword");
finderMethodMap.addNormalAttributeName("ordinal");
finderMethodMap.addRelationshipName("dataTypeProperty");
}
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 SourceAttributeType getSourceAttributeType()
{
return null;
}
public static PropertyModifier findOne(com.gs.fw.finder.Operation operation)
{
return findOne(operation, false);
}
public static PropertyModifier findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return findOne(operation, true);
}
public static PropertyModifierList findMany(com.gs.fw.finder.Operation operation)
{
return (PropertyModifierList) finder.findMany(operation);
}
public static PropertyModifierList findManyBypassCache(com.gs.fw.finder.Operation operation)
{
return (PropertyModifierList) finder.findManyBypassCache(operation);
}
private static PropertyModifier findOne(com.gs.fw.finder.Operation operation, boolean bypassCache)
{
List found = getMithraObjectPortal().find((Operation) operation, bypassCache);
return (PropertyModifier) FinderUtils.findOne(found);
}
public static PropertyModifier findByPrimaryKey(String classifierName, String propertyName, String keyword)
{
return finder.findByPrimaryKey(classifierName, propertyName, keyword);
}
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;
PropertyModifierData _castedTargetData = (PropertyModifierData) _targetData;
if (_bean.getO1AsString().equals(_castedTargetData.getClassifierName()) && _bean.getO2AsString().equals(_castedTargetData.getPropertyName()) && _bean.getO3AsString().equals(_castedTargetData.getKeyword()))
{
return true;
}
return false;
}
public int computeHashCodeFromRelated(Object _srcObject, Object _srcData)
{
I3O3L3 _bean = (I3O3L3) _srcData;
return HashUtil.combineHashes(HashUtil.combineHashes(HashUtil.hash(_bean.getO1AsString()),HashUtil.hash(_bean.getO2AsString())),HashUtil.hash(_bean.getO3AsString()));
}
public int computeOffHeapHashCodeFromRelated(Object _srcObject, Object _srcData)
{
I3O3L3 _bean = (I3O3L3) _srcData;
return HashUtil.combineHashes(HashUtil.combineHashes(HashUtil.offHeapHash(_bean.getO1AsString()),HashUtil.offHeapHash(_bean.getO2AsString())),HashUtil.offHeapHash(_bean.getO3AsString()));
}
}
public static PropertyModifier zFindOneForRelationship(Operation operation)
{
List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
return (PropertyModifier) 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 PropertyModifierRelatedFinder extends AbstractRelatedFinder
implements ElementFinder
{
private List relationshipFinders;
private List dependentRelationshipFinders;
private StringAttribute classifierName;
private StringAttribute propertyName;
private StringAttribute keyword;
private IntegerAttribute ordinal;
private PropertyModifierDataTypePropertyFinderSubclass dataTypeProperty;
public PropertyModifierRelatedFinder()
{
super();
}
public PropertyModifierRelatedFinder(Mapper mapper)
{
super(mapper);
}
public String getFinderClassName()
{
return "klass.model.meta.domain.PropertyModifierFinder";
}
public RelatedFinder getRelationshipFinderByName(String relationshipName)
{
return PropertyModifierFinder.finderMethodMap.getRelationshipFinderByName(relationshipName, this);
}
public Attribute getAttributeByName(String attributeName)
{
return PropertyModifierFinder.finderMethodMap.getAttributeByName(attributeName, this);
}
public com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
{
return PropertyModifierFinder.finderMethodMap.getAttributeOrRelationshipSelectorFunction(attributeName, this);
}
public Attribute[] getPersistentAttributes()
{
Attribute[] attributes = new Attribute[4];
attributes[0] = this.classifierName();
attributes[1] = this.propertyName();
attributes[2] = this.keyword();
attributes[3] = this.ordinal();
return attributes;
}
public List getRelationshipFinders()
{
if (relationshipFinders == null)
{
List relatedFinders = new ArrayList(1);
relatedFinders.add(this.dataTypeProperty());
relationshipFinders = Collections.unmodifiableList(relatedFinders);
}
return relationshipFinders;
}
public List getDependentRelationshipFinders()
{
if (dependentRelationshipFinders == null)
{
List dependentRelatedFinders = new ArrayList(0);
dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
}
return dependentRelationshipFinders;
}
public PropertyModifier findOne(com.gs.fw.finder.Operation operation)
{
return PropertyModifierFinder.findOne(operation, false);
}
public PropertyModifier findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return PropertyModifierFinder.findOne(operation, true);
}
public MithraList extends PropertyModifier> findMany(com.gs.fw.finder.Operation operation)
{
return new PropertyModifierList((Operation) operation);
}
public MithraList extends PropertyModifier> findManyBypassCache(com.gs.fw.finder.Operation operation)
{
PropertyModifierList result = (PropertyModifierList) this.findMany(operation);
result.setBypassCache(true);
return result;
}
public MithraList extends PropertyModifier> constructEmptyList()
{
return new PropertyModifierList();
}
public int getSerialVersionId()
{
return 653783778;
}
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(PropertyModifierFinder.classifierName(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("dataTypeProperty");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "DataTypeProperty", "propertyModifiers");
this.classifierName = result;
}
return result;
}
public StringAttribute propertyName()
{
StringAttribute result = this.propertyName;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"PROPERTY_NAME\"","","propertyName",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
new MappedStringAttribute(PropertyModifierFinder.propertyName(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("dataTypeProperty");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "DataTypeProperty", "propertyModifiers");
this.propertyName = result;
}
return result;
}
public StringAttribute keyword()
{
StringAttribute result = this.keyword;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"KEYWORD\"","","keyword",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
new MappedStringAttribute(PropertyModifierFinder.keyword(), this.mapper, this.zGetValueSelector());
this.keyword = result;
}
return result;
}
public IntegerAttribute ordinal()
{
IntegerAttribute result = this.ordinal;
if (result == null)
{
result = mapper == null ? SingleColumnIntegerAttribute.generate("\"ORDINAL\"","","ordinal",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,false,-1,-1,-1,false, false) :
new MappedIntegerAttribute(PropertyModifierFinder.ordinal(), this.mapper, this.zGetValueSelector());
this.ordinal = result;
}
return result;
}
public DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses dataTypeProperty()
{
PropertyModifierDataTypePropertyFinderSubclass result = this.dataTypeProperty;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(DataTypePropertyFinder.zGetDataTypePropertyPropertyModifiersMapper());
newMapper.setToMany(false);
result = new PropertyModifierDataTypePropertyFinderSubclass(newMapper , this.zGetValueSelector() );
this.dataTypeProperty = 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 PropertyModifierFinder.getPrimaryKeyAttributes();
}
public VersionAttribute getVersionAttribute()
{
return null;
}
public MithraObjectPortal getMithraObjectPortal()
{
return PropertyModifierFinder.getMithraObjectPortal();
}
}
public static class PropertyModifierCollectionFinder extends PropertyModifierRelatedFinder
{
public PropertyModifierCollectionFinder(Mapper mapper)
{
super(mapper);
}
}
public static abstract class PropertyModifierCollectionFinderForRelatedClasses
extends PropertyModifierCollectionFinder
implements DeepRelationshipAttribute
{
public PropertyModifierCollectionFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
public static class PropertyModifierSingleFinder extends PropertyModifierRelatedFinder
implements ToOneFinder
{
public PropertyModifierSingleFinder(Mapper mapper)
{
super(mapper);
}
public PropertyModifierSingleFinder()
{
super(null);
}
public Operation eq(PropertyModifier other)
{
return this.classifierName().eq(other.getClassifierName())
.and(this.propertyName().eq(other.getPropertyName()))
.and(this.keyword().eq(other.getKeyword()))
;
}
// this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
public PropertyModifier findByPrimaryKey(String classifierName, String propertyName, String keyword)
{
PropertyModifier _result = null;
Operation _op = null;
Object _related = null;
if (classifierName != null && propertyName != null && keyword != null)
{
I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
_bean.setO1(classifierName);
_bean.setO2(propertyName);
_bean.setO3(keyword);
MithraObjectPortal _portal = this.getMithraObjectPortal();
_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
_bean.release();
}
if (!(_related instanceof NulledRelation)) _result = (PropertyModifier) _related;
if (_related == null)
{
_op = this.classifierName().eq(classifierName).and(this.propertyName().eq(propertyName)).and(this.keyword().eq(keyword));
}
if (_op != null)
{
_result = this.findOne(_op);
}
return _result;
}
}
public static abstract class PropertyModifierSingleFinderForRelatedClasses extends PropertyModifierSingleFinder implements DeepRelationshipAttribute
{
public PropertyModifierSingleFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
/** maps to \"PROPERTY_MODIFIER\".\"CLASSIFIER_NAME\" **/
public static StringAttribute classifierName()
{
return finder.classifierName();
}
/** maps to \"PROPERTY_MODIFIER\".\"PROPERTY_NAME\" **/
public static StringAttribute propertyName()
{
return finder.propertyName();
}
/** maps to \"PROPERTY_MODIFIER\".\"KEYWORD\" **/
public static StringAttribute keyword()
{
return finder.keyword();
}
/** maps to \"PROPERTY_MODIFIER\".\"ORDINAL\" **/
public static IntegerAttribute ordinal()
{
return finder.ordinal();
}
public static DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses dataTypeProperty()
{
return finder.dataTypeProperty();
}
public static class PropertyModifierDataTypePropertyFinderSubclass extends DataTypePropertyFinder.DataTypePropertySingleFinderForRelatedClasses
{
public PropertyModifierDataTypePropertyFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "dataTypeProperty";
this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
DataTypePropertyFinder.classifierName(),
DataTypePropertyFinder.name()).withExtractors(
PropertyModifierFinder.classifierName(),
PropertyModifierFinder.propertyName()));
}
public DeepRelationshipAttribute copy()
{
return new PropertyModifierDataTypePropertyFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected DataTypeProperty plainValueOf(PropertyModifier _obj)
{
return _obj.getDataTypeProperty();
}
protected DataTypePropertyList plainListValueOf(Object _obj)
{
return ((PropertyModifierList)_obj).getDataTypeProperties();
}
}
public static Operation eq(PropertyModifier other)
{
return finder.eq(other);
}
public static Operation all()
{
return new All(classifierName());
}
public static PropertyModifierSingleFinder getFinderInstance()
{
return finder;
}
public static Attribute[] getPrimaryKeyAttributes()
{
return new Attribute[]
{
classifierName()
, propertyName()
, keyword()
}
;
}
public static Attribute[] getImmutableAttributes()
{
return new Attribute[]
{
classifierName()
, classifierName()
, propertyName()
, keyword()
}
;
}
public static AsOfAttribute[] getAsOfAttributes()
{
return null;
}
protected static void initializeIndicies(Cache cache)
{
cache.addIndex("0 Index", new Attribute[]
{
classifierName()
, propertyName()
}
);
}
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.PropertyModifier");
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