Difference between revisions of "Persistence code samples"

(INDEPENDENT_BINARY_FORMAT)
Line 28: Line 28:
  
 
set_optimized_for_retrieval(is_optimized_for_retrieval:BOOLEAN)
 
set_optimized_for_retrieval(is_optimized_for_retrieval:BOOLEAN)
    do
+
do
 
optimized_for_retrieval:=is_optimized_for_retrieval
 
optimized_for_retrieval:=is_optimized_for_retrieval
    ensure
+
ensure
 
optimized_for_retrieval_set:optimized_for_retrieval=is_optimized_for_retrieval
 
optimized_for_retrieval_set:optimized_for_retrieval=is_optimized_for_retrieval
    end
+
end
  
 
feature -- Basic operations
 
feature -- Basic operations
Line 43: Line 43:
 
end
 
end
 
</code>
 
</code>
 +
 
==PERSISTENCE_MEDIUM==
 
==PERSISTENCE_MEDIUM==
 
==FILE_MEDIUM==
 
==FILE_MEDIUM==

Revision as of 11:16, 18 August 2007

Here the main classes of the framework are sketched.

You can download the source code here (TODO: provide a link to the sources)

Simplified BON diagram

PERSISTENCE_MANAGER

SERIALIZATION_MANAGER

PERSISTENCE_FORMAT

BINARY_FORMAT

INDEPENDENT_BINARY_FORMAT

indexing
	description: "Objects that represent specific platform independent binary formats"
	author: ""
	date: "$Date$"
	revision: "$Revision$"
 
class
	INDEPENDENT_BINARY_FORMAT
 
inherit
	BINARY_FORMAT
 
feature -- Access
 
	optimized_for_retrieval:BOOLEAN
 
feature -- Status setting
 
	set_optimized_for_retrieval(is_optimized_for_retrieval:BOOLEAN)
	do
		optimized_for_retrieval:=is_optimized_for_retrieval
	ensure
		optimized_for_retrieval_set:optimized_for_retrieval=is_optimized_for_retrieval
	end
 
feature -- Basic operations
 
	store_now(object_to_store:ANY)
	do
		store_handler.independent_store(object_to_store,serializer,optimized_for_retrieval)
	end
 
end

PERSISTENCE_MEDIUM

FILE_MEDIUM