[Suiviobsmer-commits] r437 - in trunk: . src/site/rst wao-business/src/main/filters wao-business/src/main/java/fr/ifremer/wao wao-business/src/main/resources/oldmappings/Wao wao-business/src/main/resources/oldmappings/Wao/1.2 wao-business/src/main/resources/oldmappings/Wao/1.2/fr wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity wao-business/src/main/xmi w
Author: fdesbois Date: 2010-04-08 17:14:03 +0000 (Thu, 08 Apr 2010) New Revision: 437 Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityCalendarImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityMonthImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityProfessionImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityZoneImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatInfosImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/CompanyImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ContactImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ElligibleBoatImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/FishingZoneImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/NewsImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ProfessionImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleMonthImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowLogImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ShipOwnerImpl.hbm.xml trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/WaoUserImpl.hbm.xml trunk/wao-ui/src/main/resources/org/ trunk/wao-ui/src/main/resources/org/apache/ trunk/wao-ui/src/main/resources/org/apache/tapestry5/ trunk/wao-ui/src/main/resources/org/apache/tapestry5/internal/ trunk/wao-ui/src/main/resources/org/apache/tapestry5/internal/ValidationMessages_fr.properties trunk/wao-ui/src/main/webapp/img/sample-table.png Modified: trunk/changelog.txt trunk/src/site/rst/model.rst trunk/wao-business/src/main/filters/Wao.properties trunk/wao-business/src/main/java/fr/ifremer/wao/PgMigrationCallback.java trunk/wao-business/src/main/java/fr/ifremer/wao/WaoMigrationCallBack.java trunk/wao-business/src/main/xmi/wao.zargo trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/BusinessUtils.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/ExceptionReport.java trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/services/WaoManager.java trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Boats.properties trunk/wao-ui/src/main/webapp/Boats.tml trunk/wao-ui/src/main/webapp/css/boats.css Log: - Evo #2060 : Add new properties for BoatInfos (migration 1.2) - Move method to manage WaoException messages from BusinessUtils to WaoManager - Add isDevEnvironment method in WaoManager to display more error messages in ExceptionReport Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/changelog.txt 2010-04-08 17:14:03 UTC (rev 437) @@ -4,11 +4,13 @@ Historique des versions 1.2 ---- +---- Evolutions ++++++++++ +- [fdesbois] Evo #2060 : Dans la partie contact des informations privées du + navire, ajouter les champs Adresse (code postal + ville + adresse) et N° SIRET - [fdesbois] Evo #2069 : Role admin : Ajouter la visibilité réduite sur les contacts et le plan d'échantillonnage - [fdesbois] Evo #2059 : Filtres sur tableau plan échantillonnage Modified: trunk/src/site/rst/model.rst =================================================================== --- trunk/src/site/rst/model.rst 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/src/site/rst/model.rst 2010-04-08 17:14:03 UTC (rev 437) @@ -205,6 +205,11 @@ + contactLastName : nom du contact du navire + contactEmail : adresse e-mail du contact du navire + contactPhoneNumber : numéro de téléphone du contact du navire + + contactAddress1 : première ligne d'adresse + + contactAddress2 : deuxième ligne d'adresse (complément d'adresse) + + contactPostalCode : code postal de l'adresse + + contactCity : ville de l'adresse + + contactSiret : N° SIRET du contact + dup : Capacité d'accueil du navire en personnels spécialisés + comment : commentaire supplémentaire sur le contact ou le navire + [lien] boat : navire concerné @@ -226,4 +231,10 @@ - [WaoUser] Création du champs readOnly (boolean) - [Contact] Modification du type pour le champs state (varchar -> smallint) - [SampleRowLog] Modification du rôle de l'association vers WaoUser (admin -> - author) \ No newline at end of file + author) + +Version 1.2 +~~~~~~~~~~~ + +- [BoatInfos] Ajout des champs : contactAddress1, contactAddress2, + contactPostalCode, contactCity et contactSiret. \ No newline at end of file Modified: trunk/wao-business/src/main/filters/Wao.properties =================================================================== --- trunk/wao-business/src/main/filters/Wao.properties 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-business/src/main/filters/Wao.properties 2010-04-08 17:14:03 UTC (rev 437) @@ -23,4 +23,4 @@ wao.server.path=localhost:8080/wao ## Version (not necessary to override it) -wao.version=1.1.2 \ No newline at end of file +wao.version=1.2 \ No newline at end of file Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/PgMigrationCallback.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/PgMigrationCallback.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/PgMigrationCallback.java 2010-04-08 17:14:03 UTC (rev 437) @@ -38,7 +38,7 @@ public class PgMigrationCallback extends WaoMigrationCallBack { @Override - protected void createUserRoleColumn_1_1(List<String> queries) { + protected void createUserRoleColumn_1_1a(List<String> queries) { // Evo #2063 queries.add("ALTER TABLE WaoUser ADD role SMALLINT;"); queries.add("UPDATE WaoUser SET role = 0 WHERE admin = TRUE;"); @@ -52,7 +52,7 @@ } @Override - protected void changeContactStateColumn_1_1(List<String> queries) { + protected void changeContactStateColumn_1_1b(List<String> queries) { queries.add("ALTER TABLE Contact ADD state1 SMALLINT;"); for (ContactState state : ContactState.values()) { queries.add("UPDATE Contact SET state1 = " + state.ordinal() + @@ -63,9 +63,20 @@ } @Override - protected void changeSampleRowLogAdminColumn_1_1(List<String> queries) { + protected void changeSampleRowLogAdminColumn_1_1c(List<String> queries) { // Evo #1960 : change column name admin to author for sampleRowLog queries.add("ALTER TABLE SampleRowLog RENAME admin TO author;"); } + @Override + protected void createBoatInfosNewColumns_1_2(List<String> queries) { + // Evo #2060 : add new columns in BoatInfos (contactSiret, + // contactAddress1, contactAddress2, contactCity, contactPostalCode) + queries.add("ALTER TABLE BoatInfos ADD contactAddress1 TEXT;"); + queries.add("ALTER TABLE BoatInfos ADD contactAddress2 TEXT;"); + queries.add("ALTER TABLE BoatInfos ADD contactCity TEXT;"); + queries.add("ALTER TABLE BoatInfos ADD contactPostalCode INTEGER;"); + queries.add("ALTER TABLE BoatInfos ADD contactSiret TEXT;"); + } + } Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/WaoMigrationCallBack.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/WaoMigrationCallBack.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/WaoMigrationCallBack.java 2010-04-08 17:14:03 UTC (rev 437) @@ -29,6 +29,7 @@ import org.nuiton.util.Version; import java.util.List; +import org.nuiton.topia.TopiaContext; public abstract class WaoMigrationCallBack extends ManualMigrationCallback { @@ -37,6 +38,24 @@ */ private static final Log log = LogFactory.getLog(WaoMigrationCallBack.class); + protected abstract void createUserRoleColumn_1_1a(List<String> queries); + + protected abstract void changeContactStateColumn_1_1b(List<String> queries); + + protected abstract void changeSampleRowLogAdminColumn_1_1c( + List<String> queries); + + protected abstract void createBoatInfosNewColumns_1_2( + List<String> queries); + + @Override + public boolean askUser(Version dbVersion, + Version applicationVersion, + List<Version> versions) { + // Always migrate the database + return true; + } + public void migrateTo_1_0(TopiaContextImplementor tx, boolean showSql, boolean showProgression) throws TopiaException { @@ -53,29 +72,29 @@ List<String> queries = new ArrayList<String>(); - createUserRoleColumn_1_1(queries); + createUserRoleColumn_1_1a(queries); - changeContactStateColumn_1_1(queries); + changeContactStateColumn_1_1b(queries); - changeSampleRowLogAdminColumn_1_1(queries); + changeSampleRowLogAdminColumn_1_1c(queries); String[] strings = queries.toArray(new String[queries.size()]); executeSQL(tx, showSql, showProgression, strings); } - protected abstract void createUserRoleColumn_1_1(List<String> queries); + public void migrateTo_1_2(TopiaContextImplementor tx, + boolean showSql, + boolean showProgression) throws TopiaException { + if (log.isInfoEnabled()) { + log.info("Migrate to version 1.2"); + } - protected abstract void changeContactStateColumn_1_1(List<String> queries); + List<String> queries = new ArrayList<String>(); - protected abstract void changeSampleRowLogAdminColumn_1_1( - List<String> queries); + createBoatInfosNewColumns_1_2(queries); - @Override - public boolean askUser(Version dbVersion, - Version applicationVersion, - List<Version> versions) { - // Always migrate the database - return true; + String[] strings = queries.toArray(new String[queries.size()]); + executeSQL(tx, showSql, showProgression, strings); } } Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityCalendarImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityCalendarImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityCalendarImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ActivityCalendarImpl" table="activityCalendar" node="fr.ifremer.wao.entity.ActivityCalendarImpl" abstract="false" proxy="fr.ifremer.wao.entity.ActivityCalendar" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="year" type="int" access="field" column="year" node="year"/> + <property name="fiability" type="int" access="field" column="fiability" node="fiability"/> + <bag name="activityMonth" inverse="true" order-by="month" lazy="true" cascade="all,delete-orphan" node="activityMonth" embed-xml="false"> + <key column="activityCalendar"/> + <one-to-many class="fr.ifremer.wao.entity.ActivityMonthImpl" node="topiaId" embed-xml="false"/> + </bag> + <many-to-one name="boat" class="fr.ifremer.wao.entity.BoatImpl" column="boat" node="boat/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityMonthImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityMonthImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityMonthImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ActivityMonthImpl" table="activityMonth" node="fr.ifremer.wao.entity.ActivityMonthImpl" abstract="false" proxy="fr.ifremer.wao.entity.ActivityMonth" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="harbourLibelle" type="text" access="field" column="harbourLibelle" node="harbourLibelle"/> + <property name="active" type="boolean" access="field" column="active" node="active"/> + <property name="nbBoardingPersons" type="java.lang.Integer" access="field" column="nbBoardingPersons" node="nbBoardingPersons"/> + <property name="nbSeaDays" type="java.lang.Integer" access="field" column="nbSeaDays" node="nbSeaDays"/> + <property name="nbFishingDays" type="java.lang.Integer" access="field" column="nbFishingDays" node="nbFishingDays"/> + <property name="month" type="int" access="field" column="month" node="month"/> + <property name="harbourCode" type="text" access="field" column="harbourCode" node="harbourCode"/> + <property name="harbourId" type="int" access="field" column="harbourId" node="harbourId"/> + <bag name="activityProfession" inverse="true" order-by="professionOrder" lazy="true" cascade="all,delete-orphan" node="activityProfession" embed-xml="false"> + <key column="activityMonth"/> + <one-to-many class="fr.ifremer.wao.entity.ActivityProfessionImpl" node="topiaId" embed-xml="false"/> + </bag> + <many-to-one name="activityCalendar" class="fr.ifremer.wao.entity.ActivityCalendarImpl" column="activityCalendar" node="activityCalendar/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityProfessionImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityProfessionImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityProfessionImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ActivityProfessionImpl" table="activityProfession" node="fr.ifremer.wao.entity.ActivityProfessionImpl" abstract="false" proxy="fr.ifremer.wao.entity.ActivityProfession" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="code" type="text" access="field" column="code" node="code"/> + <property name="libelle" type="text" access="field" column="libelle" node="libelle"/> + <property name="id" type="int" access="field" column="id" node="id"/> + <property name="professionOrder" type="int" access="field" column="professionOrder" node="professionOrder"/> + <many-to-one name="activityMonth" class="fr.ifremer.wao.entity.ActivityMonthImpl" column="activityMonth" node="activityMonth/@topiaId" embed-xml="false"/> + <bag name="activityZone" inverse="true" order-by="zoneId" lazy="true" cascade="all,delete-orphan" node="activityZone" embed-xml="false"> + <key column="activityProfession"/> + <one-to-many class="fr.ifremer.wao.entity.ActivityZoneImpl" node="topiaId" embed-xml="false"/> + </bag> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityZoneImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityZoneImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ActivityZoneImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ActivityZoneImpl" table="activityZone" node="fr.ifremer.wao.entity.ActivityZoneImpl" abstract="false" proxy="fr.ifremer.wao.entity.ActivityZone" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="zoneCode" type="text" access="field" column="zoneCode" node="zoneCode"/> + <property name="zoneLibelle" type="text" access="field" column="zoneLibelle" node="zoneLibelle"/> + <property name="zoneId" type="int" access="field" column="zoneId" node="zoneId"/> + <property name="gradiantCode" type="int" access="field" column="gradiantCode" node="gradiantCode"/> + <property name="gradiantLibelle" type="text" access="field" column="gradiantLibelle" node="gradiantLibelle"/> + <many-to-one name="activityProfession" class="fr.ifremer.wao.entity.ActivityProfessionImpl" column="activityProfession" node="activityProfession/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.BoatImpl" table="boat" node="fr.ifremer.wao.entity.BoatImpl" abstract="false" proxy="fr.ifremer.wao.entity.Boat" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="immatriculation" type="int" access="field" column="immatriculation" node="immatriculation" index="boat_immatriculation_idx" unique="true"/> + <property name="name" type="text" access="field" column="name" node="name"/> + <property name="districtCode" type="text" access="field" column="districtCode" node="districtCode"/> + <property name="boatLength" type="int" access="field" column="boatLength" node="boatLength"/> + <property name="buildYear" type="int" access="field" column="buildYear" node="buildYear"/> + <property name="active" type="boolean" access="field" column="active" node="active"/> + <many-to-one name="shipOwner" class="fr.ifremer.wao.entity.ShipOwnerImpl" column="shipOwner" lazy="false" node="shipOwner/@topiaId" embed-xml="false"/> + <bag name="companyBoatInfos" inverse="true" lazy="true" cascade="all,delete-orphan" node="companyBoatInfos" embed-xml="false"> + <key column="boat"/> + <one-to-many class="fr.ifremer.wao.entity.BoatInfosImpl" node="topiaId" embed-xml="false"/> + </bag> + <bag name="activityCalendar" inverse="true" lazy="true" cascade="all,delete-orphan" node="activityCalendar" embed-xml="false"> + <key column="boat"/> + <one-to-many class="fr.ifremer.wao.entity.ActivityCalendarImpl" node="topiaId" embed-xml="false"/> + </bag> + <bag name="elligibleBoat" inverse="true" order-by="companyActive" lazy="true" node="elligibleBoat" embed-xml="false"> + <key column="boat"/> + <one-to-many class="fr.ifremer.wao.entity.ElligibleBoatImpl" node="topiaId" embed-xml="false"/> + </bag> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatInfosImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatInfosImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/BoatInfosImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.BoatInfosImpl" table="boatInfos" node="fr.ifremer.wao.entity.BoatInfosImpl" abstract="false" proxy="fr.ifremer.wao.entity.BoatInfos" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="contactFirstName" type="text" access="field" column="contactFirstName" node="contactFirstName"/> + <property name="contactLastName" type="text" access="field" column="contactLastName" node="contactLastName"/> + <property name="contactEmail" type="text" access="field" column="contactEmail" node="contactEmail"/> + <property name="contactPhoneNumber" type="text" access="field" column="contactPhoneNumber" node="contactPhoneNumber"/> + <property name="dup" type="java.lang.Integer" access="field" column="dup" node="dup"/> + <property name="comment" type="text" access="field" column="comment" node="comment"/> + <property name="contactAddress1" type="text" access="field" column="contactAddress1" node="contactAddress1"/> + <property name="contactAddress2" type="text" access="field" column="contactAddress2" node="contactAddress2"/> + <property name="contactCity" type="text" access="field" column="contactCity" node="contactCity"/> + <property name="contactPostalCode" type="java.lang.Integer" access="field" column="contactPostalCode" node="contactPostalCode"/> + <property name="contactSiret" type="text" access="field" column="contactSiret" node="contactSiret"/> + <many-to-one name="company" class="fr.ifremer.wao.entity.CompanyImpl" column="company" node="company/@topiaId" embed-xml="false" /> + <many-to-one name="boat" class="fr.ifremer.wao.entity.BoatImpl" column="boat" node="boat/@topiaId" embed-xml="false" /> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/CompanyImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/CompanyImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/CompanyImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.CompanyImpl" table="company" node="fr.ifremer.wao.entity.CompanyImpl" abstract="false" proxy="fr.ifremer.wao.entity.Company" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="name" type="text" access="field" column="name" node="name"/> + <property name="phoneNumber" type="text" access="field" column="phoneNumber" node="phoneNumber"/> + <property name="address1" type="text" access="field" column="address1" node="address1"/> + <property name="address2" type="text" access="field" column="address2" node="address2"/> + <property name="active" type="boolean" access="field" column="active" node="active"/> + <property name="email" type="text" access="field" column="email" node="email"/> + <property name="city" type="text" access="field" column="city" node="city"/> + <property name="postalCode" type="int" access="field" column="postalCode" node="postalCode"/> + <bag name="waoUser" inverse="true" lazy="true" cascade="all,delete-orphan" node="waoUser" embed-xml="false"> + <key column="company"/> + <one-to-many class="fr.ifremer.wao.entity.WaoUserImpl" node="topiaId" embed-xml="false"/> + </bag> + <bag name="boatBoatInfos" inverse="true" lazy="true" cascade="all,delete-orphan" node="boatBoatInfos" embed-xml="false"> + <key column="company"/> + <one-to-many class="fr.ifremer.wao.entity.BoatInfosImpl" node="topiaId" embed-xml="false"/> + </bag> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ContactImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ContactImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ContactImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ContactImpl" table="contact" node="fr.ifremer.wao.entity.ContactImpl" abstract="false" proxy="fr.ifremer.wao.entity.Contact" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="tideBeginDate" type="java.util.Date" access="field" column="tideBeginDate" node="tideBeginDate"/> + <property name="tideEndDate" type="java.util.Date" access="field" column="tideEndDate" node="tideEndDate"/> + <property name="nbObservants" type="int" access="field" column="nbObservants" node="nbObservants"/> + <property name="mammalsObservation" type="boolean" access="field" column="mammalsObservation" node="mammalsObservation"/> + <property name="mammalsCapture" type="boolean" access="field" column="mammalsCapture" node="mammalsCapture"/> + <property name="validationProgram" type="java.lang.Boolean" access="field" column="validationProgram" node="validationProgram"/> + <property name="validationCompany" type="java.lang.Boolean" access="field" column="validationCompany" node="validationCompany"/> + <property name="dataInputDate" type="java.util.Date" access="field" column="dataInputDate" node="dataInputDate"/> + <property name="comment" type="text" access="field" column="comment" node="comment"/> + <property name="state" type="int" access="field" column="state" node="state"/> + <property name="tideNbDays" type="int" access="field" column="tideNbDays" node="tideNbDays"/> + <many-to-one name="observer" class="fr.ifremer.wao.entity.WaoUserImpl" column="observer" node="observer/@topiaId" embed-xml="false"/> + <many-to-one name="sampleRow" class="fr.ifremer.wao.entity.SampleRowImpl" column="sampleRow" lazy="false" node="sampleRow/@topiaId" embed-xml="false"/> + <many-to-one name="boat" class="fr.ifremer.wao.entity.BoatImpl" column="boat" lazy="false" node="boat/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ElligibleBoatImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ElligibleBoatImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ElligibleBoatImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ElligibleBoatImpl" table="elligibleBoat" node="fr.ifremer.wao.entity.ElligibleBoatImpl" abstract="false" proxy="fr.ifremer.wao.entity.ElligibleBoat" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="globalActive" type="boolean" access="field" column="globalActive" node="globalActive"/> + <property name="companyActive" type="java.lang.Boolean" access="field" column="companyActive" node="companyActive"/> + <many-to-one name="boat" class="fr.ifremer.wao.entity.BoatImpl" column="boat" lazy="false" node="boat/@topiaId" embed-xml="false"/> + <many-to-one name="sampleRow" class="fr.ifremer.wao.entity.SampleRowImpl" column="sampleRow" node="sampleRow/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/FishingZoneImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/FishingZoneImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/FishingZoneImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.FishingZoneImpl" table="fishingZone" node="fr.ifremer.wao.entity.FishingZoneImpl" abstract="false" proxy="fr.ifremer.wao.entity.FishingZone" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="sectorName" type="text" access="field" column="sectorName" node="sectorName"/> + <property name="facadeName" type="text" access="field" column="facadeName" node="facadeName"/> + <property name="districtCode" type="text" access="field" column="districtCode" node="districtCode"/> + <bag name="sampleRow" table="fishingzone_samplerow" inverse="true" lazy="true" node="sampleRow" embed-xml="true"> + <key column="fishingZone"/> + <many-to-many class="fr.ifremer.wao.entity.SampleRowImpl" column="sampleRow" order-by="code" node="topiaId"/> + </bag> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/NewsImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/NewsImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/NewsImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.NewsImpl" table="news" node="fr.ifremer.wao.entity.NewsImpl" abstract="false" proxy="fr.ifremer.wao.entity.News" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="title" type="text" access="field" column="title" node="title"/> + <property name="content" type="text" access="field" column="content" node="content"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ProfessionImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ProfessionImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ProfessionImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ProfessionImpl" table="profession" node="fr.ifremer.wao.entity.ProfessionImpl" abstract="false" proxy="fr.ifremer.wao.entity.Profession" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="codeDCF5" type="text" access="field" column="codeDCF5" node="codeDCF5"/> + <property name="meshSize" type="text" access="field" column="meshSize" node="meshSize"/> + <property name="size" type="text" access="field" column="size" node="size"/> + <property name="other" type="text" access="field" column="other" node="other"/> + <property name="libelle" type="text" access="field" column="libelle" node="libelle"/> + <property name="species" type="text" access="field" column="species" node="species"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleMonthImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleMonthImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleMonthImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.SampleMonthImpl" table="sampleMonth" node="fr.ifremer.wao.entity.SampleMonthImpl" abstract="false" proxy="fr.ifremer.wao.entity.SampleMonth" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="realTidesValue" type="int" access="field" column="realTidesValue" node="realTidesValue"/> + <property name="expectedTidesValue" type="int" access="field" column="expectedTidesValue" node="expectedTidesValue"/> + <property name="periodDate" type="java.util.Date" access="field" column="periodDate" node="periodDate"/> + <many-to-one name="sampleRow" class="fr.ifremer.wao.entity.SampleRowImpl" column="sampleRow" node="sampleRow/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.SampleRowImpl" table="sampleRow" node="fr.ifremer.wao.entity.SampleRowImpl" abstract="false" proxy="fr.ifremer.wao.entity.SampleRow" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="nbObservants" type="int" access="field" column="nbObservants" node="nbObservants"/> + <property name="averageTideTime" type="double" access="field" column="averageTideTime" node="averageTideTime"/> + <property name="code" type="text" access="field" column="code" node="code" index="sampleRow_code_idx" unique="true"/> + <property name="fishingZonesInfos" type="text" access="field" column="fishingZonesInfos" node="fishingZonesInfos"/> + <property name="comment" type="text" access="field" column="comment" node="comment"/> + <property name="programName" type="text" access="field" column="programName" node="programName"/> + <property name="periodBegin" type="java.util.Date" access="field" column="periodBegin" node="periodBegin"/> + <property name="periodEnd" type="java.util.Date" access="field" column="periodEnd" node="periodEnd"/> + <many-to-one name="profession" class="fr.ifremer.wao.entity.ProfessionImpl" column="profession" lazy="false" node="profession/@topiaId" embed-xml="false"/> + <bag name="sampleMonth" inverse="true" order-by="periodDate" lazy="true" cascade="all,delete-orphan" node="sampleMonth" embed-xml="false"> + <key column="sampleRow"/> + <one-to-many class="fr.ifremer.wao.entity.SampleMonthImpl" node="topiaId" embed-xml="false"/> + </bag> + <many-to-one name="company" class="fr.ifremer.wao.entity.CompanyImpl" column="company" lazy="false" node="company/@topiaId" embed-xml="false"/> + <bag name="sampleRowLog" inverse="true" order-by="topiaCreateDate desc" lazy="true" cascade="all,delete-orphan" node="sampleRowLog" embed-xml="false"> + <key column="sampleRow"/> + <one-to-many class="fr.ifremer.wao.entity.SampleRowLogImpl" node="topiaId" embed-xml="false"/> + </bag> + <bag name="elligibleBoat" inverse="true" order-by="companyActive" lazy="true" cascade="all,delete-orphan" node="elligibleBoat" embed-xml="false"> + <key column="sampleRow"/> + <one-to-many class="fr.ifremer.wao.entity.ElligibleBoatImpl" node="topiaId" embed-xml="false"/> + </bag> + <bag name="fishingZone" table="fishingzone_samplerow" lazy="false" node="fishingZone" embed-xml="true"> + <key column="sampleRow"/> + <many-to-many class="fr.ifremer.wao.entity.FishingZoneImpl" column="fishingZone" order-by="facadeName,sectorName,districtCode" node="topiaId"/> + </bag> + <bag name="contact" inverse="true" lazy="true" node="contact" embed-xml="false"> + <key column="sampleRow"/> + <one-to-many class="fr.ifremer.wao.entity.ContactImpl" node="topiaId" embed-xml="false"/> + </bag> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowLogImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowLogImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/SampleRowLogImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.SampleRowLogImpl" table="sampleRowLog" node="fr.ifremer.wao.entity.SampleRowLogImpl" abstract="false" proxy="fr.ifremer.wao.entity.SampleRowLog" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="logText" type="text" access="field" column="logText" node="logText"/> + <property name="comment" type="text" access="field" column="comment" node="comment"/> + <many-to-one name="sampleRow" class="fr.ifremer.wao.entity.SampleRowImpl" column="sampleRow" node="sampleRow/@topiaId" embed-xml="false"/> + <many-to-one name="author" class="fr.ifremer.wao.entity.WaoUserImpl" column="author" lazy="false" node="author/@topiaId" embed-xml="false"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ShipOwnerImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ShipOwnerImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/ShipOwnerImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.ShipOwnerImpl" table="shipOwner" node="fr.ifremer.wao.entity.ShipOwnerImpl" abstract="false" proxy="fr.ifremer.wao.entity.ShipOwner" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="code" type="text" access="field" column="code" node="code" index="shipOwner_code_idx" unique="true"/> + <property name="firstName" type="text" access="field" column="firstName" node="firstName"/> + <property name="lastName" type="text" access="field" column="lastName" node="lastName"/> + </class> +</hibernate-mapping> Added: trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/WaoUserImpl.hbm.xml =================================================================== --- trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/WaoUserImpl.hbm.xml (rev 0) +++ trunk/wao-business/src/main/resources/oldmappings/Wao/1.2/fr/ifremer/wao/entity/WaoUserImpl.hbm.xml 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> +<hibernate-mapping default-access="field" auto-import="true" package="fr.ifremer.wao.entity"> + <class name="fr.ifremer.wao.entity.WaoUserImpl" table="waoUser" node="fr.ifremer.wao.entity.WaoUserImpl" abstract="false" proxy="fr.ifremer.wao.entity.WaoUser" > + <id name="topiaId" type="string" length="255" node="@topiaId"/> + <version name="topiaVersion" type="long" node="@topiaVersion"/> + <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> + <property name="firstName" type="text" access="field" column="firstName" node="firstName"/> + <property name="lastName" type="text" access="field" column="lastName" node="lastName"/> + <property name="phoneNumber" type="text" access="field" column="phoneNumber" node="phoneNumber"/> + <property name="login" type="text" access="field" column="login" node="login"/> + <property name="password" type="text" access="field" column="password" node="password"/> + <property name="active" type="boolean" access="field" column="active" node="active"/> + <property name="role" type="int" access="field" column="role" node="role"/> + <property name="readOnly" type="boolean" access="field" column="readOnly" node="readOnly"/> + <many-to-one name="company" class="fr.ifremer.wao.entity.CompanyImpl" column="company" node="company/@topiaId" embed-xml="false"/> + <bag name="contact" inverse="true" lazy="true" node="contact" embed-xml="false"> + <key column="observer"/> + <one-to-many class="fr.ifremer.wao.entity.ContactImpl" node="topiaId" embed-xml="false"/> + </bag> + </class> +</hibernate-mapping> Modified: trunk/wao-business/src/main/xmi/wao.zargo =================================================================== (Binary files differ) Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/BusinessUtils.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/BusinessUtils.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/data/BusinessUtils.java 2010-04-08 17:14:03 UTC (rev 437) @@ -149,43 +149,4 @@ } return result; } - - public static String[] getErrorMessages(WaoException eee, Messages messages, - Logger logger) { - - String[] results = null; - String cause = null; - if (eee.getCause() != null) { - cause = eee.getCause().getClass().getSimpleName() + - " : " + eee.getCause().getMessage(); - results = new String[2]; - results[1] = cause; - } else { - results = new String[1]; - } - - - if (logger.isDebugEnabled()) { - logger.debug("ERROR from business : " + eee.getMessage() + - " _ args = " + eee.getArgs()); - if (cause != null) { - logger.debug("ERROR caused by : " + cause); - } - } - - if (eee.getArgs() != null) { - results[0] = messages.format(eee.getMessage(), eee.getArgs()); - } else { - results[0] = messages.get(eee.getMessage()); - } - return results; - } - - public static String getErrorMessage(WaoBusinessException eee, Messages messages, - Logger logger) { - if (logger.isDebugEnabled()) { - logger.debug("ERROR from business : " + eee.getMessage()); - } - return eee.getMessage(); - } } Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Administration.java 2010-04-08 17:14:03 UTC (rev 437) @@ -32,7 +32,7 @@ import fr.ifremer.wao.ui.base.GenericSelectModel; import fr.ifremer.wao.ui.base.WaoPage; import fr.ifremer.wao.ui.components.Layout; -import fr.ifremer.wao.ui.data.BusinessUtils; +import fr.ifremer.wao.ui.services.WaoManager; import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.tapestry5.EventContext; @@ -155,6 +155,9 @@ @Inject private Messages messages; + @Inject + private WaoManager manager; + @Log void onSuccessFromImportFishingZones() { try { @@ -163,7 +166,7 @@ layout.addInfo(result + " zones de pêche importées"); } catch (WaoException eee) { String[] errors = - BusinessUtils.getErrorMessages(eee, messages, log); + manager.getErrorMessages(eee, messages, log); layout.addError(errors); } } Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Boats.java 2010-04-08 17:14:03 UTC (rev 437) @@ -23,11 +23,11 @@ import fr.ifremer.wao.WaoBusinessException; import fr.ifremer.wao.WaoException; -import fr.ifremer.wao.WaoException; import fr.ifremer.wao.bean.BoatFilterImpl; import fr.ifremer.wao.entity.Boat; import fr.ifremer.wao.bean.BoatFilter; import fr.ifremer.wao.bean.CompanyBoatInfos; +import fr.ifremer.wao.bean.SamplingFilter; import fr.ifremer.wao.entity.BoatInfos; import fr.ifremer.wao.entity.Company; import fr.ifremer.wao.entity.Contact; @@ -215,7 +215,7 @@ result[1] + " nouveaux"); } catch (WaoBusinessException eee) { String error = - BusinessUtils.getErrorMessage(eee, messages, log); + manager.getErrorMessage(eee, messages, log); layout.addError(error); } } @@ -352,7 +352,11 @@ * @see AbstractFilteredPage */ @Override - public BoatFilter getFilter() throws WaoException { + public SamplingFilter getFilter() throws WaoException { + return getBoatFilter(); + } + + public BoatFilter getBoatFilter() throws WaoException { if (boatFilter == null) { if (log.isDebugEnabled()) { log.debug("Create filter"); @@ -493,7 +497,7 @@ */ public BoatDataSource getBoats() throws WaoException { if (boats == null) { - boats = new BoatDataSource(getFilter(), serviceBoat); + boats = new BoatDataSource(getBoatFilter(), serviceBoat); } return boats; } @@ -538,7 +542,7 @@ if (log.isDebugEnabled()) { log.debug("Filter sampleRow : " + getFilter().getSampleRow()); } - result = serviceBoat.exportBoatCsv(getFilter()); + result = serviceBoat.exportBoatCsv(getBoatFilter()); } catch (WaoException eee) { throw new IOException(eee); } Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/ExceptionReport.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/ExceptionReport.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/ExceptionReport.java 2010-04-08 17:14:03 UTC (rev 437) @@ -24,7 +24,7 @@ import fr.ifremer.wao.WaoException; import fr.ifremer.wao.ui.base.WaoPage; import fr.ifremer.wao.ui.components.Layout; -import fr.ifremer.wao.ui.data.BusinessUtils; +import fr.ifremer.wao.ui.services.WaoManager; import org.apache.tapestry5.annotations.InjectComponent; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.Messages; @@ -63,31 +63,30 @@ @Inject private Messages messages; + @Inject + private WaoManager manager; + @Property private Throwable exception; @Override public void reportException(Throwable eee) { -// this.exception = getWaoExceptionO(eee); -// if (exception != null) { -// layout.addError(exception.getMessage()); -// this.exception = exception.getCause(); -// layout.addError("Erreur : " + this.exception.getClass().getSimpleName() -// + " : " + this.exception.getMessage()); -// } else { - exception = getWaoException(eee); - if (exception != null) { - String[] errors = - BusinessUtils.getErrorMessages( - (WaoException)exception, messages, log); - layout.addError(errors); - } else { - log.error("Unexpected exception", eee); - layout.addError("Erreur : " + - eee.getClass().getSimpleName() - + " : " + eee.getMessage()); - } -// } + exception = getWaoException(eee); + if (exception != null) { + String[] errors = + manager.getErrorMessages( + (WaoException)exception, messages, log); + layout.addError(errors); + // Show other errors only in dev environment + } else if (manager.isDevEnvironment()) { + log.error("Unexpected exception", eee); + layout.addError("Erreur : " + + eee.getClass().getSimpleName() + " : " + eee.getMessage()); + } else { + layout.addError("Une erreur inattendue vient de se produire. " + + "Veuillez recharger la page. Contactez un administrateur " + + "si ce message continue de s'afficher."); + } } protected Throwable getWaoException(Throwable eee) { @@ -99,15 +98,5 @@ } return getWaoException(eee.getCause()); } - -// protected Throwable getWaoExceptionO(Throwable eee) { -// if (eee == null) { -// return eee; -// } -// if (eee instanceof WaoExceptionO) { -// return eee; -// } -// return getWaoExceptionO(eee.getCause()); -// } } Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/services/WaoManager.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/services/WaoManager.java 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/services/WaoManager.java 2010-04-08 17:14:03 UTC (rev 437) @@ -21,10 +21,13 @@ package fr.ifremer.wao.ui.services; +import fr.ifremer.wao.WaoBusinessException; import fr.ifremer.wao.WaoContext; +import fr.ifremer.wao.WaoException; import fr.ifremer.wao.WaoProperty; import fr.ifremer.wao.service.ServiceUser; import java.util.Date; +import org.apache.tapestry5.ioc.Messages; import org.apache.tapestry5.ioc.services.RegistryShutdownListener; import org.nuiton.util.ApplicationConfig; import org.slf4j.Logger; @@ -110,6 +113,50 @@ return context.getCurrentDate(); } + public boolean isDevEnvironment() { + return log.isDebugEnabled(); + } + + public String[] getErrorMessages(WaoException eee, Messages messages, + Logger logger) { + + String[] results = null; + String cause = null; + // Only show cause on dev environment + if (eee.getCause() != null && isDevEnvironment()) { + cause = eee.getCause().getClass().getSimpleName() + + " : " + eee.getCause().getMessage(); + results = new String[2]; + results[1] = cause; + } else { + results = new String[1]; + } + + + if (logger.isDebugEnabled()) { + logger.debug("ERROR from business : " + eee.getMessage() + + " _ args = " + eee.getArgs()); + if (cause != null) { + logger.debug("ERROR caused by : " + cause); + } + } + + if (eee.getArgs() != null) { + results[0] = messages.format(eee.getMessage(), eee.getArgs()); + } else { + results[0] = messages.get(eee.getMessage()); + } + return results; + } + + public String getErrorMessage(WaoBusinessException eee, Messages messages, + Logger logger) { + if (logger.isDebugEnabled()) { + logger.debug("ERROR from business : " + eee.getMessage()); + } + return eee.getMessage(); + } + } Modified: trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Boats.properties =================================================================== --- trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Boats.properties 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/resources/fr/ifremer/wao/ui/pages/Boats.properties 2010-04-08 17:14:03 UTC (rev 437) @@ -26,6 +26,12 @@ contactLastName-label: Nom contactPhoneNumber-label: T\u00E9l\u00E9phone contactEmail-label: E-mail +contactAddress1-label: Adresse +contactAddress2-label: Compl\u00E9ment d'adresse +contactCity-label: Ville +contactPostalCode-label: Code postal +contactPostalCode-validate: Le code postal doit avoir une valeur num\u00E9rique +contactSiret-label: N\u00B0 SIRET shipOwner-label: Armateur fromDate-label: Sollicitations du navire depuis le dup-label: Capacit\u00E9 d'accueil du navire en personnels sp\u00E9cialis\u00E9s Added: trunk/wao-ui/src/main/resources/org/apache/tapestry5/internal/ValidationMessages_fr.properties =================================================================== --- trunk/wao-ui/src/main/resources/org/apache/tapestry5/internal/ValidationMessages_fr.properties (rev 0) +++ trunk/wao-ui/src/main/resources/org/apache/tapestry5/internal/ValidationMessages_fr.properties 2010-04-08 17:14:03 UTC (rev 437) @@ -0,0 +1,10 @@ +required=Le champs %s est requis. +minimum-string-length=Le champs %2$s doit contenir plus de %1$d caract\u00E8res. +maximum-string-length=Le champs %2$s est limit\u00E9 \u00E0 %1$d caract\u00E8res. +min-integer=Le champs %2$s doit avoir une valeur sup\u00E9rieure \u00E0 %1$d. +max-integer=Le champs %2$s doit avoir une valeur inf\u00E9rieure \u00E0 %1$d. +regexp=Le champs %2$s ne correspond pas \u00E0 l'expression '%1$s'. +invalid-email='%s' n'est pas une adresse email valide. +integer-format-exception=Vous devez fournir un nombre entier pour %s. +number-format-exception=Vous devez fournir une valeur num\u00E9rique pour %s. + Modified: trunk/wao-ui/src/main/webapp/Boats.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Boats.tml 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/webapp/Boats.tml 2010-04-08 17:14:03 UTC (rev 437) @@ -93,11 +93,11 @@ <!-- Boat filter --> <t:label t:for="boatName" /> <span> nom </span> - <input t:type="textfield" t:id="boatName" class="width150" t:value="filter.boatName" t:mixins="Autocomplete" /> + <input t:type="textfield" t:id="boatName" class="width150" t:value="boatFilter.boatName" t:mixins="Autocomplete" /> <span> immatriculation </span> - <input t:type="textfield" t:id="boatImmatriculation" class="width50" t:value="filter.boatImmatriculation" /> + <input t:type="textfield" t:id="boatImmatriculation" class="width50" t:value="boatFilter.boatImmatriculation" /> <span> code quartier </span> - <input t:type="textfield" t:id="boatDistrictCode" class="width50" t:value="filter.boatDistrictCode" /> + <input t:type="textfield" t:id="boatDistrictCode" class="width50" t:value="boatFilter.boatDistrictCode" /> </div> <div class="t-beaneditor-row aright"> <input t:type="submit" class="ico search-32px" t:id="search" value="Search" title="Rechercher les navires correspondants aux filtres saisies" /> @@ -226,7 +226,8 @@ <fieldset id="so-boats-boat-infos-contact"> <legend>Contact</legend> <div t:type="beandisplay" t:id="boatInfosContact" t:object="boatInfos" - t:include="contactFirstName, contactLastName, contactPhoneNumber, contactEmail" /> + t:include="contactFirstName, contactLastName, contactPhoneNumber, contactEmail, + contactAddress1, contactAddress2, contactPostalCode, contactCity, contactSiret" /> </fieldset> @@ -322,7 +323,8 @@ <legend>Contact</legend> <div class="t-beaneditor"> <t:beaneditor t:id="editBoatInfosContact" t:object="boatInfos" - t:include="contactFirstName, contactLastName, contactPhoneNumber, contactEmail" /> + t:include="contactFirstName, contactLastName, contactPhoneNumber, contactEmail, + contactAddress1, contactAddress2, contactPostalCode, contactCity, contactSiret" /> </div> </fieldset> Modified: trunk/wao-ui/src/main/webapp/css/boats.css =================================================================== --- trunk/wao-ui/src/main/webapp/css/boats.css 2010-04-08 16:07:20 UTC (rev 436) +++ trunk/wao-ui/src/main/webapp/css/boats.css 2010-04-08 17:14:03 UTC (rev 437) @@ -110,9 +110,14 @@ fieldset#so-boats-boat-infos-lastcontact dl.t-beandisplay dt, fieldset#so-boats-boat-infos-contact dl.t-beandisplay dt { padding-right: 20px; - width: 100px; + width: 150px; + font-size: 0.8em; } +fieldset#so-boats-boat-infos-contact div.t-beaneditor label { + width: 150px; +} + fieldset#so-boats-boat-infos-boarding ul li { list-style-type:square; margin-left: 20px; Added: trunk/wao-ui/src/main/webapp/img/sample-table.png =================================================================== (Binary files differ) Property changes on: trunk/wao-ui/src/main/webapp/img/sample-table.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
participants (1)
-
fdesbois@users.labs.libre-entreprise.org