Skip to main content

Posts

Showing posts with the label Data Objetcs

Java Data Objetcs

The Java community needs a standard way to store Java objects persistently in transactional data stores. Furthermore, it needs a standard way to treat relational database data as Java objects, and a standard way to define transactional semantics associated with those objects.  The Java Data Objects (JDO) specification provides for interface-based definitions of data stores and transactions; and selection and transformation of persistent storage data into native Java programming language objects. JDO is designed to work on all Java platforms. All Java platforms - desktop, server, personal, embedded, and card - can use this API to access data. Existing specifications for persistence include JDBC, SQLJ, and java.util.Serializable. The JDBC and SQLJ mechanisms provide for query, transactions, and large capacity storage, but require that users learn another language (SQL). JDO allows users to specify their application program logic, including queries, entirely in Java, and ex...

What Is Immutable Object?

Immutable object: Immutable objects whose state (i.e. the object's data) does not change once it is instantiated (i.e. it becomes a read-only object after instantiation). Immutable classes are ideal for representing numbers (e.g. java.lang.Integer, java.lang.Float, java.lang.BigDecimal etc are immutable objects), enumeratedtypes, colors (e.g. java.awt.Color is an immutable object), short lived objects like events, messages etc. Benefits of immutable objects • Immutable classes can greatly simplify programming by freely allowing you to cache and share the references to the immutable objects without having to defensively copy them or without having to worry about their values becoming stale or corrupted.