@@ -34,16 +34,16 @@ public class Boy {
34
34
private Integer id ;
35
35
private String firstName ;
36
36
private String lastName ;
37
- private Set <String > nickNames = new HashSet <String >();
38
- private Set <String > hatedNames = new HashSet <String >();
39
- private Set <String > preferredNames = new HashSet <String >();
40
- private Map <String , Integer > scorePerNickName = new HashMap <String , Integer >();
41
- private Map <String , Integer > scorePerPreferredName = new HashMap <String , Integer >();
42
- private int [] favoriteNumbers ;
37
+ // private Set<String> nickNames = new HashSet<String>();
38
+ // private Set<String> hatedNames = new HashSet<String>();
39
+ // private Set<String> preferredNames = new HashSet<String>();
40
+ // private Map<String, Integer> scorePerNickName = new HashMap<String, Integer>();
41
+ // private Map<String, Integer> scorePerPreferredName = new HashMap<String, Integer>();
42
+ // private int[] favoriteNumbers;
43
43
private Set <Toy > favoriteToys = new HashSet <Toy >();
44
- private Set <Character > characters = new HashSet <Character >();
45
- private Map <String , FavoriteFood > foods = new HashMap <String ,FavoriteFood >();
46
- private Set <CountryAttitude > countryAttitudes = new HashSet <CountryAttitude >();
44
+ // private Set<Character> characters = new HashSet<Character>();
45
+ // private Map<String, FavoriteFood> foods = new HashMap<String,FavoriteFood>();
46
+ // private Set<CountryAttitude> countryAttitudes = new HashSet<CountryAttitude>();
47
47
48
48
@ Id
49
49
@ GeneratedValue
@@ -71,70 +71,70 @@ public void setLastName(String lastName) {
71
71
this .lastName = lastName ;
72
72
}
73
73
74
- @ ElementCollection
75
- public Set <String > getNickNames () {
76
- return nickNames ;
77
- }
78
-
79
- public void setNickNames (Set <String > nickName ) {
80
- this .nickNames = nickName ;
81
- }
82
-
83
- @ ElementCollection //default column names
84
- public Set <String > getHatedNames () {
85
- return hatedNames ;
86
- }
87
-
88
- public void setHatedNames (Set <String > hatedNames ) {
89
- this .hatedNames = hatedNames ;
90
- }
91
-
92
- @ ElementCollection //default column names
93
- @ Column
94
- public Set <String > getPreferredNames () {
95
- return preferredNames ;
96
- }
97
-
98
- public void setPreferredNames (Set <String > preferredNames ) {
99
- this .preferredNames = preferredNames ;
100
- }
101
-
102
- @ ElementCollection
103
- @ MapKeyColumn (nullable =false )
104
- public Map <String , Integer > getScorePerPreferredName () {
105
- return scorePerPreferredName ;
106
- }
107
-
108
- public void setScorePerPreferredName (Map <String , Integer > scorePerPreferredName ) {
109
- this .scorePerPreferredName = scorePerPreferredName ;
110
- }
111
-
112
- @ ElementCollection
113
- @ CollectionTable (name = "ScorePerNickName" , joinColumns = @ JoinColumn (name = "BoyId" ))
114
- @ Column (name = "score" , nullable = false )
115
- @ MapKeyColumn (nullable =false )
116
- public Map <String , Integer > getScorePerNickName () {
117
- return scorePerNickName ;
118
- }
119
-
120
- public void setScorePerNickName (Map <String , Integer > scorePerNickName ) {
121
- this .scorePerNickName = scorePerNickName ;
122
- }
123
-
124
- @ ElementCollection
125
- @ CollectionTable (
126
- name = "BoyFavoriteNumbers" ,
127
- joinColumns = @ JoinColumn (name = "BoyId" )
128
- )
129
- @ Column (name = "favoriteNumber" , nullable = false )
130
- @ OrderColumn (name = "nbr_index" )
131
- public int [] getFavoriteNumbers () {
132
- return favoriteNumbers ;
133
- }
134
-
135
- public void setFavoriteNumbers (int [] favoriteNumbers ) {
136
- this .favoriteNumbers = favoriteNumbers ;
137
- }
74
+ // @ElementCollection
75
+ // public Set<String> getNickNames() {
76
+ // return nickNames;
77
+ // }
78
+ //
79
+ // public void setNickNames(Set<String> nickName) {
80
+ // this.nickNames = nickName;
81
+ // }
82
+ //
83
+ // @ElementCollection //default column names
84
+ // public Set<String> getHatedNames() {
85
+ // return hatedNames;
86
+ // }
87
+ //
88
+ // public void setHatedNames(Set<String> hatedNames) {
89
+ // this.hatedNames = hatedNames;
90
+ // }
91
+ //
92
+ // @ElementCollection //default column names
93
+ // @Column
94
+ // public Set<String> getPreferredNames() {
95
+ // return preferredNames;
96
+ // }
97
+ //
98
+ // public void setPreferredNames(Set<String> preferredNames) {
99
+ // this.preferredNames = preferredNames;
100
+ // }
101
+ //
102
+ // @ElementCollection
103
+ // @MapKeyColumn(nullable=false)
104
+ // public Map<String, Integer> getScorePerPreferredName() {
105
+ // return scorePerPreferredName;
106
+ // }
107
+ //
108
+ // public void setScorePerPreferredName(Map<String, Integer> scorePerPreferredName) {
109
+ // this.scorePerPreferredName = scorePerPreferredName;
110
+ // }
111
+ //
112
+ // @ElementCollection
113
+ // @CollectionTable(name = "ScorePerNickName", joinColumns = @JoinColumn(name = "BoyId"))
114
+ // @Column(name = "score", nullable = false)
115
+ // @MapKeyColumn(nullable=false)
116
+ // public Map<String, Integer> getScorePerNickName() {
117
+ // return scorePerNickName;
118
+ // }
119
+ //
120
+ // public void setScorePerNickName(Map<String, Integer> scorePerNickName) {
121
+ // this.scorePerNickName = scorePerNickName;
122
+ // }
123
+ //
124
+ // @ElementCollection
125
+ // @CollectionTable(
126
+ // name = "BoyFavoriteNumbers",
127
+ // joinColumns = @JoinColumn(name = "BoyId")
128
+ // )
129
+ // @Column(name = "favoriteNumber", nullable = false)
130
+ // @OrderColumn(name = "nbr_index")
131
+ // public int[] getFavoriteNumbers() {
132
+ // return favoriteNumbers;
133
+ // }
134
+ //
135
+ // public void setFavoriteNumbers(int[] favoriteNumbers) {
136
+ // this.favoriteNumbers = favoriteNumbers;
137
+ // }
138
138
@ ElementCollection
139
139
@ AttributeOverride (name = "element.serial" , column = @ Column (name = "serial_nbr" ))
140
140
public Set <Toy > getFavoriteToys () {
@@ -145,36 +145,36 @@ public void setFavoriteToys(Set<Toy> favoriteToys) {
145
145
this .favoriteToys = favoriteToys ;
146
146
}
147
147
148
- @ ElementCollection
149
- @ Enumerated (EnumType .STRING )
150
- @ Column (name = "`characters`" )
151
- public Set <Character > getCharacters () {
152
- return characters ;
153
- }
154
-
155
- public void setCharacters (Set <Character > characters ) {
156
- this .characters = characters ;
157
- }
158
-
159
- @ ElementCollection
160
- @ Enumerated (EnumType .STRING )
161
- @ MapKeyColumn (nullable =false )
162
- public Map <String , FavoriteFood > getFavoriteFood () {
163
- return foods ;
164
- }
165
-
166
- public void setFavoriteFood (Map <String , FavoriteFood >foods ) {
167
- this .foods = foods ;
168
- }
169
-
170
- @ ElementCollection (fetch = FetchType .EAGER )
171
- //@Where(clause = "b_likes=false")
172
- public Set <CountryAttitude > getCountryAttitudes () {
173
- return countryAttitudes ;
174
- }
175
-
176
- public void setCountryAttitudes (Set <CountryAttitude > countryAttitudes ) {
177
- this .countryAttitudes = countryAttitudes ;
178
- }
148
+ // @ElementCollection
149
+ // @Enumerated(EnumType.STRING)
150
+ // @Column(name = "`characters`")
151
+ // public Set<Character> getCharacters() {
152
+ // return characters;
153
+ // }
154
+ //
155
+ // public void setCharacters(Set<Character> characters) {
156
+ // this.characters = characters;
157
+ // }
158
+ //
159
+ // @ElementCollection
160
+ // @Enumerated(EnumType.STRING)
161
+ // @MapKeyColumn(nullable=false)
162
+ // public Map<String, FavoriteFood> getFavoriteFood() {
163
+ // return foods;
164
+ // }
165
+ //
166
+ // public void setFavoriteFood(Map<String, FavoriteFood>foods) {
167
+ // this.foods = foods;
168
+ // }
169
+ //
170
+ // @ElementCollection(fetch = FetchType.EAGER)
171
+ // //@Where(clause = "b_likes=false")
172
+ // public Set<CountryAttitude> getCountryAttitudes() {
173
+ // return countryAttitudes;
174
+ // }
175
+ //
176
+ // public void setCountryAttitudes(Set<CountryAttitude> countryAttitudes) {
177
+ // this.countryAttitudes = countryAttitudes;
178
+ // }
179
179
}
180
180
0 commit comments