//
//   COMPONENT_NAME: omf.prod.core - somap (somAttriubutePersistence)
//
//   ORIGINS: 27
//
//
//    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1995,1996 
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//

//  @(#) 1.9 src/somos/core/somap/somap.idl, somos, som3.0 9/6/96 13:56:19 [12/22/96 21:48:10]

//  Description
//  -----------
//  This IDL describes the interfaces that allow object attributes to be
//  kept persistently across activations of the object. This differs from
//  the POSSOM persistence model as this one is based on storing
//  attribute values persistently as they are updated, and only reading
//  them in from persistent store when they are needed.
//
//


#ifndef SOM_somap_idl
#define SOM_somap_idl

#include <somos.idl>
#include <somtdm.idl>


module somAttributePersistence {

    //#--------------------------------------------------------------
    //# Forward declaration of interfaces
    //#--------------------------------------------------------------

    interface Persist;



    //#--------------------------------------------------------------
    //# Persist - this interface provides clients with the operations
    //# needed to load and store attribute data. It inherits from
    //# somOS::ServiceBasePRef which ensures that object references
    //# built by the somOS::Server for these objects will be
    //# persistent.
    //#--------------------------------------------------------------

    interface Persist : TypecodeDataManipulator,
                        somOS::ServiceBasePRef
    {

        //#--------------------------------------------------
        //# Operation definitions
        //#--------------------------------------------------

        void    load_attribute (in string attribute_name,
                                out void *buffer, in TypeCode attribute_tc);

        void    store_attribute (in string attribute_name,
                                 in void *buffer, in TypeCode attribute_tc);


        #ifdef __SOMIDL__
        //#--------------------------------------------------
        //# Implementation Section
        //#--------------------------------------------------
        implementation {
               releaseorder: load_attribute,
                             store_attribute;

               majorversion = 3;
               minorversion = 0;

               dllname = "somos.dll";

               init_for_object_creation:      override;
               init_for_object_reactivation:  override;
               init_for_object_copy:          override;
               reinit:                        override;
               capture:                       override;
               uninit_for_object_move:        override;
               uninit_for_object_passivation: override;
               uninit_for_object_destruction: override;
               somDefaultInit:                override, init;
               somDestruct:                   override;



        };
        #endif //# __SOMIDL__

    }; //# end Persist interface 



}; //# end somAttributePersistence module 

#endif  //# SOM_somap_idl


