Thursday, January 30, 2014



Which Persistence Specification ?

http://db.apache.org/jdo/jdo_v_jpa.html

There are several competing persistence technologies available for Java. Two of these are "standardised" (via the JCP). When developing your application you need to choose the most appropriate technology for your needs. Java Data Objects (JDO) has been a standard since 2001 with the release of JDO1. It was improved with the release of JDO2. Just to confuse issues the Java Persistence API (JPA) was approved in its JPA1 form, and JDO2.1/JDO2.2 provide updates to JDO2 building on some of the new features of JPA1. Since then we have had JDO3 adding on extra metadata and enhancer standardisation, JPA2 providing criteria queries and JPA2.1 adding some further features. Below we show some of the differences of these 2 standards to give you assistance in selecting what you need. Highlighted in bold are the notable differences where one specification provides something not available in the other.
FeatureJDOJPA
JDK Requirement1.3+1.5+
UsageJ2EE, J2SEJ2EE, J2SE
Persistence specification mechanismXML, Annotations, APIXML, Annotations
Datastore supportedAnyRDBMS only
Restrictions on persisted classesno-arg constructor (could be added by compiler/enhancer)No final classes. No final methods. Non-private no-arg constructor. Identity Field. Version Field.
Ability to persist "transient" fieldsYesNo
Persist static/final fieldsNoNot specified
TransactionsPessimistic, OptimisticOptimistic, some locking
Object Identitydatastore-identity, application-identityapplication-identity
Object Identity generationSequence, Table, Identity, Auto, UUID String, UUID HexSequence, Table, Identity, Auto
Change objects identityThrow exception when not allowedUndefined !!
Supported typesJava primitive types, wrappers of primitive types, java.lang.String, java.lang.Number, java.math.BigInteger, java.math.BigDecimal, java.util.Currency, java.util.Locale, java.util.Date, java.sql.Time, java.sql.Date, java.sql.Timestamp, java.io.Serializable, boolean[], byte[], char[], double[], float[], int[], long[], short[]java.lang.ObjectinterfaceBoolean[], Byte[], Character[], Double[], Float[], Integer[], Long[], Short[], BigDecimal[], BigInteger[], String[],PersistenceCapable[]interface[]Object[], Enums, java.util.Collection, java.util.Set, java.util.List, java.util.Map,Collection/List/Map of simple typesCollection/List/Map of reference (interface/Object) types, Collection/List/Map of persistable typesJava primitive types, wrappers of the primitive types, java.lang.String, java.math.BigInteger, java.math.BigDecimal, java.util.Date, java.util.Calendar, java.sql.Date, java.sql.Time, java.sql.Timestamp, java.io.Serializable, byte[], Byte[], char[], Character[], Enums, java.util.Collection, java.util.Set, java.util.List, java.util.Map Collection/List/Map of persistable types
Embedded FieldsEmbedded persistent objects, Embedded Collections, Embedded MapsEmbedded persistent objects
Access a non-detached fieldThrow exceptionUndefined !!
InheritanceEach class has its own strategyRoot class defines the strategy
Operation cascade defaultpersist, (delete)
Operation Cascade configurationdeletepersist, delete, refresh
Query LanguageJDOQL, SQL, othersJPQL, SQL
Query candidatesCandidate without subclasses, Candidate and its subclassesCandidate and its subclasses
Query of candidate collectionyesno
Query language case sensitivityJDOQL lowercase/UPPERCASEJPQL case-insensitive
Query language aliasesNo, but has variables in JDOQLYes in JPQL
Query Criteria APINo, available as extension in QueryDSLYes
Object retrieval controlLazy/Eager control, fetch groupsLazy/Eager control, entity graphs
Bulk update/deleteJDOQL Bulk DeleteJPQL Bulk Delete, JPQL Bulk Update
RDBMS Schema ControlTables, columns, PK columns, PK constraints, FK columns, FK constraintsindex columnsindex constraints, unique key columns, unique key constraintsTables, columns, PK columns, FK columns, unique key columns
ORM RelationshipsFull range of Collection, Map, List, Array, 1-1, 1-N, M-N using PC, Non-PC and interface objectsBasic 1-1, 1-N, M-N, Collection, Map
Default ORM column size256255
Default ORM identifiers (tables/columns)NoYes
Default ORM mappingsYes, JDBC types defined for Java typesNo
Caching interfaceL2 Caching APIL2 Caching API
As an overall conclusion "JPA" is a subset of what is available in "JDO".

2 comments:

JESSICA JANE said...

If you have a history of illness that is difficult to recover, maybe our next article will help you to recover

Cara menghilangkan sakit saat buang air kecil
Cara menghilangkan gatal akibat kutu air
Cara mengempiskan & menghilangkan benjolan
Obat Herbal Untuk Batuk Berdarah
Cara Menghilangkan Kebas & Kesemutan
Pengobatan Alami Untuk Penyakit Ginjal
Biaya Operasi Untuk Pengangkatan Tumor
Obat Tipes Alami

Aniyanewjackson said...

Jordan 11 Black And White Metallic Silver, As he sees it, the ending of "Extraction" boils down to the same deeper message however one interprets it. "I think it was just meant to imply hope," says Russo. "Whether it is real or a figment of the boy's imagination, it's an artistic and a poetic way to imply that Ovi had a guardian watching over him and he made it out of it.

By January they cracked the Top 20, uncharted waters on Rose Hill. {tag: How To Clean Yeezy Cloud White}Louis Vuitton released a collaboration with Supreme that mixed its famous monogram with the New York brand's infamous "box logo." Then there's the "ugly sneaker" trend, which sees brands trying to outdo each other by designing the most outrageous, out of pocket, '90s athletic wear inspired shoe they can.Then there's the secondhand market. An entire economy of amateur and unofficial sellers have sprung up around certain brands and coveted items on sites like eBay, Depop, and especially the high end menswear site Grailed. Prices on these sites can be almost double what an item retails for. {tag: White Yeezys For Sale}

Air Jordan 1 Mid Black Noble Red, Our itinerary will move us from the art haven that is Barcelona to the spectacular architecture of Toledo. The route includes stays and tours in such iconic locales as Valencia, Granada, Costa del Sol, Seville, and Madrid. Students will emerge from this trip with a uniquely personal knowledge of one of the world's most colorful countries.Learn more via the Spain Study Travel FlyerThis 14 day trip immerses you in Cuba's extraordinary culture, history, and social life.

He said that you better see reality. {tag: Yeezy Triple White Reddit}(For more on Jackson, see the 183rd pick.)No. {tag: Yeezy Boost Sply 350 Black White}