From: <gca...@us...> - 2010-05-09 17:28:58
|
Revision: 2375 http://openutils.svn.sourceforge.net/openutils/?rev=2375&view=rev Author: gcatania Date: 2010-05-09 17:28:48 +0000 (Sun, 09 May 2010) Log Message: ----------- adding license information to new files Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/PersonDAO.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Chance.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/FullName.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Title.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Wish.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/PersonDAO.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/PersonDAO.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/PersonDAO.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.dao; import it.openutils.dao.hibernate.HibernateDAO; Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.model; import javax.persistence.Column; Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Chance.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Chance.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Chance.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.model; /** Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/FullName.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/FullName.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/FullName.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.model; import javax.persistence.Column; Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Title.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Title.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Title.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.model; /** Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Wish.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Wish.java 2010-05-09 17:15:31 UTC (rev 2374) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Wish.java 2010-05-09 17:28:48 UTC (rev 2375) @@ -1,6 +1,28 @@ /** - * + * + * openutils base Spring-Hibernate DAO for java 5.0 (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) null-2010, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + package it.openutils.hibernate.test.model; import java.util.Set; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2012-06-29 14:26:17
|
Revision: 4075 http://openutils.svn.sourceforge.net/openutils/?rev=4075&view=rev Author: gcatania Date: 2012-06-29 14:26:07 +0000 (Fri, 29 Jun 2012) Log Message: ----------- cleanup unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java Added Paths: ----------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java Added: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java 2012-06-29 14:26:07 UTC (rev 4075) @@ -0,0 +1,148 @@ +/** + * Copyright (c) Energeya LLC. All rights reserved. http://www.energeya.com + */ +package it.openutils.hibernate.test; + +import it.openutils.hibernate.test.model.Address; +import it.openutils.hibernate.test.model.Car; +import it.openutils.hibernate.test.model.CarMaker; +import it.openutils.hibernate.test.model.CarModel; +import it.openutils.hibernate.test.model.CurrencyAmount; +import it.openutils.hibernate.test.model.Designer; +import it.openutils.hibernate.test.model.FullName; +import it.openutils.hibernate.test.model.Owner; +import it.openutils.hibernate.test.model.Person; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.GregorianCalendar; +import java.util.List; + + +/** + * @author gcatania + * @version $Id$ + */ +public final class EntityBuilder +{ + + private EntityBuilder() + { + } + + public static Person alice() + { + FullName fullName = new FullName("Alice", "McBeal"); + Calendar birthDate = new GregorianCalendar(1970, Calendar.MARCH, 7); + Address address = new Address("Long road", 15, "Smalltown", "MI", 14352); + Person p = new Person(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + return p; + } + + public static Owner bob() + { + FullName fullName = new FullName("Bob", "Kelso"); + Calendar birthDate = new GregorianCalendar(1950, Calendar.MARCH, 7); + Address address = new Address("Sacred Heart Lane", 3, "Smalltown", "CA", 11243); + Owner o = new Owner(); + o.setName(fullName); + o.setBirthDate(birthDate); + o.setFiscalAddress(address); + o.setCurrentAddress(address); + return o; + } + + public static Owner chuck() + { + FullName fullName = new FullName("Chuck", "Palahniuk"); + Calendar birthDate = new GregorianCalendar(1962, Calendar.FEBRUARY, 21); + Address address = new Address("Awesome Street", 2, "Pasco", "WA", 13121); + Owner p = new Owner(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + return p; + } + + public static CarMaker toyota() + { + CarMaker toyota = new CarMaker(); + toyota.setCode("TYT"); + toyota.setName("Toyota"); + toyota.setCapitalization(new CurrencyAmount(12000, "YEN")); + return toyota; + } + + public static CarMaker fiat() + { + CarMaker fiat = new CarMaker(); + fiat.setCode("FIA"); + fiat.setName("Fabbrica Italiana Automobili Torino"); + fiat.setCapitalization(new CurrencyAmount(80000, "EUR")); + return fiat; + } + + public static CarModel prius(CarMaker toyota) + { + CarModel prius = new CarModel(); + prius.setName("Prius"); + prius.setMake(toyota); + prius.setYear(Integer.valueOf(2008)); + + List<CarModel> toyotaModels = toyota.getModels(); + if (toyotaModels == null) + { + toyotaModels = new ArrayList<CarModel>(); + } + toyotaModels.add(prius); + toyota.setModels(toyotaModels); + return prius; + } + + public static Designer priusDesigner(CarModel prius) + { + FullName fullName = new FullName("Ken", "Shiro"); + Calendar birthDate = new GregorianCalendar(1981, Calendar.OCTOBER, 16); + Address address = new Address("Khan avenue", 6, "Nagato", "TK", 99867); + Designer p = new Designer(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + p.setDepartment("design"); + p.setEmployer(prius.getMake()); + p.setDesignedModels(Collections.singleton(prius)); + p.setGrossAnnualSalary(new CurrencyAmount(60000, "YEN")); + p.setHipsterFactor(97); + return p; + } + + public static Car bobsPrius(Owner bob, CarModel prius) + { + Car bobsPrius = new Car(); + bobsPrius.setModel(prius); + bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); + bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); + bobsPrius.setOwner(bob); + bob.setCars(Collections.singleton(bobsPrius)); + return bobsPrius; + } + + public static Car chucksPrius(Owner chuck, CarModel prius) + { + Car chucksPrius = new Car(); + chucksPrius.setModel(prius); + chucksPrius.setRegistrationDate(new GregorianCalendar(2011, Calendar.DECEMBER, 13)); + chucksPrius.setMarketValue(new CurrencyAmount(5400, "USD")); + chucksPrius.setOwner(chuck); + chuck.setCars(Collections.singleton(chucksPrius)); + return chucksPrius; + } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java 2012-06-29 13:17:38 UTC (rev 4074) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java 2012-06-29 14:26:07 UTC (rev 4075) @@ -25,6 +25,15 @@ package it.openutils.hibernate.test; +import static it.openutils.hibernate.test.EntityBuilder.alice; +import static it.openutils.hibernate.test.EntityBuilder.bob; +import static it.openutils.hibernate.test.EntityBuilder.bobsPrius; +import static it.openutils.hibernate.test.EntityBuilder.chuck; +import static it.openutils.hibernate.test.EntityBuilder.chucksPrius; +import static it.openutils.hibernate.test.EntityBuilder.fiat; +import static it.openutils.hibernate.test.EntityBuilder.prius; +import static it.openutils.hibernate.test.EntityBuilder.priusDesigner; +import static it.openutils.hibernate.test.EntityBuilder.toyota; import it.openutils.hibernate.test.dao.CarDAO; import it.openutils.hibernate.test.dao.CarMakerDAO; import it.openutils.hibernate.test.dao.PersonDAO; @@ -40,11 +49,8 @@ import it.openutils.hibernate.test.model.Person; import it.openutils.hibernate.test.model.Sticker; -import java.util.ArrayList; import java.util.Arrays; -import java.util.Calendar; import java.util.Collections; -import java.util.GregorianCalendar; import java.util.List; import org.hibernate.criterion.Example; @@ -80,120 +86,6 @@ @Autowired private StickerDAO stickerDAO; - private static Person alice() - { - FullName fullName = new FullName("Alice", "McBeal"); - Calendar birthDate = new GregorianCalendar(1970, Calendar.MARCH, 7); - Address address = new Address("Long road", 15, "Smalltown", "MI", 14352); - Person p = new Person(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - return p; - } - - private static Owner bob() - { - FullName fullName = new FullName("Bob", "Kelso"); - Calendar birthDate = new GregorianCalendar(1950, Calendar.MARCH, 7); - Address address = new Address("Sacred Heart Lane", 3, "Smalltown", "CA", 11243); - Owner o = new Owner(); - o.setName(fullName); - o.setBirthDate(birthDate); - o.setFiscalAddress(address); - o.setCurrentAddress(address); - return o; - } - - private static Owner chuck() - { - FullName fullName = new FullName("Chuck", "Palahniuk"); - Calendar birthDate = new GregorianCalendar(1962, Calendar.FEBRUARY, 21); - Address address = new Address("Awesome Street", 2, "Pasco", "WA", 13121); - Owner p = new Owner(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - return p; - } - - private static CarMaker toyota() - { - CarMaker toyota = new CarMaker(); - toyota.setCode("TYT"); - toyota.setName("Toyota"); - toyota.setCapitalization(new CurrencyAmount(12000, "YEN")); - return toyota; - } - - private static CarMaker fiat() - { - CarMaker fiat = new CarMaker(); - fiat.setCode("FIA"); - fiat.setName("Fabbrica Italiana Automobili Torino"); - fiat.setCapitalization(new CurrencyAmount(80000, "EUR")); - return fiat; - } - - private static CarModel prius(CarMaker toyota) - { - CarModel prius = new CarModel(); - prius.setName("Prius"); - prius.setMake(toyota); - prius.setYear(Integer.valueOf(2008)); - - List<CarModel> toyotaModels = toyota.getModels(); - if (toyotaModels == null) - { - toyotaModels = new ArrayList<CarModel>(); - } - toyotaModels.add(prius); - toyota.setModels(toyotaModels); - return prius; - } - - private static Designer priusDesigner(CarModel prius) - { - FullName fullName = new FullName("Ken", "Shiro"); - Calendar birthDate = new GregorianCalendar(1981, Calendar.OCTOBER, 16); - Address address = new Address("Khan avenue", 6, "Nagato", "TK", 99867); - Designer p = new Designer(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - p.setDepartment("design"); - p.setEmployer(prius.getMake()); - p.setDesignedModels(Collections.singleton(prius)); - p.setGrossAnnualSalary(new CurrencyAmount(60000, "YEN")); - p.setHipsterFactor(97); - return p; - } - - private static Car bobsPrius(Owner bob, CarModel prius) - { - Car bobsPrius = new Car(); - bobsPrius.setModel(prius); - bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); - bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); - bobsPrius.setOwner(bob); - bob.setCars(Collections.singleton(bobsPrius)); - return bobsPrius; - } - - private static Car chucksPrius(Owner chuck, CarModel prius) - { - Car chucksPrius = new Car(); - chucksPrius.setModel(prius); - chucksPrius.setRegistrationDate(new GregorianCalendar(2011, Calendar.DECEMBER, 13)); - chucksPrius.setMarketValue(new CurrencyAmount(5400, "USD")); - chucksPrius.setOwner(chuck); - chuck.setCars(Collections.singleton(chucksPrius)); - return chucksPrius; - } - /** * basic save/evict/get test. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2012-07-05 14:42:45
|
Revision: 4091 http://openutils.svn.sourceforge.net/openutils/?rev=4091&view=rev Author: gcatania Date: 2012-07-05 14:42:38 +0000 (Thu, 05 Jul 2012) Log Message: ----------- BSHD-17 preliminary: avoid possible sql keywords as field names Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java 2012-07-04 13:22:42 UTC (rev 4090) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/EntityBuilder.java 2012-07-05 14:42:38 UTC (rev 4091) @@ -115,7 +115,7 @@ CarModel prius = new CarModel(); prius.setName("Prius"); prius.setMake(toyota); - prius.setYear(Integer.valueOf(2008)); + prius.setLaunchYear(Integer.valueOf(2008)); List<CarModel> toyotaModels = toyota.getModels(); if (toyotaModels == null) Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java 2012-07-04 13:22:42 UTC (rev 4090) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java 2012-07-05 14:42:38 UTC (rev 4091) @@ -128,7 +128,7 @@ Assert.assertEquals(rd.getEmployer(), toyota); Assert.assertEquals(prius.getMake(), toyota); Assert.assertEquals(rd.getHipsterFactor(), 97); - Assert.assertEquals(rd.getDesignedModels().iterator().next().getYear(), Integer.valueOf(2008)); + Assert.assertEquals(rd.getDesignedModels().iterator().next().getLaunchYear(), Integer.valueOf(2008)); } @Test Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java 2012-07-04 13:22:42 UTC (rev 4090) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Address.java 2012-07-05 14:42:38 UTC (rev 4091) @@ -47,7 +47,7 @@ private String street; @Column(nullable = false, scale = 4) - private Integer no; + private Integer streetNumber; @Column(nullable = false, length = 50) private String city; @@ -62,10 +62,10 @@ { } - public Address(String street, Integer no, String city, String county, Integer zipCode) + public Address(String street, Integer streetNumber, String city, String county, Integer zipCode) { this.street = street; - this.no = no; + this.streetNumber = streetNumber; this.city = city; this.county = county; this.zipCode = zipCode; @@ -104,19 +104,19 @@ } /** - * @return the no + * @return the streetNumber */ - public Integer getNo() + public Integer getStreetNumber() { - return no; + return streetNumber; } /** - * @param no the no to set + * @param streetNumber the no to set */ - public void setNo(Integer no) + public void setStreetNumber(Integer streetNumber) { - this.no = no; + this.streetNumber = streetNumber; } /** @@ -178,7 +178,7 @@ result = prime * result + ((city == null) ? 0 : city.hashCode()); result = prime * result + ((county == null) ? 0 : county.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); - result = prime * result + ((no == null) ? 0 : no.hashCode()); + result = prime * result + ((streetNumber == null) ? 0 : streetNumber.hashCode()); result = prime * result + ((street == null) ? 0 : street.hashCode()); result = prime * result + ((zipCode == null) ? 0 : zipCode.hashCode()); return result; @@ -236,14 +236,14 @@ { return false; } - if (no == null) + if (streetNumber == null) { - if (other.no != null) + if (other.streetNumber != null) { return false; } } - else if (!no.equals(other.no)) + else if (!streetNumber.equals(other.streetNumber)) { return false; } @@ -284,8 +284,8 @@ + county + ", id=" + id - + ", no=" - + no + + ", streetNumber=" + + streetNumber + ", street=" + street + ", zipCode=" Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java 2012-07-04 13:22:42 UTC (rev 4090) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java 2012-07-05 14:42:38 UTC (rev 4091) @@ -52,7 +52,7 @@ private String name; @Column - private Integer year; + private Integer launchYear; /** * @return the id @@ -103,19 +103,19 @@ } /** - * @return the year + * @return the launchYear */ - public Integer getYear() + public Integer getLaunchYear() { - return year; + return launchYear; } /** - * @param year the year to set + * @param launchYear the launchYear to set */ - public void setYear(Integer year) + public void setLaunchYear(Integer launchYear) { - this.year = year; + this.launchYear = launchYear; } /** @@ -129,7 +129,7 @@ result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((make == null) ? 0 : make.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((year == null) ? 0 : year.hashCode()); + result = prime * result + ((launchYear == null) ? 0 : launchYear.hashCode()); return result; } @@ -185,14 +185,14 @@ { return false; } - if (year == null) + if (launchYear == null) { - if (other.year != null) + if (other.launchYear != null) { return false; } } - else if (!year.equals(other.year)) + else if (!launchYear.equals(other.launchYear)) { return false; } @@ -211,8 +211,8 @@ .append(id) .append(", name=") .append(name) - .append(", year=") - .append(year) + .append(", launchYear=") + .append(launchYear) .append("]"); return builder.toString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |