Java Code Examples for com.gs.fw.common.mithra.finder.RelatedFinder#getSerialVersionId()

The following examples show how to use com.gs.fw.common.mithra.finder.RelatedFinder#getSerialVersionId() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MithraConfigurationManager.java    From reladomo with Apache License 2.0 4 votes vote down vote up
public synchronized MithraObjectPortal initializeObject(List<String> mithraInitializationErrors)
{
    RelatedFinder relatedFinder = getRelatedFinder(className, mithraInitializationErrors);
    if (relatedFinder != null)
    {
        if (initialized)
        {
            return relatedFinder.getMithraObjectPortal();
        }
        if (remoteSerialId != relatedFinder.getSerialVersionId())
        {
            mithraInitializationErrors.add("serial version between server and client does not match for class " + className
                    +" server version: " + remoteSerialId + " local version: " + relatedFinder.getSerialVersionId());
        }
        else
        {
            MithraObjectDeserializer deserializer = null;
            if (isPure)
            {
                deserializer = instantiateDeserializer(className, mithraInitializationErrors);
                MithraPureObjectFactory factory = (MithraPureObjectFactory) deserializer;
                factory.setFactoryParameter(factoryParameter);
            }
            else
            {
                MithraDatabaseObject databaseObject = instantiateDatabaseObject(className, mithraInitializationErrors);
                deserializer = (MithraObjectDeserializer) databaseObject;
            }
            if (fullCache)
            {
                deserializer.instantiateFullCache(this);
            }
            else
            {
                deserializer.instantiatePartialCache(this);
            }
            MithraObjectPortal portal = relatedFinder.getMithraObjectPortal();
            addToExportedConfigs(relatedFinder, MithraConfigurationManager.this);
            initialized = true;
            if (postInitializeHook != null)
            {
                postInitializeHook.callbackAfterInitialize(this.className, portal, mithraInitializationErrors, true);
            }
            return portal;
        }
    }
    return null;
}
 
Example 2
Source File: MithraConfigurationManager.java    From reladomo with Apache License 2.0 4 votes vote down vote up
public synchronized MithraObjectPortal initializeObject(List<String> mithraInitializationErrors)
{
    RelatedFinder relatedFinder = getRelatedFinder(className, mithraInitializationErrors);
    if (relatedFinder != null)
    {
        if (initialized)
        {
            return relatedFinder.getMithraObjectPortal();
        }
        if (remoteSerialId != relatedFinder.getSerialVersionId())
        {
            mithraInitializationErrors.add("serial version between server and client does not match for class " + className
                    +" server version: " + remoteSerialId + " local version: " + relatedFinder.getSerialVersionId());
        }
        else
        {
            MithraObjectDeserializer deserializer = null;
            if (isPure)
            {
                deserializer = instantiateDeserializer(className, mithraInitializationErrors);
                MithraPureObjectFactory factory = (MithraPureObjectFactory) deserializer;
                factory.setFactoryParameter(factoryParameter);
            }
            else
            {
                MithraDatabaseObject databaseObject = instantiateDatabaseObject(className, mithraInitializationErrors);
                deserializer = (MithraObjectDeserializer) databaseObject;
            }
            deserializer.instantiateFullCache(this);
            MithraObjectPortal portal = relatedFinder.getMithraObjectPortal();
            addToExportedConfigs(relatedFinder, MithraConfigurationManager.this);
            initialized = true;
            if (postInitializeHook != null)
            {
                postInitializeHook.callbackAfterInitialize(this.className, portal, mithraInitializationErrors, true);
            }
            return portal;
        }
    }
    return null;
}