klass.model.meta.domain.UrlFinder 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 UrlFinder
{
private static final String IMPL_CLASS_NAME_WITH_SLASHES = "klass/model/meta/domain/Url";
private static final String BUSINESS_CLASS_NAME_WITH_DOTS = "klass.model.meta.domain.Url";
private static final FinderMethodMap finderMethodMap;
private static boolean isFullCache;
private static boolean isOffHeap;
private static volatile MithraObjectPortal objectPortal = new UninitializedPortal("klass.model.meta.domain.Url");
private static final UrlSingleFinder finder = new UrlSingleFinder();
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(UrlFinder.UrlRelatedFinder.class);
finderMethodMap.addNormalAttributeName("serviceGroupName");
finderMethodMap.addNormalAttributeName("url");
finderMethodMap.addNormalAttributeName("ordinal");
finderMethodMap.addRelationshipName("parameters");
finderMethodMap.addRelationshipName("services");
finderMethodMap.addRelationshipName("serviceGroup");
}
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] = UrlFinder.serviceGroupName().constructEqualityMapper(UrlParameterFinder.serviceGroupName());
result[1] = UrlParameterFinder.serviceGroupName().constructEqualityMapper(UrlFinder.serviceGroupName());
result[2] = UrlFinder.url().constructEqualityMapper(UrlParameterFinder.urlString());
result[3] = UrlParameterFinder.urlString().constructEqualityMapper(UrlFinder.url());
result[4] = UrlFinder.serviceGroupName().constructEqualityMapper(ServiceFinder.serviceGroupName());
result[5] = ServiceFinder.serviceGroupName().constructEqualityMapper(UrlFinder.serviceGroupName());
result[6] = UrlFinder.url().constructEqualityMapper(ServiceFinder.urlString());
result[7] = ServiceFinder.urlString().constructEqualityMapper(UrlFinder.url());
constantJoinPool = result;
}
return constantJoinPool;
}
public static SourceAttributeType getSourceAttributeType()
{
return null;
}
public static Url findOne(com.gs.fw.finder.Operation operation)
{
return findOne(operation, false);
}
public static Url findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return findOne(operation, true);
}
public static UrlList findMany(com.gs.fw.finder.Operation operation)
{
return (UrlList) finder.findMany(operation);
}
public static UrlList findManyBypassCache(com.gs.fw.finder.Operation operation)
{
return (UrlList) finder.findManyBypassCache(operation);
}
private static Url findOne(com.gs.fw.finder.Operation operation, boolean bypassCache)
{
List found = getMithraObjectPortal().find((Operation) operation, bypassCache);
return (Url) FinderUtils.findOne(found);
}
public static Url findByPrimaryKey(String serviceGroupName, String url)
{
return finder.findByPrimaryKey(serviceGroupName, url);
}
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;
UrlData _castedTargetData = (UrlData) _targetData;
if (_bean.getO1AsString().equals(_castedTargetData.getServiceGroupName()) && _bean.getO2AsString().equals(_castedTargetData.getUrl()))
{
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 Url zFindOneForRelationship(Operation operation)
{
List found = getMithraObjectPortal().findAsCachedQuery(operation, null, false, true, 0).getResult();
return (Url) 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 UrlRelatedFinder extends AbstractRelatedFinder
implements ElementFinder
{
private List relationshipFinders;
private List dependentRelationshipFinders;
private StringAttribute serviceGroupName;
private StringAttribute url;
private IntegerAttribute ordinal;
private UrlParametersFinderSubclass parameters;
private UrlServicesFinderSubclass services;
private UrlServiceGroupFinderSubclass serviceGroup;
public UrlRelatedFinder()
{
super();
}
public UrlRelatedFinder(Mapper mapper)
{
super(mapper);
}
public String getFinderClassName()
{
return "klass.model.meta.domain.UrlFinder";
}
public RelatedFinder getRelationshipFinderByName(String relationshipName)
{
return UrlFinder.finderMethodMap.getRelationshipFinderByName(relationshipName, this);
}
public Attribute getAttributeByName(String attributeName)
{
return UrlFinder.finderMethodMap.getAttributeByName(attributeName, this);
}
public com.gs.fw.common.mithra.extractor.Function getAttributeOrRelationshipSelector(String attributeName)
{
return UrlFinder.finderMethodMap.getAttributeOrRelationshipSelectorFunction(attributeName, this);
}
public Attribute[] getPersistentAttributes()
{
Attribute[] attributes = new Attribute[3];
attributes[0] = this.serviceGroupName();
attributes[1] = this.url();
attributes[2] = this.ordinal();
return attributes;
}
public List getRelationshipFinders()
{
if (relationshipFinders == null)
{
List relatedFinders = new ArrayList(3);
relatedFinders.add(this.parameters());
relatedFinders.add(this.services());
relatedFinders.add(this.serviceGroup());
relationshipFinders = Collections.unmodifiableList(relatedFinders);
}
return relationshipFinders;
}
public List getDependentRelationshipFinders()
{
if (dependentRelationshipFinders == null)
{
List dependentRelatedFinders = new ArrayList(2);
dependentRelatedFinders.add(this.parameters());
dependentRelatedFinders.add(this.services());
dependentRelationshipFinders = Collections.unmodifiableList(dependentRelatedFinders);
}
return dependentRelationshipFinders;
}
public Url findOne(com.gs.fw.finder.Operation operation)
{
return UrlFinder.findOne(operation, false);
}
public Url findOneBypassCache(com.gs.fw.finder.Operation operation)
{
return UrlFinder.findOne(operation, true);
}
public MithraList extends Url> findMany(com.gs.fw.finder.Operation operation)
{
return new UrlList((Operation) operation);
}
public MithraList extends Url> findManyBypassCache(com.gs.fw.finder.Operation operation)
{
UrlList result = (UrlList) this.findMany(operation);
result.setBypassCache(true);
return result;
}
public MithraList extends Url> constructEmptyList()
{
return new UrlList();
}
public int getSerialVersionId()
{
return -1685380937;
}
public boolean isPure()
{
return false;
}
public boolean isTemporary()
{
return false;
}
public int getHierarchyDepth()
{
return 0;
}
public StringAttribute serviceGroupName()
{
StringAttribute result = this.serviceGroupName;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"SERVICE_GROUP_NAME\"","","serviceGroupName",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,256,false, false) :
new MappedStringAttribute(UrlFinder.serviceGroupName(), this.mapper, this.zGetValueSelector());
result.zSetOwningRelationship("serviceGroup");
result.zSetOwningReverseRelationship("klass.model.meta.domain", "ServiceGroup", "urls");
this.serviceGroupName = result;
}
return result;
}
public StringAttribute url()
{
StringAttribute result = this.url;
if (result == null)
{
result = mapper == null ? SingleColumnStringAttribute.generate("\"URL\"","","url",BUSINESS_CLASS_NAME_WITH_DOTS,IMPL_CLASS_NAME_WITH_SLASHES,false,false,this,null,true,false,-1,-1,-1,8192,false, false) :
new MappedStringAttribute(UrlFinder.url(), this.mapper, this.zGetValueSelector());
this.url = 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(UrlFinder.ordinal(), this.mapper, this.zGetValueSelector());
this.ordinal = result;
}
return result;
}
public UrlParameterFinder.UrlParameterCollectionFinderForRelatedClasses parameters()
{
UrlParametersFinderSubclass result = this.parameters;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(UrlFinder.zGetUrlParametersReverseMapper());
newMapper.setToMany(true);
result = new UrlParametersFinderSubclass(newMapper , this.zGetValueSelector() );
this.parameters = result;
}
return result;
}
public ServiceFinder.ServiceCollectionFinderForRelatedClasses services()
{
UrlServicesFinderSubclass result = this.services;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(UrlFinder.zGetUrlServicesReverseMapper());
newMapper.setToMany(true);
result = new UrlServicesFinderSubclass(newMapper , this.zGetValueSelector() );
this.services = result;
}
return result;
}
public ServiceGroupFinder.ServiceGroupSingleFinderForRelatedClasses serviceGroup()
{
UrlServiceGroupFinderSubclass result = this.serviceGroup;
if (result == null)
{
Mapper newMapper = combineWithMapperIfExists(ServiceGroupFinder.zGetServiceGroupUrlsMapper());
newMapper.setToMany(false);
result = new UrlServiceGroupFinderSubclass(newMapper , this.zGetValueSelector() );
this.serviceGroup = 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 UrlFinder.getPrimaryKeyAttributes();
}
public VersionAttribute getVersionAttribute()
{
return null;
}
public MithraObjectPortal getMithraObjectPortal()
{
return UrlFinder.getMithraObjectPortal();
}
}
public static class UrlCollectionFinder extends UrlRelatedFinder
{
public UrlCollectionFinder(Mapper mapper)
{
super(mapper);
}
}
public static abstract class UrlCollectionFinderForRelatedClasses
extends UrlCollectionFinder
implements DeepRelationshipAttribute
{
public UrlCollectionFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
public static class UrlSingleFinder extends UrlRelatedFinder
implements ToOneFinder
{
public UrlSingleFinder(Mapper mapper)
{
super(mapper);
}
public UrlSingleFinder()
{
super(null);
}
public Operation eq(Url other)
{
return this.serviceGroupName().eq(other.getServiceGroupName())
.and(this.url().eq(other.getUrl()))
;
}
// this implementation uses private API. Do NOT copy to application code. Application code must use normal operations for lookups.
public Url findByPrimaryKey(String serviceGroupName, String url)
{
Url _result = null;
Operation _op = null;
Object _related = null;
if (serviceGroupName != null && url != null)
{
I3O3L3 _bean = I3O3L3.POOL.getOrConstruct();
_bean.setO1(serviceGroupName);
_bean.setO2(url);
MithraObjectPortal _portal = this.getMithraObjectPortal();
_related = _portal.getAsOneFromCacheForFind(_bean, _bean, forPrimaryKey, null, null);
_bean.release();
}
if (!(_related instanceof NulledRelation)) _result = (Url) _related;
if (_related == null)
{
_op = this.serviceGroupName().eq(serviceGroupName).and(this.url().eq(url));
}
if (_op != null)
{
_result = this.findOne(_op);
}
return _result;
}
}
public static abstract class UrlSingleFinderForRelatedClasses extends UrlSingleFinder implements DeepRelationshipAttribute
{
public UrlSingleFinderForRelatedClasses(Mapper mapper)
{
super(mapper);
}
protected NormalAndListValueSelector zGetValueSelector()
{
return this;
}
}
private static Mapper parametersReverseMapper = null;
public static Mapper zGetUrlParametersReverseMapper()
{
if (parametersReverseMapper == null)
{
parametersReverseMapper = zConstructUrlParametersReverseMapper();
}
return parametersReverseMapper;
}
private static Mapper parametersMapper = null;
public static Mapper zGetUrlParametersMapper()
{
if (parametersMapper == null)
{
parametersMapper = zConstructUrlParametersMapper();
}
return parametersMapper;
}
private static Mapper parametersPureReverseMapper = null;
public static Mapper zGetUrlParametersPureReverseMapper()
{
if (parametersPureReverseMapper == null)
{
parametersPureReverseMapper = zConstructUrlParametersPureReverseMapper();
}
return parametersPureReverseMapper;
}
private static Mapper zConstructUrlParametersPureReverseMapper()
{
InternalList parametersMapperMapperList = new InternalList(2);
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(0));
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(2));
Mapper parametersMapper = new MultiEqualityMapper(parametersMapperMapperList);
parametersMapper.setName("parameters");
return parametersMapper;
}
private static Mapper zConstructUrlParametersReverseMapper()
{
InternalList parametersMapperMapperList = new InternalList(2);
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(0));
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(2));
Mapper parametersMapper = new MultiEqualityMapper(parametersMapperMapperList);
parametersMapper.setName("parameters");
return parametersMapper;
}
private static Mapper zConstructUrlParametersMapper()
{
InternalList parametersMapperMapperList = new InternalList(2);
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(1));
parametersMapperMapperList.add(UrlFinder.zGetConstantJoin(3));
Mapper parametersMapper = new MultiEqualityMapper(parametersMapperMapperList);
parametersMapper.setName("url");
return parametersMapper;
}
private static Mapper servicesReverseMapper = null;
public static Mapper zGetUrlServicesReverseMapper()
{
if (servicesReverseMapper == null)
{
servicesReverseMapper = zConstructUrlServicesReverseMapper();
}
return servicesReverseMapper;
}
private static Mapper servicesMapper = null;
public static Mapper zGetUrlServicesMapper()
{
if (servicesMapper == null)
{
servicesMapper = zConstructUrlServicesMapper();
}
return servicesMapper;
}
private static Mapper servicesPureReverseMapper = null;
public static Mapper zGetUrlServicesPureReverseMapper()
{
if (servicesPureReverseMapper == null)
{
servicesPureReverseMapper = zConstructUrlServicesPureReverseMapper();
}
return servicesPureReverseMapper;
}
private static Mapper zConstructUrlServicesPureReverseMapper()
{
InternalList servicesMapperMapperList = new InternalList(2);
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(4));
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(6));
Mapper servicesMapper = new MultiEqualityMapper(servicesMapperMapperList);
servicesMapper.setName("services");
return servicesMapper;
}
private static Mapper zConstructUrlServicesReverseMapper()
{
InternalList servicesMapperMapperList = new InternalList(2);
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(4));
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(6));
Mapper servicesMapper = new MultiEqualityMapper(servicesMapperMapperList);
servicesMapper.setName("services");
return servicesMapper;
}
private static Mapper zConstructUrlServicesMapper()
{
InternalList servicesMapperMapperList = new InternalList(2);
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(5));
servicesMapperMapperList.add(UrlFinder.zGetConstantJoin(7));
Mapper servicesMapper = new MultiEqualityMapper(servicesMapperMapperList);
servicesMapper.setName("url");
return servicesMapper;
}
/** maps to \"URL\".\"SERVICE_GROUP_NAME\" **/
public static StringAttribute serviceGroupName()
{
return finder.serviceGroupName();
}
/** maps to \"URL\".\"URL\" **/
public static StringAttribute url()
{
return finder.url();
}
/** maps to \"URL\".\"ORDINAL\" **/
public static IntegerAttribute ordinal()
{
return finder.ordinal();
}
public static UrlParameterFinder.UrlParameterCollectionFinderForRelatedClasses parameters()
{
return finder.parameters();
}
public static class UrlParametersFinderSubclass extends UrlParameterFinder.UrlParameterCollectionFinderForRelatedClasses
{
public UrlParametersFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = UrlParameterFinder.ordinal().ascendingOrderBy();
this._type = SIMPLE_TO_MANY;
this._name = "parameters";
this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
UrlParameterFinder.serviceGroupName(),
UrlParameterFinder.urlString()).withExtractors(
UrlFinder.serviceGroupName(),
UrlFinder.url()));
}
public DeepRelationshipAttribute copy()
{
return new UrlParametersFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
{
return ((Url) _obj).isParametersModifiedSinceDetachment();
}
protected UrlParameterList plainValueOf(Url _obj)
{
return _obj.getParameters();
}
protected UrlParameterList plainListValueOf(Object _obj)
{
return ((UrlList)_obj).getParameters();
}
}
public static ServiceFinder.ServiceCollectionFinderForRelatedClasses services()
{
return finder.services();
}
public static class UrlServicesFinderSubclass extends ServiceFinder.ServiceCollectionFinderForRelatedClasses
{
public UrlServicesFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = ServiceFinder.ordinal().ascendingOrderBy();
this._type = SIMPLE_TO_MANY;
this._name = "services";
this.zSetRelationshipMultiExtractor(RelationshipMultiExtractor.withLeftAttributes(
ServiceFinder.serviceGroupName(),
ServiceFinder.urlString()).withExtractors(
UrlFinder.serviceGroupName(),
UrlFinder.url()));
}
public DeepRelationshipAttribute copy()
{
return new UrlServicesFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
public boolean isModifiedSinceDetachment(MithraTransactionalObject _obj)
{
return ((Url) _obj).isServicesModifiedSinceDetachment();
}
protected ServiceList plainValueOf(Url _obj)
{
return _obj.getServices();
}
protected ServiceList plainListValueOf(Object _obj)
{
return ((UrlList)_obj).getServices();
}
}
public static ServiceGroupFinder.ServiceGroupSingleFinderForRelatedClasses serviceGroup()
{
return finder.serviceGroup();
}
public static class UrlServiceGroupFinderSubclass extends ServiceGroupFinder.ServiceGroupSingleFinderForRelatedClasses
{
public UrlServiceGroupFinderSubclass(Mapper mapper, NormalAndListValueSelector parentSelector )
{
super(mapper);
this._parentSelector = (AbstractRelatedFinder) parentSelector;
this._orderBy = null;
this._type = SIMPLE_TO_ONE;
this._name = "serviceGroup";
}
public DeepRelationshipAttribute copy()
{
return new UrlServiceGroupFinderSubclass(zGetMapper(), (NormalAndListValueSelector) this._parentSelector
);
}
protected ServiceGroup plainValueOf(Url _obj)
{
return _obj.getServiceGroup();
}
protected ServiceGroupList plainListValueOf(Object _obj)
{
return ((UrlList)_obj).getServiceGroups();
}
}
public static Operation eq(Url other)
{
return finder.eq(other);
}
public static Operation all()
{
return new All(serviceGroupName());
}
public static UrlSingleFinder getFinderInstance()
{
return finder;
}
public static Attribute[] getPrimaryKeyAttributes()
{
return new Attribute[]
{
serviceGroupName()
, url()
}
;
}
public static Attribute[] getImmutableAttributes()
{
return new Attribute[]
{
serviceGroupName()
, serviceGroupName()
, url()
}
;
}
public static AsOfAttribute[] getAsOfAttributes()
{
return null;
}
protected static void initializeIndicies(Cache cache)
{
cache.addIndex("0 Index", new Attribute[]
{
serviceGroupName()
}
);
}
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[]
{
ServiceGroupFinder.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[]
{
ServiceGroupFinder.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.Url");
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