//File: CosPersistenceDS_CLI.idl
//Part of the Persistence Service

#ifndef _COS_PERSISTENCE_DS_CLI_IDL_
#define _COS_PERSISTENCE_DS_CLI_IDL_

#include <CosPersistenceDDO.idl>

#pragma prefix "omg.org"

module CosPersistenceDS_CLI {
	interface UserEnvironment {
		void set_option (in long option,in any value);
		void get_option (in long option,out any value);
		void release();
	};

	interface Connection {
		void set_option (in long option,in any value);
		void get_option (in long option,out any value);
	};

	interface ConnectionFactory {
		Connection create_object (
			in UserEnvironment user_envir);
	};

	interface Cursor { 
		void set_position (in long position,in any value);
		CosPersistenceDDO::DDO fetch_object();
	};

	interface CursorFactory {
		Cursor create_object (
			in Connection a_connection);
	};

 	interface PID_CLI : CosPersistencePID::PID {
		attribute string datastore_id;
		attribute string id;
	};

	interface Datastore_CLI {
		void connect (in Connection a_connection,
			in string datastore_id,
			in string user_name,
			in string authentication);
		void disconnect (in Connection a_connection);
		Connection get_connection (
			in string datastore_id,
			in string user_name);
		void add_object (in Connection a_connection,
			in CosPersistenceDDO::DDO data_obj);
		void delete_object (
			in Connection a_connection,
			in CosPersistenceDDO::DDO data_obj);
		void update_object (
			in Connection a_connection,
			in CosPersistenceDDO::DDO data_obj);
		void retrieve_object(
			in Connection a_connection,
			in CosPersistenceDDO::DDO data_obj);
		Cursor select_object(
			in Connection a_connection,
			in string key);
		void transact (in UserEnvironment user_envir,
			in short completion_type);
		void assign_PID (in PID_CLI p);
		void assign_PID_relative (
			in PID_CLI source_pid,
			in PID_CLI target_pid);
		boolean is_identical_PID (
			in PID_CLI pid_1,
			in PID_CLI pid_2);
		string get_object_type (in PID_CLI p);
		void register_mapping_schema (in string schema_file); 
		Cursor execute (in Connection a_connection,
			in string command); 
	};

};
#endif /* ifndef _COS_PERSISTENCE_DS_CLI_IDL_ */
