freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計算機(jī)專業(yè)外文資料翻譯--對象持久化和java-深入的了解面向?qū)ο笳Z言中的對象持久的討論-文庫吧

2025-04-16 17:48 本頁面


【正文】 less of the order in which their interfaces appear. The processes of transforming an object layout to this mon format are collectively known as canonicalization of object representation. In piled languages with static typing (not Java) objects written in the same language, but piled under different systems, should be identically represented in persistent storage. An extension of canonicalization addresses languageindependent object representation. If objects can be represented in a languageindependent fashion, it will be possible for different representations of the same object to share the same persistent storage. One mechanism to acplish this task is to introduce an additional level of indirection through an interface definition language (IDL). Object database interfaces can be made through the IDL and the corresponding data structures. The downside of IDL style bindings is two fold: First, the extra level of indirection always requires an additional level of translation, which impacts the overall performance of the system。 second, it limits use of database services that are unique to particular vendors and that might be valuable to application developers. 3 A similar mechanism is to support object services through an extension of the SQL. Relational database vendors and smaller object/relational vendors are proponents of this approach。 however, how successful these panies will be in shaping the framework for object storage remains to be seen. But the question remains: Is object persistence part of the object39。s behavior or is it an external service offered to objects via separate interfaces? How about collections of objects and methods for querying them? Relational, extended relational, and object/relational approaches tend to advocate a separation between language, while object databases and the Java language itself see persistence as intrinsic to the language: Native Java persistence via serialization Object serialization is the Java languagespecific mechanism for the storage and retrieval of Java objects and primitives to streams. It is worthy to note that although mercial thirdparty libraries for serializing C++ objects have been around for some time, C++ has never offered a native mechanism for object serialization. Here39。s how to use Java39。s serialization: // Writing foo to a stream (for example, a file) // Step 1. Create an output stream // that is, create bucket to receive the bytes FileOutputStream out = new FileOutputStream(fooFile)。 // Step 2. Create ObjectOutputStream // that is, create a hose and put its head in the bucket ObjectOutputStream os = new ObjectOutputStream(out) // Step 3. Write a string and an object to the stream // that is, let the stream flow into the bucket (foo)。 (new Foo())。 // Step 4. Flush the data to its destination ()。 The Writeobject method serializes foo and its transitive closure that is, all objects that can be referenced from foo within the graph. Within the stream only one copy of the serialized object exists. Other references to the objects are stored as object handles to save space and avoid circular references. The serialized object starts with the class followed by the fields of each class in the inheritance hierarchy. // Reading an object from a stream // Step 1. Create an input stream FileInputStream in = new FileInputStream(fooFile)。 // Step 2. Create an object input stream 4 ObjectInputStream ins = new ObjectInputStream(in)。 // Step 3. Got to know what you are reading String fooString = (String)()。 Foo foo = (Foo)()。 Object serialization and security By default, serialization writes and reads nonstatic and nontransient fields from the stream. This characteristic can be used as a security mechanism by declaring fields that may not be serialized as private transient. If a class may not be serialized at all, writeObject and readObject methods should be implemented to throw NoAccessException. Persistence with transactional integrity: Introducing JDBC Modeled after X/Open39。s SQL CLI (Client Level Interface) and Microsoft39。s ODBC abstractions, Java database connectivity (JDBC) aims to provide a database connectivity mechanism that is independent of the underlying database management system (DBMS).To bee JDBCpliant, drivers need to support at least the ANSI SQL2 entrylevel API, which gives thirdparty tool vendors and applications enough flexibility for database access. JDBC is designed to be consistent
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1