Skip to main content

2016 | OriginalPaper | Buchkapitel

4. The Persistence Life Cycle

verfasst von : Joseph B. Ottinger, Jeff Linwood, Dave Minter

Erschienen in: Beginning Hibernate

Verlag: Apress

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

In this chapter, we discuss the life cycle of persistent objects in Hibernate. These persistent objects can be POJOs without any special marker interfaces or inheritance related to Hibernate. Part of Hibernate’s popularity comes from its ability to work with a normal object model.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
As we saw in Chapter 3, HQL uses the entity name, not the class name; but because we didn’t specify any custom entity names, the class name and the entity name were the same.
 
2
The U.S. Social Security Administration says that they have enough Social Security numbers to assign unique identification for “several generations.” (See http://www.ssa.gov/history/hfaq.html , Q20.) That may be good enough for a natural identifier, although privacy advocates would rightfully complain; also, note that “several generations” might not be enough. Programmers were absolutely sure that nobody would still have data with two-digit years in them … until Y2K, which took a lot of man-hours to fix.
 
3
We saw this in Chapter 3: chapter03.hibernate.RankingTest’s changeRanking() method does an in-place update of a persistent object.
 
4
IDEA is an IDE for Java; it has a free community edition and a commercial “ultimate” edition. It can be found at http://​jetbrains.​com/​idea.
 
5
As usual, there’s more to this than we’re discussing here. We’ll add more methods to this list as we keep going through Hibernate’s capabilities. We’re keeping the list small for simplicity’s sake.
 
6
We’ve mentioned this a few different times now, along with test code.
 
7
This method’s name has changed from earlier versions of Hibernate, to avoid the definition and meaning from the Java Persistence Architecture standard.
 
8
That’s the thing about standards: they’re standard.
 
9
This is a deeper explanation of some behavior we saw in our sample code for equals() and hashCode().
 
Metadaten
Titel
The Persistence Life Cycle
verfasst von
Joseph B. Ottinger
Jeff Linwood
Dave Minter
Copyright-Jahr
2016
Verlag
Apress
DOI
https://doi.org/10.1007/978-1-4842-2319-2_4