TAILIEUCHUNG - Apress bắt đầu ứng dụng với java google - p 17

Key: Một giá trị bao gồm các phím của bất kỳ nhóm phụ huynh thực thể đang được sử dụng và chuỗi một ID ứng dụng tạo ra hoặc một ID systemgenerated số. 4. Chính là mã hóa String: Về cơ bản, một khoá mã hoá để đảm bảo tính di động và vẫn cho phép ứng dụng của bạn để tận dụng lợi thế của các nhóm thực thể của Bigtable. | CHAPTER 7 USING THE APP ENGINE DATASTORE 3. Key A value that includes the key of any entity-group parent that is being used and an application-generated string ID or a systemgenerated numeric ID. 4. Key as Encoded String Essentially an encoded key to ensure portability and still allow your application to take advantage of Bigtable s entity groups. If you want to implement your own key system you simply use the createKey static method of the KeyFactory class. You pass the method the kind and either an application-assigned string or a system-assigned number and the method returns the appropriate Key instance. So to create a key for an Order entity with the key name jeff@ you would use Key key jeff@ Note If your implementation inadvertently creates a duplicate key for your entity this new entity will overwrite the existing entity in the datastore. Listing 7-1 is an example JDO class with an automatically generated Long ID provided by Bigtable with both persisted and non-persisted fields. The phone member is only available within the scope of the object and is not persisted to the database. Entities created from a database call will contain a null value for the phone member. Listing 7-1. Sample JDO POJO import import import import import import Declares the class as capable of being stored and retrieved with JDO @PersistenceCapable identityType public class Contact Required primary key populated automatically by JDO @PrimaryKey 138 CHAPTER 7 USING THE APP ENGINE DATASTORE @Persistent valuestrategy private Long id @Persistent private String name Field NOT persisted to the datastore @NotPersistent private String phone public Contact .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.