Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 14, 2016
0 parents
commit f315bd9
Showing
419 changed files
with
9,956 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
select owner from Notepad where owner = :username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
README for Appendix B | ||
|
||
You will need to install | ||
|
||
* Hibernate 3.5 or higher | ||
* Apache Ant 1.8.1 or higher | ||
* an SLF4J implementation (compatible with the SLF4J API version of Hibernate 3.5 being used - this can change). We used 1.5.11 | ||
|
||
* Eclipse | ||
* Hibernate Tools | ||
|
||
The installation details for installing Eclipse and the Hibernate Tools Plug-in for Eclipse are covered in-depth in Appendix B. |
2 changes: 2 additions & 0 deletions
2
Bh3 2nd Ed Source Code/AppendixB/ToolsExample_Note_Notepad.hibernate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<OrmDiagram Notepad_Note.null.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" Notepad_Note.null.indent="20" Notepad_Note.null.selected="false" Notepad_Note.null.visibileChildren="true" Notepad_Note.null.visible="true" com.hibernatebook.tools.Note.className="org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape" com.hibernatebook.tools.Note.expanded="true" com.hibernatebook.tools.Note.id.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" com.hibernatebook.tools.Note.id.indent="0" com.hibernatebook.tools.Note.id.selected="false" com.hibernatebook.tools.Note.id.visibileChildren="true" com.hibernatebook.tools.Note.id.visible="true" com.hibernatebook.tools.Note.indent="0" com.hibernatebook.tools.Note.note.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" com.hibernatebook.tools.Note.note.indent="0" com.hibernatebook.tools.Note.note.selected="false" com.hibernatebook.tools.Note.note.visibileChildren="true" com.hibernatebook.tools.Note.note.visible="true" com.hibernatebook.tools.Note.selected="false" com.hibernatebook.tools.Note.visibileChildren="true" com.hibernatebook.tools.Note.visible="true" com.hibernatebook.tools.Note.x="24" com.hibernatebook.tools.Note.y="17" com.hibernatebook.tools.Notepad.className="org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape" com.hibernatebook.tools.Notepad.expanded="true" com.hibernatebook.tools.Notepad.id.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" com.hibernatebook.tools.Notepad.id.indent="0" com.hibernatebook.tools.Notepad.id.selected="false" com.hibernatebook.tools.Notepad.id.visibileChildren="true" com.hibernatebook.tools.Notepad.id.visible="true" com.hibernatebook.tools.Notepad.indent="0" com.hibernatebook.tools.Notepad.notes.className="org.jboss.tools.hibernate.ui.diagram.editors.model.ComponentShape" com.hibernatebook.tools.Notepad.notes.expanded="true" com.hibernatebook.tools.Notepad.notes.indent="0" com.hibernatebook.tools.Notepad.notes.selected="false" com.hibernatebook.tools.Notepad.notes.visibileChildren="true" com.hibernatebook.tools.Notepad.notes.visible="true" com.hibernatebook.tools.Notepad.owner.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" com.hibernatebook.tools.Notepad.owner.indent="0" com.hibernatebook.tools.Notepad.owner.selected="false" com.hibernatebook.tools.Notepad.owner.visibileChildren="true" com.hibernatebook.tools.Notepad.owner.visible="true" com.hibernatebook.tools.Notepad.selected="false" com.hibernatebook.tools.Notepad.visibileChildren="true" com.hibernatebook.tools.Notepad.visible="true" com.hibernatebook.tools.Notepad.x="21" com.hibernatebook.tools.Notepad.y="83" default.Note.className="org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape" default.Note.expanded="true" default.Note.indent="0" default.Note.selected="false" default.Note.visibileChildren="true" default.Note.visible="true" default.Note.x="406" default.Note.y="17" default.Notepad.className="org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape" default.Notepad.expanded="true" default.Notepad.indent="0" default.Notepad.selected="false" default.Notepad.visibileChildren="true" default.Notepad.visible="true" default.Notepad.x="400" default.Notepad.y="177" default.Notepad_Note.className="org.jboss.tools.hibernate.ui.diagram.editors.model.OrmShape" default.Notepad_Note.expanded="true" default.Notepad_Note.indent="0" default.Notepad_Note.selected="false" default.Notepad_Note.visibileChildren="true" default.Notepad_Note.visible="true" default.Notepad_Note.x="404" default.Notepad_Note.y="92" null.className="org.jboss.tools.hibernate.ui.diagram.editors.model.Shape" null.connectionsVisibilityAssociation="true" null.connectionsVisibilityClassMapping="true" null.connectionsVisibilityForeignKeyConstraint="true" null.connectionsVisibilityPropertyMapping="true" null.consoleConfig_name="ToolsExample" null.deepIntoSort="false" null.entityNames_0="com.hibernatebook.tools.Note" null.entityNames_1="com.hibernatebook.tools.Notepad" null.entityNames_size="2" null.flagManhattanConnectionRouter="true" null.gridEnabled="false" null.indent="0" null.rulersVisibility="false" null.selected="false" null.snapToGeometry="false" null.visibileChildren="true" null.visible="true" null.zoom="1.0"/> |
195 changes: 195 additions & 0 deletions
195
Bh3 2nd Ed Source Code/AppendixB/generated-src/assets/doc-style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
/* | ||
* Hibernate Mapping Documentation Style Sheet | ||
*/ | ||
|
||
body | ||
{ | ||
margin: 0.5em; | ||
background: white; | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: 10pt; | ||
} | ||
|
||
a | ||
{ | ||
color: #003399; | ||
} | ||
|
||
a:active | ||
{ | ||
color: #003399; | ||
} | ||
|
||
a:visited | ||
{ | ||
color: #888888; | ||
} | ||
|
||
p, ul, hr | ||
{ | ||
margin: 0.5em 0; | ||
} | ||
* html hr /* ie6 */ | ||
{ | ||
margin: 0; | ||
} | ||
|
||
h1 | ||
{ | ||
text-align: center; | ||
} | ||
|
||
table | ||
{ | ||
margin: 0.5em 0; | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
* html table /* ie6 only */ | ||
{ | ||
margin: 1em 0; | ||
} | ||
|
||
th, td | ||
{ | ||
border: solid 1px #CCCCCC; | ||
padding: 3px; | ||
} | ||
|
||
th | ||
{ | ||
background: #F4F4F4; | ||
text-align: left; | ||
} | ||
|
||
td a | ||
{ | ||
font-weight: bold; | ||
} | ||
|
||
hr | ||
{ | ||
border: none; | ||
border-top: 1px solid #CCCCCC; | ||
} | ||
* html hr /* ie6 only */ | ||
{ | ||
height: 1px; | ||
} | ||
|
||
.MainTableHeading | ||
{ | ||
font-size: 20px; | ||
font-weight: bold; | ||
} | ||
|
||
p.MainTableHeading | ||
{ | ||
background: #F4F4F4; | ||
border: solid 1px #CCCCCC; | ||
padding: 3px; | ||
} | ||
|
||
.List p | ||
{ | ||
margin: 0 0 10px 0; | ||
} | ||
|
||
.ListTitleFont | ||
{ | ||
font-size: large; | ||
font-weight: bold; | ||
white-space: nowrap; | ||
} | ||
|
||
/* header */ | ||
|
||
#logo | ||
{ | ||
float: right; | ||
margin-bottom: 0.5em; | ||
} | ||
* html #logo /* ie6 */ | ||
{ | ||
margin-bottom: 0; | ||
} | ||
|
||
#logo img | ||
{ | ||
display: block; | ||
border: none; | ||
} | ||
|
||
#header ul | ||
{ | ||
list-style: none; | ||
background: #F4F4F4; | ||
padding: 4px; | ||
margin: 0; | ||
} | ||
|
||
#header li | ||
{ | ||
display: inline; | ||
margin-right: 3px; | ||
padding: 0 3px; | ||
} | ||
|
||
#header li.selected | ||
{ | ||
background: silver; | ||
color: white; | ||
font-weight: bold; | ||
} | ||
|
||
#header a | ||
{ | ||
color: black; | ||
font-weight: bold; | ||
} | ||
|
||
#header hr | ||
{ | ||
clear: right; | ||
} | ||
|
||
/* entity hierarchy */ | ||
|
||
ul.EntityHierarchy | ||
{ | ||
border: solid 1px #CCCCCC; | ||
background: #F4F4F4; | ||
list-style: none; | ||
padding: 5px; | ||
font: bold 90% monospace; | ||
} | ||
* html ul.EntityHierarchy /* ie6 only */ | ||
{ | ||
margin-left: 0; | ||
} | ||
|
||
.EntityHierarchy a | ||
{ | ||
font-weight: normal; | ||
} | ||
|
||
.EntityHierarchy ul | ||
{ | ||
margin: 0; | ||
list-style: none; | ||
padding-left: 0; | ||
} | ||
* html .EntityHierarchy ul /* ie6 only */ | ||
{ | ||
margin-left: 0; | ||
} | ||
|
||
.EntityHierarchy ul.first | ||
{ | ||
padding-left: 15px; | ||
} | ||
|
||
.EntityHierarchy ul ul | ||
{ | ||
padding-left: 30px; | ||
} |
Binary file added
BIN
+2.46 KB
Bh3 2nd Ed Source Code/AppendixB/generated-src/assets/hibernate_logo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions
64
Bh3 2nd Ed Source Code/AppendixB/generated-src/com/hibernatebook/generated/Note.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.hibernatebook.generated; | ||
|
||
// Generated Apr 5, 2010 2:01:23 PM by Hibernate Tools 3.3.0.GA | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import static javax.persistence.GenerationType.IDENTITY; | ||
import javax.persistence.Id; | ||
import javax.persistence.OneToMany; | ||
import javax.persistence.Table; | ||
|
||
/** | ||
* Note generated by hbm2java | ||
*/ | ||
@Entity | ||
@Table(name = "NOTE", schema = "PUBLIC") | ||
public class Note implements java.io.Serializable { | ||
|
||
private Integer id; | ||
private String note; | ||
private Set<NotepadNote> notepadNotes = new HashSet<NotepadNote>(0); | ||
|
||
public Note() { | ||
} | ||
|
||
public Note(String note, Set<NotepadNote> notepadNotes) { | ||
this.note = note; | ||
this.notepadNotes = notepadNotes; | ||
} | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "ID", unique = true, nullable = false) | ||
public Integer getId() { | ||
return this.id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
@Column(name = "NOTE") | ||
public String getNote() { | ||
return this.note; | ||
} | ||
|
||
public void setNote(String note) { | ||
this.note = note; | ||
} | ||
|
||
@OneToMany(fetch = FetchType.LAZY, mappedBy = "note") | ||
public Set<NotepadNote> getNotepadNotes() { | ||
return this.notepadNotes; | ||
} | ||
|
||
public void setNotepadNotes(Set<NotepadNote> notepadNotes) { | ||
this.notepadNotes = notepadNotes; | ||
} | ||
|
||
} |
64 changes: 64 additions & 0 deletions
64
Bh3 2nd Ed Source Code/AppendixB/generated-src/com/hibernatebook/generated/Notepad.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.hibernatebook.generated; | ||
|
||
// Generated Apr 5, 2010 2:01:23 PM by Hibernate Tools 3.3.0.GA | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.GeneratedValue; | ||
import static javax.persistence.GenerationType.IDENTITY; | ||
import javax.persistence.Id; | ||
import javax.persistence.OneToMany; | ||
import javax.persistence.Table; | ||
|
||
/** | ||
* Notepad generated by hbm2java | ||
*/ | ||
@Entity | ||
@Table(name = "NOTEPAD", schema = "PUBLIC") | ||
public class Notepad implements java.io.Serializable { | ||
|
||
private Integer id; | ||
private String owner; | ||
private Set<NotepadNote> notepadNotes = new HashSet<NotepadNote>(0); | ||
|
||
public Notepad() { | ||
} | ||
|
||
public Notepad(String owner, Set<NotepadNote> notepadNotes) { | ||
this.owner = owner; | ||
this.notepadNotes = notepadNotes; | ||
} | ||
|
||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
@Column(name = "ID", unique = true, nullable = false) | ||
public Integer getId() { | ||
return this.id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
@Column(name = "OWNER") | ||
public String getOwner() { | ||
return this.owner; | ||
} | ||
|
||
public void setOwner(String owner) { | ||
this.owner = owner; | ||
} | ||
|
||
@OneToMany(fetch = FetchType.LAZY, mappedBy = "notepad") | ||
public Set<NotepadNote> getNotepadNotes() { | ||
return this.notepadNotes; | ||
} | ||
|
||
public void setNotepadNotes(Set<NotepadNote> notepadNotes) { | ||
this.notepadNotes = notepadNotes; | ||
} | ||
|
||
} |
Oops, something went wrong.