Topia-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 4806 discussions
r1751 - in trunk: . topia-persistence topia-service-history topia-service-index topia-service-migration topia-service-replication topia-service-security topia-soa
by fdesbois@users.nuiton.org 06 Jan '10
by fdesbois@users.nuiton.org 06 Jan '10
06 Jan '10
Author: fdesbois
Date: 2010-01-06 16:48:49 +0100 (Wed, 06 Jan 2010)
New Revision: 1751
Modified:
trunk/pom.xml
trunk/topia-persistence/pom.xml
trunk/topia-service-history/pom.xml
trunk/topia-service-index/pom.xml
trunk/topia-service-migration/pom.xml
trunk/topia-service-replication/pom.xml
trunk/topia-service-security/pom.xml
trunk/topia-soa/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -13,7 +13,7 @@
</parent>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
<modules>
<module>topia-persistence</module>
@@ -360,9 +360,9 @@
<!-- Source control management. -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/topia/tags/topia-2.3.0-beta-3</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/topia/tags/topia-2.3.0-beta-3</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/topia/tags/topia-2.3.0-beta-3</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/topia/trunk</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/topia/trunk</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/topia/trunk</url>
</scm>
</project>
Modified: trunk/topia-persistence/pom.xml
===================================================================
--- trunk/topia-persistence/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-persistence/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-history/pom.xml
===================================================================
--- trunk/topia-service-history/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-service-history/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-index/pom.xml
===================================================================
--- trunk/topia-service-index/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-service-index/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-migration/pom.xml
===================================================================
--- trunk/topia-service-migration/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-service-migration/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-replication/pom.xml
===================================================================
--- trunk/topia-service-replication/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-service-replication/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-security/pom.xml
===================================================================
--- trunk/topia-service-security/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-service-security/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-soa/pom.xml
===================================================================
--- trunk/topia-soa/pom.xml 2010-01-06 15:48:43 UTC (rev 1750)
+++ trunk/topia-soa/pom.xml 2010-01-06 15:48:49 UTC (rev 1751)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3</version>
+ <version>2.3.0-beta-4-SNAPSHOT</version>
</parent>
<groupId>org.nuiton.topia</groupId>
1
0
Author: fdesbois
Date: 2010-01-06 16:48:43 +0100 (Wed, 06 Jan 2010)
New Revision: 1750
Added:
tags/topia-2.3.0-beta-3/
Log:
[maven-scm] copy for tag topia-2.3.0-beta-3
Property changes on: tags/topia-2.3.0-beta-3
___________________________________________________________________
Added: svn:ignore
+ *.ipr
*.iws
.classpath
*.iml
.project
target
.settings
Added: svn:mergeinfo
+ /branches/from2.2.2-eugene2-beta:1662-1714
1
0
r1749 - in trunk: . topia-persistence topia-service-history topia-service-index topia-service-migration topia-service-replication topia-service-security topia-soa
by fdesbois@users.nuiton.org 06 Jan '10
by fdesbois@users.nuiton.org 06 Jan '10
06 Jan '10
Author: fdesbois
Date: 2010-01-06 16:48:40 +0100 (Wed, 06 Jan 2010)
New Revision: 1749
Modified:
trunk/pom.xml
trunk/topia-persistence/pom.xml
trunk/topia-service-history/pom.xml
trunk/topia-service-index/pom.xml
trunk/topia-service-migration/pom.xml
trunk/topia-service-replication/pom.xml
trunk/topia-service-security/pom.xml
trunk/topia-soa/pom.xml
Log:
[maven-release-plugin] prepare release topia-2.3.0-beta-3
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -13,7 +13,7 @@
</parent>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
<modules>
<module>topia-persistence</module>
@@ -360,9 +360,9 @@
<!-- Source control management. -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/topia/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/topia/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/topia/trunk</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/topia/tags/topia-2.3.0-beta-3</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/topia/tags/topia-2.3.0-beta-3</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/topia/tags/topia-2.3.0-beta-3</url>
</scm>
</project>
Modified: trunk/topia-persistence/pom.xml
===================================================================
--- trunk/topia-persistence/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-persistence/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-history/pom.xml
===================================================================
--- trunk/topia-service-history/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-service-history/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-index/pom.xml
===================================================================
--- trunk/topia-service-index/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-service-index/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-migration/pom.xml
===================================================================
--- trunk/topia-service-migration/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-service-migration/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-replication/pom.xml
===================================================================
--- trunk/topia-service-replication/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-service-replication/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-service-security/pom.xml
===================================================================
--- trunk/topia-service-security/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-service-security/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
Modified: trunk/topia-soa/pom.xml
===================================================================
--- trunk/topia-soa/pom.xml 2010-01-06 15:42:04 UTC (rev 1748)
+++ trunk/topia-soa/pom.xml 2010-01-06 15:48:40 UTC (rev 1749)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>topia</artifactId>
- <version>2.3.0-beta-3-SNAPSHOT</version>
+ <version>2.3.0-beta-3</version>
</parent>
<groupId>org.nuiton.topia</groupId>
1
0
Author: fdesbois
Date: 2010-01-06 16:42:04 +0100 (Wed, 06 Jan 2010)
New Revision: 1748
Added:
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/entities/
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
Modified:
trunk/topia-service-history/src/main/xmi/TopiaHistory.zargo
trunk/topia-service-security/src/main/xmi/TopiaSecurity.zargo
Log:
change model version to 1.1 (change mapping from #177)
Added: trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
===================================================================
--- trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml (rev 0)
+++ trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1.1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,14 @@
+<?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="org.nuiton.topia.history.entities">
+ <class name="org.nuiton.topia.history.entities.HistoryImpl" table="history" node="org.nuiton.topia.history.entities.HistoryImpl" abstract="false" proxy="org.nuiton.topia.history.entities.History" >
+ <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="actionDate" type="java.util.Date" access="field" column="actionDate" node="actionDate"/>
+ <property name="userId" type="text" access="field" column="userId" node="userId"/>
+ <property name="action" type="int" access="field" column="action" node="action"/>
+ <property name="type" type="text" access="field" column="type" node="type"/>
+ <property name="target" type="text" access="field" column="target" node="target"/>
+ </class>
+</hibernate-mapping>
Modified: trunk/topia-service-history/src/main/xmi/TopiaHistory.zargo
===================================================================
(Binary files differ)
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAssociationAuthorizationImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -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="org.nuiton.topia.security.entities.authorization">
+ <union-subclass name="org.nuiton.topia.security.entities.authorization.TopiaAssociationAuthorizationImpl" extends="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" table="topiaAssociationAuthorization" node="org.nuiton.topia.security.entities.authorization.TopiaAssociationAuthorizationImpl" abstract="false" proxy="org.nuiton.topia.security.entities.authorization.TopiaAssociationAuthorization" >
+ <!--key column="topiaId"/-->
+ <property name="idBeginAssociation" type="text" access="field" column="idBeginAssociation" node="idBeginAssociation"/>
+ <property name="nameAssociation" type="text" access="field" column="nameAssociation" node="nameAssociation"/>
+ <property name="actions" type="int" access="field" column="actions" node="actions"/>
+ <property name="principals" type="serializable" access="field" column="principals" node="principals"/>
+ </union-subclass>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,9 @@
+<?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="org.nuiton.topia.security.entities.authorization">
+ <class name="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" table="topiaAuthorization" node="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" abstract="true" proxy="org.nuiton.topia.security.entities.authorization.TopiaAuthorization" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaEntityAuthorizationImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,10 @@
+<?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="org.nuiton.topia.security.entities.authorization">
+ <union-subclass name="org.nuiton.topia.security.entities.authorization.TopiaEntityAuthorizationImpl" extends="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" table="topiaEntityAuthorization" node="org.nuiton.topia.security.entities.authorization.TopiaEntityAuthorizationImpl" abstract="false" proxy="org.nuiton.topia.security.entities.authorization.TopiaEntityAuthorization" >
+ <!--key column="topiaId"/-->
+ <property name="expression" type="text" access="field" column="expression" node="expression"/>
+ <property name="actions" type="int" access="field" column="actions" node="actions"/>
+ <property name="principals" type="serializable" access="field" column="principals" node="principals"/>
+ </union-subclass>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -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="org.nuiton.topia.security.entities.authorization">
+ <class name="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" table="topiaExpressionLink" node="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" abstract="false" proxy="org.nuiton.topia.security.entities.authorization.TopiaExpressionLink" >
+ <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="replace" type="text" access="field" column="replace" node="replace"/>
+ <property name="by" type="text" access="field" column="by" node="by"/>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,20 @@
+<?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="org.nuiton.topia.security.entities.user">
+ <class name="org.nuiton.topia.security.entities.user.TopiaGroupImpl" table="topiaGroup" node="org.nuiton.topia.security.entities.user.TopiaGroupImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaGroup" >
+ <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="description" type="text" access="field" column="description" node="description"/>
+ <bag name="topiaUser" table="topiagroup_topiauser" lazy="true" node="topiaUser" embed-xml="true">
+ <key column="topiaGroup"/>
+ <many-to-many class="org.nuiton.topia.security.entities.user.TopiaUserImpl" column="topiaUser" node="topiaId"/>
+ </bag>
+ <many-to-one name="superGroup" class="org.nuiton.topia.security.entities.user.TopiaGroupImpl" column="superGroup" node="superGroup/@topiaId" embed-xml="false"/>
+ <bag name="subGroup" inverse="true" lazy="true" node="subGroup" embed-xml="false">
+ <key column="superGroup"/>
+ <one-to-many class="org.nuiton.topia.security.entities.user.TopiaGroupImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -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="org.nuiton.topia.security.entities.user">
+ <class name="org.nuiton.topia.security.entities.user.TopiaUserImpl" table="topiaUser" node="org.nuiton.topia.security.entities.user.TopiaUserImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaUser" >
+ <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="login" type="text" access="field" column="login" node="login"/>
+ <property name="email" type="text" access="field" column="email" node="email"/>
+ <property name="password" type="text" access="field" column="password" node="password"/>
+ <property name="note" type="text" access="field" column="note" node="note"/>
+ <property name="linkApplication" type="text" access="field" column="linkApplication" node="linkApplication"/>
+ <bag name="topiaGroup" table="topiagroup_topiauser" inverse="true" lazy="true" node="topiaGroup" embed-xml="true">
+ <key column="topiaUser"/>
+ <many-to-many class="org.nuiton.topia.security.entities.user.TopiaGroupImpl" column="topiaGroup" node="topiaId"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -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="org.nuiton.topia.taas.entities">
+ <class name="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" table="taasAuthorization" node="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasAuthorization" >
+ <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="expression" type="text" access="field" column="expression" node="expression"/>
+ <property name="actions" type="int" access="field" column="actions" node="actions"/>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,14 @@
+<?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="org.nuiton.topia.taas.entities">
+ <class name="org.nuiton.topia.taas.entities.TaasPrincipalImpl" table="taasPrincipal" node="org.nuiton.topia.taas.entities.TaasPrincipalImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasPrincipal" >
+ <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"/>
+ <bag name="authorizations" table="authorizations_principals" lazy="false" node="authorizations" embed-xml="true">
+ <key column="principals"/>
+ <many-to-many class="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" column="authorizations" node="topiaId"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml (rev 0)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1.1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml 2010-01-06 15:42:04 UTC (rev 1748)
@@ -0,0 +1,20 @@
+<?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="org.nuiton.topia.taas.entities">
+ <class name="org.nuiton.topia.taas.entities.TaasUserImpl" table="taasUser" node="org.nuiton.topia.taas.entities.TaasUserImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasUser" >
+ <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="login" type="text" access="field" column="login" node="login"/>
+ <property name="password" type="text" access="field" column="password" node="password"/>
+ <property name="email" type="text" access="field" column="email" node="email"/>
+ <property name="enabled" type="boolean" access="field" column="enabled" node="enabled"/>
+ <property name="lastConnectionDate" type="java.util.Date" access="field" column="lastConnectionDate" node="lastConnectionDate"/>
+ <property name="numberOfConnection" type="int" access="field" column="numberOfConnection" node="numberOfConnection"/>
+ <property name="link" type="text" access="field" column="link" node="link"/>
+ <bag name="principals" table="principals_users" lazy="true" node="principals" embed-xml="true">
+ <key column="users"/>
+ <many-to-many class="org.nuiton.topia.taas.entities.TaasPrincipalImpl" column="principals" node="topiaId"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Modified: trunk/topia-service-security/src/main/xmi/TopiaSecurity.zargo
===================================================================
(Binary files differ)
1
0
06 Jan '10
Author: fdesbois
Date: 2010-01-06 16:38:11 +0100 (Wed, 06 Jan 2010)
New Revision: 1747
Modified:
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
Log:
revert from previous version mappings
Modified: trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
===================================================================
--- trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.history.entities.HistoryImpl" table="history" node="org.nuiton.topia.history.entities.HistoryImpl" abstract="false" proxy="org.nuiton.topia.history.entities.History" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="actionDate" type="java.util.Date" access="field" column="actionDate" node="actionDate"/>
<property name="userId" type="text" access="field" column="userId" node="userId"/>
<property name="action" type="int" access="field" column="action" node="action"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,6 +4,6 @@
<class name="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" table="topiaAuthorization" node="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" abstract="true" proxy="org.nuiton.topia.security.entities.authorization.TopiaAuthorization" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
</class>
</hibernate-mapping>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" table="topiaExpressionLink" node="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" abstract="false" proxy="org.nuiton.topia.security.entities.authorization.TopiaExpressionLink" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="replace" type="text" access="field" column="replace" node="replace"/>
<property name="by" type="text" access="field" column="by" node="by"/>
</class>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.user.TopiaGroupImpl" table="topiaGroup" node="org.nuiton.topia.security.entities.user.TopiaGroupImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaGroup" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="name" type="text" access="field" column="name" node="name"/>
<property name="description" type="text" access="field" column="description" node="description"/>
<bag name="topiaUser" table="topiagroup_topiauser" lazy="true" node="topiaUser" embed-xml="true">
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.user.TopiaUserImpl" table="topiaUser" node="org.nuiton.topia.security.entities.user.TopiaUserImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaUser" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="login" type="text" access="field" column="login" node="login"/>
<property name="email" type="text" access="field" column="email" node="email"/>
<property name="password" type="text" access="field" column="password" node="password"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" table="taasAuthorization" node="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasAuthorization" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="expression" type="text" access="field" column="expression" node="expression"/>
<property name="actions" type="int" access="field" column="actions" node="actions"/>
</class>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasPrincipalImpl" table="taasPrincipal" node="org.nuiton.topia.taas.entities.TaasPrincipalImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasPrincipal" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="name" type="text" access="field" column="name" node="name"/>
<bag name="authorizations" table="authorizations_principals" lazy="false" node="authorizations" embed-xml="true">
<key column="principals"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml 2010-01-06 15:38:11 UTC (rev 1747)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasUserImpl" table="taasUser" node="org.nuiton.topia.taas.entities.TaasUserImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasUser" >
<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="topiaCreateDate" type="date" node="@topiaCreateDate"/>
<property name="login" type="text" access="field" column="login" node="login"/>
<property name="password" type="text" access="field" column="password" node="password"/>
<property name="email" type="text" access="field" column="email" node="email"/>
1
0
06 Jan '10
Author: fdesbois
Date: 2010-01-06 16:14:46 +0100 (Wed, 06 Jan 2010)
New Revision: 1746
Modified:
trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
Log:
Update mapping for services (change from #177)
Modified: trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml
===================================================================
--- trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-history/src/main/resources/oldmappings/TopiaHistory/1/org/nuiton/topia/history/entities/HistoryImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.history.entities.HistoryImpl" table="history" node="org.nuiton.topia.history.entities.HistoryImpl" abstract="false" proxy="org.nuiton.topia.history.entities.History" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="actionDate" type="java.util.Date" access="field" column="actionDate" node="actionDate"/>
<property name="userId" type="text" access="field" column="userId" node="userId"/>
<property name="action" type="int" access="field" column="action" node="action"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaAuthorizationImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,6 +4,6 @@
<class name="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" table="topiaAuthorization" node="org.nuiton.topia.security.entities.authorization.TopiaAuthorizationImpl" abstract="true" proxy="org.nuiton.topia.security.entities.authorization.TopiaAuthorization" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
</class>
</hibernate-mapping>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/authorization/TopiaExpressionLinkImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" table="topiaExpressionLink" node="org.nuiton.topia.security.entities.authorization.TopiaExpressionLinkImpl" abstract="false" proxy="org.nuiton.topia.security.entities.authorization.TopiaExpressionLink" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="replace" type="text" access="field" column="replace" node="replace"/>
<property name="by" type="text" access="field" column="by" node="by"/>
</class>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaGroupImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.user.TopiaGroupImpl" table="topiaGroup" node="org.nuiton.topia.security.entities.user.TopiaGroupImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaGroup" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="name" type="text" access="field" column="name" node="name"/>
<property name="description" type="text" access="field" column="description" node="description"/>
<bag name="topiaUser" table="topiagroup_topiauser" lazy="true" node="topiaUser" embed-xml="true">
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/security/entities/user/TopiaUserImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.security.entities.user.TopiaUserImpl" table="topiaUser" node="org.nuiton.topia.security.entities.user.TopiaUserImpl" abstract="false" proxy="org.nuiton.topia.security.entities.user.TopiaUser" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="login" type="text" access="field" column="login" node="login"/>
<property name="email" type="text" access="field" column="email" node="email"/>
<property name="password" type="text" access="field" column="password" node="password"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasAuthorizationImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" table="taasAuthorization" node="org.nuiton.topia.taas.entities.TaasAuthorizationImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasAuthorization" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="expression" type="text" access="field" column="expression" node="expression"/>
<property name="actions" type="int" access="field" column="actions" node="actions"/>
</class>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasPrincipalImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasPrincipalImpl" table="taasPrincipal" node="org.nuiton.topia.taas.entities.TaasPrincipalImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasPrincipal" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="name" type="text" access="field" column="name" node="name"/>
<bag name="authorizations" table="authorizations_principals" lazy="false" node="authorizations" embed-xml="true">
<key column="principals"/>
Modified: trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml
===================================================================
--- trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml 2010-01-06 08:54:51 UTC (rev 1745)
+++ trunk/topia-service-security/src/main/resources/oldmappings/TopiaSecurity/1/org/nuiton/topia/taas/entities/TaasUserImpl.hbm.xml 2010-01-06 15:14:46 UTC (rev 1746)
@@ -4,7 +4,7 @@
<class name="org.nuiton.topia.taas.entities.TaasUserImpl" table="taasUser" node="org.nuiton.topia.taas.entities.TaasUserImpl" abstract="false" proxy="org.nuiton.topia.taas.entities.TaasUser" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
<property name="login" type="text" access="field" column="login" node="login"/>
<property name="password" type="text" access="field" column="password" node="password"/>
<property name="email" type="text" access="field" column="email" node="email"/>
1
0
r1745 - in trunk/topia-persistence/src/main/java/org/nuiton/topia: framework persistence
by fdesbois@users.nuiton.org 06 Jan '10
by fdesbois@users.nuiton.org 06 Jan '10
06 Jan '10
Author: fdesbois
Date: 2010-01-06 09:54:51 +0100 (Wed, 06 Jan 2010)
New Revision: 1745
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java
Log:
- WARN : change TopiaQuery method addSelect by setSelect
- Add methods to easily have multiple values for one parameter (IN clause)
- Add distinct
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-05 09:49:58 UTC (rev 1744)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-06 08:54:51 UTC (rev 1745)
@@ -197,6 +197,8 @@
/** Select part of the query **/
protected String select;
+ protected boolean distinct;
+
/** From part of the query **/
protected String from;
@@ -220,6 +222,8 @@
protected Class<E> mainEntityClass;
+ protected String mainAlias;
+
protected TopiaDAO<E> dao;
/**
@@ -287,6 +291,7 @@
*/
protected TopiaQuery(Class<E> entityClass, String alias) {
this(entityClass);
+ this.mainAlias = alias;
this.from += " " + alias;
}
@@ -329,8 +334,13 @@
*/
public String fullQuery() {
String result = "";
+ String selectKeyWord = "SELECT ";
+ selectKeyWord += distinct ? " DISTINCT " : "";
if (select != null) {
- result = select;
+ result = selectKeyWord + select;
+ // Set default select if there is more than one table in from part and main alias is defined
+ } else if (from.contains(",") && !StringUtils.isEmpty(mainAlias)) {
+ result = selectKeyWord + mainAlias;
}
result += from;
if (where != null) {
@@ -400,6 +410,9 @@
* @return the TopiaQuery
*/
public TopiaQuery<E> add(String where) {
+ if (StringUtils.isEmpty(where)) {
+ return this;
+ }
if (this.where == null) {
this.where = " WHERE ";
} else {
@@ -426,13 +439,18 @@
* @return the TopiaQuery
*/
public TopiaQuery<E> add(String paramName, Op constraint, Object paramValue) {
+ String valueName = getValueName(paramName);
+ parentheses = false;
+ return add(paramName + " " + constraint + " :" + valueName).addParam(valueName, paramValue);
+ }
+
+ protected String getValueName(String paramName) {
int dot = paramName.lastIndexOf(".");
String valueName = paramName;
if (dot != -1) {
valueName = paramName.substring(dot+1);
}
- parentheses = false;
- return add(paramName + " " + constraint + " :" + valueName).addParam(valueName, paramValue);
+ return valueName;
}
/**
@@ -460,6 +478,56 @@
}
/**
+ * Add an element to the query with a list of different possible values.
+ *
+ * @param paramName name of the parameter in the query
+ * @param values different values for this parameter
+ * @return the TopiaQuery
+ * @see #add(java.lang.String, java.util.Collection, boolean)
+ */
+ public TopiaQuery<E> add(String paramName, Collection<Object> values) {
+ return add(paramName, values, false);
+ }
+
+ /**
+ * Add an element to the query with a list of different values. The IN key word will be used to
+ * set the different values. An other constraint on nullity can be set with isNull argument.
+ * The element can have one of the value from the collection or can be null if the isNull argument is true.
+ *
+ * @param paramName name of the parameter in the query
+ * @param values different values for this parameter
+ * @param isNull use it to test the nullity of parameter
+ * @return
+ * @see #add(java.lang.String)
+ */
+ public TopiaQuery<E> add(String paramName, Collection<Object> values, boolean isNull) {
+ String queryIn = "";
+ if (!values.isEmpty()) {
+// String valueName = getValueName(paramName);
+// queryIn += paramName + " IN (:" + valueName + ")";
+// addParam(valueName, values);
+
+ queryIn += paramName + " IN (";
+ int count = 1;
+ for (Object value : values) {
+ String valueName = getValueName(paramName) + count;
+ if (count != 1) {
+ queryIn += ", ";
+ }
+ queryIn += ":" + valueName;
+ addParam(valueName, value);
+ count++;
+ }
+ queryIn += ")";
+ }
+ if (isNull) {
+ queryIn += !values.isEmpty() ? " OR " : "";
+ queryIn += paramName + " IS NULL";
+ }
+ return add(queryIn);
+ }
+
+ /**
* Add a map of properties to the where clause of the query. Each property will be added to the query with
* Op.EQ operation, the key in the map is the property name, and the value is the value of the parameter in the
* query.
@@ -486,22 +554,33 @@
}
/**
- * Add an element to the select in the query. Used to add some parameters for the return of query.
+ * Set the select in the query. Depends on the result wanted in execute methods.
*
* @param select element to add
* @return the TopiaQuery
*/
- public TopiaQuery<E> addSelect(String select) {
- if (this.select == null) {
- this.select = "SELECT ";
- } else {
- this.select += ", ";
- }
- this.select += select;
+ public TopiaQuery<E> setSelect(String select) {
+// if (this.select == null) {
+// this.select = "SELECT ";
+// } else {
+// this.select += ", ";
+// }
+// this.select += select;
+ this.select = select;
return this;
}
/**
+ * Add the distinct key word in the query. The result will not have multiple same values.
+ *
+ * @return the TopiaQuery
+ */
+ public TopiaQuery<E> addDistinct() {
+ this.distinct = true;
+ return this;
+ }
+
+ /**
* Add an element to the order in the query. Used to add some parameters to order by.
*
* @param order element to add
@@ -801,7 +880,7 @@
public Object executeToObject(TopiaContext transaction, String select) throws TopiaException {
String oldValue = this.select;
if (!StringUtils.isEmpty(select)) {
- this.select = "SELECT " + select;
+ setSelect(select);
}
Object result = null;
setMaxResults(1);
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-01-05 09:49:58 UTC (rev 1744)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-01-06 08:54:51 UTC (rev 1745)
@@ -711,7 +711,7 @@
public List<String> findAllIds() throws TopiaException {
//List<String> find = context.find("select src.topiaId from " + entityClass.getSimpleName() + "Impl src");
//return find;
- return createQuery().addSelect(TopiaEntity.TOPIA_ID).execute(context);
+ return createQuery().setSelect(TopiaEntity.TOPIA_ID).execute(context);
}
@Override
1
0
r1744 - trunk/topia-persistence/src/main/java/org/nuiton/topia/framework
by fdesbois@users.nuiton.org 05 Jan '10
by fdesbois@users.nuiton.org 05 Jan '10
05 Jan '10
Author: fdesbois
Date: 2010-01-05 10:49:58 +0100 (Tue, 05 Jan 2010)
New Revision: 1744
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
Log:
Fix NPE when loadProperty
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-04 11:21:29 UTC (rev 1743)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-05 09:49:58 UTC (rev 1744)
@@ -914,7 +914,7 @@
if (log.isTraceEnabled()) {
log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'");
}
- if (Collection.class.isAssignableFrom(res.getClass())) {
+ if (res != null && Collection.class.isAssignableFrom(res.getClass())) {
Collection list = (Collection) res;
list.size();
}
1
0
r1743 - in trunk/topia-persistence/src/main/java/org/nuiton/topia: framework persistence
by fdesbois@users.nuiton.org 04 Jan '10
by fdesbois@users.nuiton.org 04 Jan '10
04 Jan '10
Author: fdesbois
Date: 2010-01-04 12:21:29 +0100 (Mon, 04 Jan 2010)
New Revision: 1743
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java
Log:
- Improve TopiaQuery using Generic and DAO for context
- Add methods to create a TopiaQuery in TopiaDAO
- Replace usage of Criteria by TopiaQuery in TopiaDAOImpl -> Increase execution time for findBy queries
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-04 09:28:49 UTC (rev 1742)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-01-04 11:21:29 UTC (rev 1743)
@@ -35,22 +35,159 @@
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaDAO;
import org.nuiton.topia.persistence.TopiaEntity;
/**
- * Query HQL managment to simplify utilisation of {@link TopiaContext#find(java.lang.String, java.lang.Object[]) }.
+ * Query HQL managment to simplify usage of {@link TopiaContext#find(java.lang.String, java.lang.Object[]) }.
*
* TODO-FD20091224 Complete documentation of this class + JUnit Tests
*
+ * <pre>
+ * This class is used to construct a HQL query and then execute it from a TopiaContext. The TopiaQuery is linked to a TopiaEntity which
+ * is the main element manipulated in the query. There is two parts in using this class :
+ * - construction of the query, using add, addFrom, addOrder, addSelect, addGroup, ...
+ * - execution of the query, using executeToEntityList, executeToEntity, executeToInteger, ...
+ *
+ * Construction
+ * ============
+ *
+ * This class make easier the way to construct a HQL query.
+ *
+ * Example 1 :
+ * -----------
+ *
+ * SQL :
+ * "SELECT * FROM PersonImpl WHERE firstName LIKE 'M%' AND year > 1980"
+ *
+ * HQL using {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) } :
+ * TopiaContext context = rootContext.beginTransaction();
+ * context.find("FROM " + Person.class.getName() + " WHERE firstName LIKE :firstName AND year > :year",
+ * "firstName", "M%", year, 1980);
+ *
+ * TopiaQuery :
+ * TopiaQuery query = TopiaQuery.createQuery(Person.class).add(Person.FIRST_NAME, Op.LIKE, "M%").add(Person.YEAR, Op.GT, 1980);
+ *
+ * But the real advantage is when you have some parameters to test before adding them to the query. With the older method, it was tidious to construct
+ * and add parameters to finally use the find method from TopiaContext.
+ *
+ * Example 2 :
+ * -----------
+ *
+ * HQL using {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) } :
+ * TopiaContext context = rootContext.beginTransaction();
+ *
+ * String query = "FROM " + Person.class.getName();
+ * List<Object> params = new ArrayList<Object>();
+ * boolean filtered = false;
+ * // company parameter can be null
+ * if (company != null) {
+ * query += " WHERE company = :company";
+ * params.add("company");
+ * params.add(company);
+ * filtered = true;
+ * }
+ *
+ * // contact paramater can be null
+ * if (contact != null) {
+ * query += filtered ? " AND " : " WHERE "
+ * query += " contact = :contact";
+ * params.add("contact");
+ * params.add(contact);
+ * filtered = true;
+ * }
+ *
+ * context.find(query, params.toArray());
+ *
+ * Here we have only two non obligatory params, but imagine if we must have almost 6 or 7 parameters like this !
+ *
+ * TopiaQuery :
+ * TopiaQuery query = TopiaQuery.createQuery(Person.class);
+ *
+ * if (company != null) {
+ * query.add(Person.COMPANY, company);
+ * }
+ *
+ * if (contact != null) {
+ * query.add(Person.CONTACT, contact);
+ * }
+ *
+ * Many ways to create the same query :
+ * ------------------------------------
+ *
+ * You can use multiple different manners to create a query, it depends on the complexicity. More complex is the query, more easier is to construct it.
+ *
+ * HQL : "FROM PersonImpl AS P WHERE (P.company IS NULL OR P.company = :company) AND P.firstName LIKE :firstName"
+ *
+ * Using TopiaQuery and an Alias :
+ * query = TopiaQuery.createQuery(Person.class, "P");
+ * 1- query.add("(P.company IS NULL OR P.company = :company") AND P.firstName LIKE :firstName").addParam("company", company).addParam("firstName",firstName + "%");
+ * 2- query.add("P.company IS NULL OR P.company = :company").add("P.firstName LIKE :firstName").addParam("company", company).addParam("firstName",firstName + "%");
+ * 3- query.add("P.company IS NULL OR P.company = :company").add("P.firstName", Op.LIKE, firstName + "%").addParam("company", company);
+ *
+ * You can use TopiaQuery to create a subquery in an other TopiaQuery, you have to use the method {@link #fullQuery() } to get the full query in HQL and give
+ * it as a string in the other TopiaQuery.
+ *
+ * Execution
+ * =========
+ *
+ * After construction, you can execute the query in different ways.
+ *
+ * Default method :
+ * ----------------
+ *
+ * - execute : as the same result as {@link org.nuiton.topia.TopiaContext#find(java.lang.String, java.lang.Object[]) }
+ *
+ * Depends on entity type ;
+ * ------------------------
+ *
+ * - executeToEntity : only one result, the first one
+ * - executeToEntityList : all results returned in a List
+ * - executeToEntityMap : all results returned in a Map with key defined by user or topiaId by default
+ *
+ * For aggregate :
+ * ---------------
+ *
+ * These methods have in argument the SELECT to execute the query. The previous SELECT (if defined) will not be deleted, but temporarly not used.
+ *
+ * - executeToInteger : for example for "SUM", "COUNT"
+ * - executeToString : for example for "MAX"
+ * - executeCount : directly a "count(*)"
+ * - executeToObject : for other type of possible result (Long, Boolean, Double, ...)
+ *
+ * Property loading
+ * ================
+ *
+ * When using Hibernate, some times, Entities linked to the main one will be lazy initialized, but you want them directly when the
+ * query will be executed to avoid problems when closing context. You can use the method {@link #addLoad(java.lang.String[]) } to
+ * tell the TopiaQuery to load some properties when executing the query. After that, you don't need to call them for loading them in Hibernate.
+ *
+ * The syntax is the same as a property in HQL query using delegation : "person.company" where person and company are entities.
+ *
+ * Note : loading only available on collection or entities but not property on a collection of entities which must be made manually.
+ *
+ * For a Contact which is linked to a person (entity) and the person linked to company (entity) you can add to a TopiaQuery<Contact> :
+ * query.addLoad("person.company")
+ *
+ * For a list of addresses (entity) in the contact you can do :
+ * query.addLoad("addresses")
+ *
+ * But it's not possible to do for example with meeting (entity) linked to the contact and responsible (entity) linked to a meeting :
+ * query.addLoad("meetings.responsible")
+ *
+ * </pre>
+ *
* Created: 21 déc. 2009
*
+ * @param <E> The main entity for the query
* @author fdesbois
* @version $Revision$
+ * @since 2.3.0
*
* Mise a jour: $Date$
* par : $Author$
*/
-public class TopiaQuery {
+public class TopiaQuery<E extends TopiaEntity> {
private static final Log log = LogFactory.getLog(TopiaQuery.class);
@@ -81,8 +218,10 @@
protected List<String> propertiesToLoad;
- protected Class<? extends TopiaEntity> mainEntityClass;
+ protected Class<E> mainEntityClass;
+ protected TopiaDAO<E> dao;
+
/**
* Enum to simmplify using operation in query
*/
@@ -124,21 +263,60 @@
*
* @param entityClass Class for an entity Query
*/
- public TopiaQuery(Class<? extends TopiaEntity> entityClass) {
- this(entityClass.getName());
- this.mainEntityClass = entityClass;
+ protected TopiaQuery(Class<E> entityClass) {
+ parentheses = true;
+ mainEntityClass = entityClass;
+ this.from = " FROM " + mainEntityClass.getName();
}
/**
+ * Constructor of TopiaQuery from a DAO
+ *
+ * @param dao DAO linked to the entity to threat
+ */
+ protected TopiaQuery(TopiaDAO<E> dao) {
+ this(dao.getEntityClass());
+ this.dao = dao;
+ }
+
+ /**
* Constructor of TopiaQuery with String form initialization.
*
- * @param from From part for the Query
+ * @param entityClass
+ * @param alias of the main entity in the query
*/
- public TopiaQuery(String from) {
- this.from = " FROM " + from;
- parentheses = true;
+ protected TopiaQuery(Class<E> entityClass, String alias) {
+ this(entityClass);
+ this.from += " " + alias;
}
+ /**
+ * Constructor of TopiaQuery from a DAO with an Alias
+ *
+ * @param dao DAO linked to the entity to threat
+ * @param alias of the main entity in the query
+ */
+ protected TopiaQuery(TopiaDAO<E> dao, String alias) {
+ this(dao.getEntityClass(), alias);
+ this.dao = dao;
+ }
+
+ public static <T extends TopiaEntity> TopiaQuery<T> createQuery(Class<T> entityClass) {
+ return new TopiaQuery<T>(entityClass);
+ }
+
+ public static <T extends TopiaEntity> TopiaQuery<T> createQuery(TopiaDAO<T> dao) {
+ return new TopiaQuery<T>(dao);
+ }
+
+ public static <T extends TopiaEntity> TopiaQuery<T> createQuery(Class<T> entityClass, String alias) {
+ return new TopiaQuery<T>(entityClass, alias);
+ }
+
+ public static <T extends TopiaEntity> TopiaQuery<T> createQuery(TopiaDAO<T> dao, String alias) {
+ return new TopiaQuery<T>(dao, alias);
+ }
+
@Override
public String toString() {
return fullQuery();
@@ -174,7 +352,7 @@
* @param e value of the param
* @return the TopiaQuery
*/
- public TopiaQuery addParam(String id, Object e) {
+ public TopiaQuery<E> addParam(String id, Object e) {
getParams().add(id);
getParams().add(e);
return this;
@@ -202,7 +380,7 @@
* @param properties
* @return
*/
- public TopiaQuery addLoad(String... properties) {
+ public TopiaQuery<E> addLoad(String... properties) {
getPropertiesToLoad().addAll(Arrays.asList(properties));
return this;
}
@@ -221,7 +399,7 @@
* @param where element to add
* @return the TopiaQuery
*/
- public TopiaQuery add(String where) {
+ public TopiaQuery<E> add(String where) {
if (this.where == null) {
this.where = " WHERE ";
} else {
@@ -247,7 +425,7 @@
* @param paramValue the value of the parameter (an other entity, a String, ...)
* @return the TopiaQuery
*/
- public TopiaQuery add(String paramName, Op constraint, Object paramValue) {
+ public TopiaQuery<E> add(String paramName, Op constraint, Object paramValue) {
int dot = paramName.lastIndexOf(".");
String valueName = paramName;
if (dot != -1) {
@@ -263,7 +441,7 @@
* @param paramName name of the parameter in the query
* @return the TopiaQuery
*/
- public TopiaQuery addNotNull(String paramName) {
+ public TopiaQuery<E> addNotNull(String paramName) {
return add(paramName + " " + Op.NOT_NULL);
}
@@ -277,17 +455,32 @@
* @return the TopiaQuery
* @see #add(java.lang.String, fr.ifremer.suiviobsmer.TopiaQuery.Op, java.lang.Object)
*/
- public TopiaQuery add(String paramName, Object paramValue) {
+ public TopiaQuery<E> add(String paramName, Object paramValue) {
return add(paramName, Op.EQ, paramValue);
}
/**
+ * Add a map of properties to the where clause of the query. Each property will be added to the query with
+ * Op.EQ operation, the key in the map is the property name, and the value is the value of the parameter in the
+ * query.
+ *
+ * @param properties
+ * @return
+ */
+ public TopiaQuery<E> add(Map<String, Object> properties) {
+ for (String key : properties.keySet()) {
+ add(key, properties.get(key));
+ }
+ return this;
+ }
+
+ /**
* Add an element to the from in the query. Used to add some other data in the query or for join.
*
* @param str the element to add
* @return the TopiaQuery
*/
- public TopiaQuery addFrom(String str) {
+ public TopiaQuery<E> addFrom(String str) {
from += ", " + str;
return this;
}
@@ -298,7 +491,7 @@
* @param select element to add
* @return the TopiaQuery
*/
- public TopiaQuery addSelect(String select) {
+ public TopiaQuery<E> addSelect(String select) {
if (this.select == null) {
this.select = "SELECT ";
} else {
@@ -314,7 +507,7 @@
* @param order element to add
* @return the TopiaQuery
*/
- public TopiaQuery addOrder(String order) {
+ public TopiaQuery<E> addOrder(String order) {
if (orderBy == null) {
orderBy = " ORDER BY ";
} else {
@@ -324,7 +517,7 @@
return this;
}
- public TopiaQuery addOrderDesc(String order) {
+ public TopiaQuery<E> addOrderDesc(String order) {
return addOrder(order + " DESC");
}
@@ -334,7 +527,7 @@
* @param group element to add
* @return the TopiaQuery
*/
- public TopiaQuery addGroup(String group) {
+ public TopiaQuery<E> addGroup(String group) {
if (groupBy == null) {
groupBy = " GROUP BY ";
} else {
@@ -351,7 +544,7 @@
* @param end last index to get from the results
* @return the TopiaQuery
*/
- public TopiaQuery setLimit(int start, int end) {
+ public TopiaQuery<E> setLimit(int start, int end) {
this.startIndex = start;
this.endIndex = end;
return this;
@@ -363,7 +556,7 @@
* @param max the number of elements wanted
* @return the TopiaQuery
*/
- public TopiaQuery setMaxResults(int max) {
+ public TopiaQuery<E> setMaxResults(int max) {
return setLimit(0,max-1);
}
@@ -387,28 +580,38 @@
}
/**
+ * DAO must be defined to use this method.
+ *
+ * @return a List of results
+ * @throws TopiaException
+ * @see #execute(org.nuiton.topia.TopiaContext)
+ */
+ public List execute() throws TopiaException {
+ validateDAO();
+ return execute(dao.getContext());
+ }
+
+ /**
* Execute the query and get a List of entity. Some properties will be loaded if they are
* prealably set using ${@link #addLoad(java.lang.String[]) }.
*
- * @param <T> the type of TopiaEntity to return
* @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return type
* @return a List of TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
* @throws ClassCastException
*/
- public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction, Class<T> entityClass)
+ public List<E> executeToEntityList(TopiaContext transaction)
throws TopiaException, ClassCastException {
List res = execute(transaction);
if (log.isTraceEnabled()) {
log.trace("Properties to load : " + getPropertiesToLoad());
}
- List<T> results = new ArrayList<T>();
+ List<E> results = new ArrayList<E>();
for (Object o : res) {
- if (o != null && !entityClass.isAssignableFrom(o.getClass())) {
- throw new ClassCastException("Invalid cast for " + entityClass.getName());
+ if (o != null && !mainEntityClass.isAssignableFrom(o.getClass())) {
+ throw new ClassCastException("Invalid cast for " + mainEntityClass.getName());
}
- T entity = (T)o;
+ E entity = (E)o;
if (!getPropertiesToLoad().isEmpty()) {
loadProperties(entity);
}
@@ -418,112 +621,36 @@
}
/**
- * {@link #executeToEntity(org.nuiton.topia.TopiaContext, java.lang.Class) } with default entityClass set from constructor.
+ * DAO must be defined to use this method.
*
- * @param <T>
- * @param transaction
- * @return the TopiaEntity from entityClass set from ${@link #TopiaQuery(java.lang.Class) } constructor
+ * @return a List of TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
* @throws ClassCastException
+ * @see #executeToEntityList(org.nuiton.topia.TopiaContext)
*/
- public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction) throws TopiaException, ClassCastException {
- if (this.mainEntityClass == null) {
- throw new NullPointerException("Main entity class from constructor can't be null to use executeToEntityList method without entityClass");
- }
- return (List<T>)executeToEntityList(transaction, mainEntityClass);
+ public List<E> executeToEntityList()
+ throws TopiaException, ClassCastException {
+ validateDAO();
+ return executeToEntityList(dao.getContext());
}
/**
- * Load all properties for the entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load properties
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> void loadProperties(T entity) throws TopiaException {
- for (String prop : getPropertiesToLoad()) {
- if (log.isTraceEnabled()) {
- log.trace("load property " + prop + " ...");
- }
- List<String> str = Arrays.asList(prop.split("\\."));
- Iterator<String> it = str.iterator();
- TopiaEntity currEntity = entity;
- while (it.hasNext()) {
- String s = it.next();
- if (log.isTraceEnabled()) {
- log.trace("Current entity : " + currEntity.getClass().getSimpleName());
- log.trace("Current loading : " + s);
- }
- if (it.hasNext()) {
- currEntity = loadEntityProperty(currEntity, s);
- } else {
- loadProperty(currEntity, s);
- }
- }
- }
- }
-
- /**
- * Load a property of type TopiaEntity from an other entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load the property
- * @param property name of the property in the entity
- * @return a TopiaEntity corresponding to the property loaded
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> TopiaEntity loadEntityProperty(T entity, String property) throws TopiaException {
- return (TopiaEntity)loadProperty(entity, property);
- }
-
- /**
- * Load a property from an entity.
- *
- * @param <T> type of the entity extends TopiaEntity
- * @param entity used to load the property
- * @param property name of the property in the entity
- * @return an Object corresponding to the property loaded
- * @throws TopiaException
- */
- protected <T extends TopiaEntity> Object loadProperty(T entity, String property) throws TopiaException {
- try {
- Object res = PropertyUtils.getProperty(entity, property);
- if (log.isTraceEnabled()) {
- log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'");
- }
- if (Collection.class.isAssignableFrom(res.getClass())) {
- Collection list = (Collection) res;
- list.size();
- }
- return res;
- } catch (IllegalAccessException eee) {
- throw new TopiaException("Illegal access on property " + property + " from entity " + entity.getClass().getName(), eee);
- } catch (InvocationTargetException eee) {
- throw new TopiaException("Invocation error on entity " + entity.getClass().getName() + " for property " + property, eee);
- } catch (NoSuchMethodException eee) {
- throw new TopiaException("Getter method does not exist for property " + property + " from entity " + entity.getClass().getName(), eee);
- }
- }
-
- /**
* Execute the query and get a Map of entity with key type in argument. Some properties will be loaded if they are
* prealably set using ${@link #addLoad(java.lang.String[]) }.
*
* @param <K> the type of the map key
- * @param <T> the type of entity, value of the map
* @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return
* @param keyName the property name of the key in the entity
* @param keyClass the key class for the result map
* @return a Map with the key type defined and the entity in value
* @throws TopiaException
* @throws ClassCastException
*/
- public <K, T extends TopiaEntity> Map<K, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass, String keyName, Class<K> keyClass)
+ public <K> Map<K, E> executeToEntityMap(TopiaContext transaction, String keyName, Class<K> keyClass)
throws TopiaException, ClassCastException {
- Map<K, T> results = new HashMap<K, T>();
- for (T elmt : executeToEntityList(transaction, entityClass)) {
+ Map<K, E> results = new HashMap<K, E>();
+ for (E elmt : executeToEntityList(transaction)) {
Object value = loadProperty(elmt, keyName);
if (value != null && !keyClass.isAssignableFrom(value.getClass())) {
throw new ClassCastException("Invalid cast for " + keyClass.getName());
@@ -534,92 +661,78 @@
}
/**
- * {@link #executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.Class, java.lang.String, java.lang.Class) }
- * with default entityClass set from constructor.
+ * DAO must be defined to use this method.
*
* @param <K>
- * @param <T>
- * @param transaction
* @param keyName
* @param keyClass
- * @return the TopiaEntity from entityClass set from ${@link #TopiaQuery(java.lang.Class) } constructor
+ * @return a Map with the key type defined and the entity in value
* @throws TopiaException
* @throws ClassCastException
+ * @see #executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.String, java.lang.Class)
*/
- public <K, T extends TopiaEntity> Map<K, T> executeToEntityMap(TopiaContext transaction, String keyName, Class<K> keyClass)
+ public <K> Map<K, E> executeToEntityMap(String keyName, Class<K> keyClass)
throws TopiaException, ClassCastException {
- if (this.mainEntityClass == null) {
- throw new NullPointerException("Main entity class from constructor can't be null to use executeToEntityMap method without entityClass");
- }
- return (Map<K, T>)executeToEntityMap(transaction, mainEntityClass, keyName, keyClass);
+ validateDAO();
+ return executeToEntityMap(dao.getContext(), keyName, keyClass);
}
/**
* Execute the query and get a Map of entity with topiaId in key. Some properties will be loaded if they are
* prealably set using ${@link #addLoad(java.lang.String[]) }.
*
- * @param <T> the type of entity, value of the map
* @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return
* @return a Map with the key type defined and the entity in value
* @throws TopiaException
* @throws ClassCastException
*/
- public <T extends TopiaEntity> Map<String, T> executeToEntityMap(TopiaContext transaction, Class<T> entityClass)
+ public Map<String, E> executeToEntityMap(TopiaContext transaction)
throws TopiaException, ClassCastException {
- return executeToEntityMap(transaction, entityClass, TopiaEntity.TOPIA_ID, String.class);
+ return executeToEntityMap(transaction, TopiaEntity.TOPIA_ID, String.class);
}
/**
- * {@link #executeToEntityMap(org.nuiton.topia.TopiaContext, java.lang.Class) } with default entityClass set from constructor.
+ * DAO must be defined to use this method.
*
- * @param <T>
- * @param transaction
- * @return the TopiaEntity from entityClass set from ${@link #TopiaQuery(java.lang.Class) } constructor
+ * @return a Map with the key type defined and the entity in value
* @throws TopiaException
* @throws ClassCastException
+ * @see #executeToEntityMap(org.nuiton.topia.TopiaContext)
*/
- public <T extends TopiaEntity> Map<String, T> executeToEntityMap(TopiaContext transaction)
+ public Map<String, E> executeToEntityMap()
throws TopiaException, ClassCastException {
- if (this.mainEntityClass == null) {
- throw new NullPointerException("Main entity class from constructor can't be null to use executeToEntityMap method without entityClass");
- }
- return (Map<String, T>)executeToEntityMap(transaction, mainEntityClass);
+ validateDAO();
+ return executeToEntityMap(dao.getContext());
}
/**
* Execute the query and get the first result entity. Some properties will be loaded if they are
* prealably set using ${@link #addLoad(java.lang.String[]) }.
*
- * @param <T> the type of TopiaEntity to return
* @param transaction the TopiaContext to use for execution
- * @param entityClass the class of the TopiaEntity used for return type
* @return a TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
* @throws ClassCastException
*/
- public <T extends TopiaEntity> T executeToEntity(TopiaContext transaction, Class<T> entityClass)
+ public E executeToEntity(TopiaContext transaction)
throws TopiaException, ClassCastException {
setMaxResults(1);
- List<T> results = executeToEntityList(transaction, entityClass);
+ List<E> results = executeToEntityList(transaction);
return !results.isEmpty() ? results.get(0) : null;
}
/**
- * {@link #executeToEntity(org.nuiton.topia.TopiaContext, java.lang.Class) } with default entityClass set from constructor.
+ * DAO must be defined to use this method.
*
- * @param <T>
- * @param transaction
- * @return the TopiaEntity from entityClass set from ${@link #TopiaQuery(java.lang.Class) } constructor
+ * @return a TopiaEntity corresponding to the entityClass in argument
* @throws TopiaException
* @throws ClassCastException
+ * @see #executeToEntity(org.nuiton.topia.TopiaContext)
*/
- public <T extends TopiaEntity> T executeToEntity(TopiaContext transaction)
+ public E executeToEntity()
throws TopiaException, ClassCastException {
- if (this.mainEntityClass == null) {
- throw new NullPointerException("Main entity class from constructor can't be null to use executeToEntity method without entityClass");
- }
- return (T)executeToEntity(transaction, mainEntityClass);
+ validateDAO();
+ return executeToEntity(dao.getContext());
}
/**
@@ -637,6 +750,19 @@
}
/**
+ * DAO must be defined to use this method.
+ *
+ * @param select
+ * @return an Integer
+ * @throws TopiaException
+ * @see #executeToInteger(org.nuiton.topia.TopiaContext, java.lang.String)
+ */
+ public int executeToInteger(String select) throws TopiaException {
+ validateDAO();
+ return executeToInteger(dao.getContext(), select);
+ }
+
+ /**
* Execute the query and get a String for result. Used for query with MAX, ...
* The select is overriden to get only the right value for return.
*
@@ -651,6 +777,19 @@
}
/**
+ * DAO must be defined to use this method.
+ *
+ * @param select
+ * @return
+ * @throws TopiaException
+ * @see #executeToString(org.nuiton.topia.TopiaContext, java.lang.String)
+ */
+ public String executeToString(String select) throws TopiaException {
+ validateDAO();
+ return executeToString(dao.getContext(), select);
+ }
+
+ /**
* Execute the query and get an Object for result.
* The select is overriden to get only the right value for return.
*
@@ -675,6 +814,19 @@
}
/**
+ * DAO must be defined to use this method.
+ *
+ * @param select
+ * @return an Object
+ * @throws TopiaException
+ * @see #executeToObject(org.nuiton.topia.TopiaContext, java.lang.String)
+ */
+ public Object executeToObject(String select) throws TopiaException {
+ validateDAO();
+ return executeToObject(dao.getContext(), select);
+ }
+
+ /**
* Execute a simple count on the query, i.e. the number of results get from the query.
*
* @param transaction the TopiaContext to use for execution
@@ -685,4 +837,95 @@
return executeToInteger(transaction, "COUNT(*)");
}
+ /**
+ * DAO must be defined to use this method.
+ *
+ * @return an int corresponding to the number of result in the query
+ * @throws TopiaException
+ * @see #executeCount(org.nuiton.topia.TopiaContext)
+ */
+ public int executeCount() throws TopiaException {
+ validateDAO();
+ return executeCount(dao.getContext());
+ }
+
+ protected boolean validateDAO() throws TopiaException {
+ if (dao == null) {
+ throw new TopiaException("DAO not defined in TopiaQuery, can't execute it without TopiaContext");
+ }
+ return true;
+ }
+
+ /**
+ * Load all properties for the entity.
+ *
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load properties
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> void loadProperties(T entity) throws TopiaException {
+ for (String prop : getPropertiesToLoad()) {
+ if (log.isTraceEnabled()) {
+ log.trace("load property " + prop + " ...");
+ }
+ List<String> str = Arrays.asList(prop.split("\\."));
+ Iterator<String> it = str.iterator();
+ TopiaEntity currEntity = entity;
+ while (it.hasNext()) {
+ String s = it.next();
+ if (log.isTraceEnabled()) {
+ log.trace("Current entity : " + currEntity.getClass().getSimpleName());
+ log.trace("Current loading : " + s);
+ }
+ if (it.hasNext()) {
+ currEntity = loadEntityProperty(currEntity, s);
+ } else {
+ loadProperty(currEntity, s);
+ }
+ }
+ }
+ }
+
+ /**
+ * Load a property of type TopiaEntity from an other entity.
+ *
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load the property
+ * @param property name of the property in the entity
+ * @return a TopiaEntity corresponding to the property loaded
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> TopiaEntity loadEntityProperty(T entity, String property) throws TopiaException {
+ return (TopiaEntity)loadProperty(entity, property);
+ }
+
+ /**
+ * Load a property from an entity.
+ *
+ * @param <T> type of the entity extends TopiaEntity
+ * @param entity used to load the property
+ * @param property name of the property in the entity
+ * @return an Object corresponding to the property loaded
+ * @throws TopiaException
+ */
+ protected <T extends TopiaEntity> Object loadProperty(T entity, String property) throws TopiaException {
+ try {
+ Object res = PropertyUtils.getProperty(entity, property);
+ if (log.isTraceEnabled()) {
+ log.trace("load property '" + property + "' for '" + entity.getClass().getSimpleName() + "'");
+ }
+ if (Collection.class.isAssignableFrom(res.getClass())) {
+ Collection list = (Collection) res;
+ list.size();
+ }
+ return res;
+ } catch (IllegalAccessException eee) {
+ throw new TopiaException("Illegal access on property " + property + " from entity " + entity.getClass().getName(), eee);
+ } catch (InvocationTargetException eee) {
+ throw new TopiaException("Invocation error on entity " + entity.getClass().getName() + " for property " + property, eee);
+ } catch (NoSuchMethodException eee) {
+ throw new TopiaException("Getter method does not exist for property " + property + " from entity " + entity.getClass().getName(), eee);
+ }
+ }
+
}
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java 2010-01-04 09:28:49 UTC (rev 1742)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java 2010-01-04 11:21:29 UTC (rev 1743)
@@ -39,6 +39,7 @@
import org.nuiton.topia.event.TopiaEntityListener;
import org.nuiton.topia.event.TopiaEntityVetoable;
import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.framework.TopiaQuery;
/**
* @author poussin
@@ -144,6 +145,23 @@
long size() throws TopiaException;
/**
+ * Crée une requete basé sur l'entité lié au DAO.
+ * Résultat attendu : "FROM Entity"
+ *
+ * @return une nouvelle TopiaQuery vide. (uniquement avec le From sur le type d'entité)
+ */
+ TopiaQuery<Entity> createQuery();
+
+ /**
+ * Crée une requete basé sur l'entité lié au DAO et lui assigne un alias valable dans la requête.
+ * Résultat attendu : "FROM Entity AS entityAlias"
+ *
+ * @param entityAlias alias permettant de manipuler l'entité dans la requête
+ * @return une nouvelle TopiaQuery
+ */
+ TopiaQuery<Entity> createQuery(String entityAlias);
+
+ /**
* Recherche la classe en utilisant la cle naturelle, chaque champs de la
* cle naturelle est une entre de la map passe en argument.
*
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-01-04 09:28:49 UTC (rev 1742)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-01-04 11:21:29 UTC (rev 1743)
@@ -53,7 +53,6 @@
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.Criterion;
-import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.hibernate.metadata.ClassMetadata;
import org.nuiton.topia.framework.TopiaQuery;
@@ -67,22 +66,22 @@
* est ainsi possible d'accèder au meta information hibernate sur les classes
* lorque l'on en a besoin.
*
- * @param <Entity> le type de l'entite
+ * @param <E> le type de l'entite
* @author poussin
*
*/
-public class TopiaDAOImpl<Entity extends TopiaEntity> implements
- TopiaDAO<Entity> { // TopiaDAOImpl
+public class TopiaDAOImpl<E extends TopiaEntity> implements
+ TopiaDAO<E> { // TopiaDAOImpl
/** to use log facility, just put in your code: log.info(\"...\"); */
private static Log log = LogFactory.getLog(TopiaDAOImpl.class);
- protected Class<Entity> entityClass = null;
+ protected Class<E> entityClass = null;
protected TopiaContextImplementor context = null;
@Override
- public Class<Entity> getEntityClass() {
+ public Class<E> getEntityClass() {
throw new UnsupportedOperationException(
"This method must be overided in generated DAO");
}
@@ -93,7 +92,7 @@
* @return l'id de l'entity ou null si pas trouvé
* @throws TopiaException Si une erreur survient durant la recherche
*/
- protected Serializable getId(Entity e) throws TopiaException {
+ protected Serializable getId(E e) throws TopiaException {
ClassMetadata meta = getClassMetadata();
String idPropName = meta.getIdentifierPropertyName();
@@ -139,7 +138,7 @@
* @param entityClass
*/
@Override
- public void init(TopiaContextImplementor context, Class<Entity> entityClass)
+ public void init(TopiaContextImplementor context, Class<E> entityClass)
throws TopiaException {
log.debug("init dao for " + entityClass.getName());
this.context = context;
@@ -152,15 +151,15 @@
}
@SuppressWarnings("unchecked")
- protected Entity instanciateNew() throws TopiaException {
- Entity result = null;
+ protected E instanciateNew() throws TopiaException {
+ E result = null;
if (log.isDebugEnabled()) {
log.debug("entityClass = " + entityClass);
}
String classname = entityClass.getName();
try {
// on commence par essayer d'instancier le Impl
- result = ((Class<Entity>) Class.forName(classname + "Impl"))
+ result = ((Class<E>) Class.forName(classname + "Impl"))
.newInstance();
if (log.isDebugEnabled()) {
log.debug("Utilisation de la classe " + classname + "Impl"
@@ -243,7 +242,7 @@
}
@Override
- public Entity create(Object... properties) throws TopiaException {
+ public E create(Object... properties) throws TopiaException {
Map<String, Object> map = new HashMap<String, Object>();
Object propertyName = null;
Object value = null;
@@ -264,19 +263,19 @@
+ propertyName.getClass().getName());
}
- Entity result = create(map);
+ E result = create(map);
return result;
}
@Override
- public Entity findByPrimaryKey(Map<String, Object> keys)
+ public E findByPrimaryKey(Map<String, Object> keys)
throws TopiaException {
try {
// we used hibernate meta information for all persistence type
// it's more easy than create different for all persistence
ClassMetadata meta = getClassMetadata();
if (meta.hasNaturalIdentifier()) {
- Entity result = findByProperties(keys);
+ E result = findByProperties(keys);
return result;
}
} catch (HibernateException eee) {
@@ -305,7 +304,7 @@
}
@Override
- public Entity findByPrimaryKey(Object... k) throws TopiaException {
+ public E findByPrimaryKey(Object... k) throws TopiaException {
// TODO pour une meilleur gestion des problemes a la compilation
// mettre un premier couple (propName, value) en argument ca evitera
// de pouvoir appeler cette methode sans argument
@@ -320,7 +319,7 @@
keys.put(pnames[ikey], k[ikey]);
}
- Entity result = findByProperties(keys);
+ E result = findByProperties(keys);
return result;
}
} catch (HibernateException eee) {
@@ -332,7 +331,7 @@
}
@Override
- public Entity findByProperties(String propertyName, Object value,
+ public E findByProperties(String propertyName, Object value,
Object... others) throws TopiaException {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(propertyName, value);
@@ -353,12 +352,12 @@
+ " La dernière propriété était: " + name, eee);
}
}
- Entity result = findByProperties(properties);
+ E result = findByProperties(properties);
return result;
}
@Override
- public List<Entity> findAllByProperties(String propertyName, Object value,
+ public List<E> findAllByProperties(String propertyName, Object value,
Object... others) throws TopiaException {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(propertyName, value);
@@ -379,15 +378,15 @@
+ " La dernière propriété était: " + name, eee);
}
}
- List<Entity> result = findAllByProperties(properties);
+ List<E> result = findAllByProperties(properties);
return result;
}
@Override
- public Entity findContainsProperties(Map<String, Collection> properties)
+ public E findContainsProperties(Map<String, Collection> properties)
throws TopiaException {
- List<Entity> results = findAllContainsProperties(properties);
- Entity result = null;
+ List<E> results = findAllContainsProperties(properties);
+ E result = null;
if (results.size() > 0) {
result = results.get(0);
}
@@ -395,7 +394,7 @@
}
@Override
- public Entity findContainsProperties(String propertyName,
+ public E findContainsProperties(String propertyName,
Collection values, Object... others) throws TopiaException {
Map<String, Collection> properties = new HashMap<String, Collection>();
properties.put(propertyName, values);
@@ -416,7 +415,7 @@
+ " La dernière propriété était: " + name, eee);
}
}
- Entity result = findContainsProperties(properties);
+ E result = findContainsProperties(properties);
return result;
}
@@ -436,10 +435,10 @@
* @throws org.nuiton.topia.TopiaException if any pb
*/
@Override
- public List<Entity> findAllContainsProperties(Map<String, Collection> properties) throws TopiaException {
- List<Entity> all = findAll();
- List<Entity> result = new ArrayList<Entity>();
- for (Entity e : all) {
+ public List<E> findAllContainsProperties(Map<String, Collection> properties) throws TopiaException {
+ List<E> all = findAll();
+ List<E> result = new ArrayList<E>();
+ for (E e : all) {
boolean ok = true;
try {
for (Entry<String, Collection> kv : properties.entrySet()) {
@@ -481,7 +480,7 @@
}
@Override
- public List<Entity> findAllContainsProperties(String propertyName,
+ public List<E> findAllContainsProperties(String propertyName,
Collection values, Object... others) throws TopiaException {
Map<String, Collection> properties = new HashMap<String, Collection>();
properties.put(propertyName, values);
@@ -502,25 +501,25 @@
+ " La dernière propriété était: " + name, eee);
}
}
- List<Entity> result = findAllContainsProperties(properties);
+ List<E> result = findAllContainsProperties(properties);
return result;
}
@Override
- public List<Entity> findAllByProperty(String propertyName, Object value)
+ public List<E> findAllByProperty(String propertyName, Object value)
throws TopiaException {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(propertyName, value);
- List<Entity> result = findAllByProperties(properties);
+ List<E> result = findAllByProperties(properties);
return result;
}
@Override
- public Entity findByProperty(String propertyName, Object value)
+ public E findByProperty(String propertyName, Object value)
throws TopiaException {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(propertyName, value);
- Entity result = findByProperties(properties);
+ E result = findByProperties(properties);
return result;
}
@@ -629,11 +628,11 @@
* ou a appeler vous aussi ces deux methodes.
*/
@Override
- public Entity create(Map<String, Object> properties) throws TopiaException {
- Entity result = instanciateNew();
+ public E create(Map<String, Object> properties) throws TopiaException {
+ E result = instanciateNew();
// TODO reflechir s'il ne faudrait pas creer l'id avant l'event precedent
- // reflechir toujours dans un context on les Entity pourrait ne pas
+ // reflechir toujours dans un context on les E pourrait ne pas
// etre des TopiaEntity
if (result instanceof TopiaEntity) {
String topiaId = TopiaId.create(entityClass);
@@ -668,7 +667,7 @@
}
@Override
- public Entity update(Entity e) throws TopiaException {
+ public E update(E e) throws TopiaException {
try {
getSession().saveOrUpdate(e);
getContext().getFiresSupport().warnOnUpdateEntity(e);
@@ -679,7 +678,7 @@
}
@Override
- public void delete(Entity e) throws TopiaException {
+ public void delete(E e) throws TopiaException {
try {
getSession().delete(e);
getContext().getFiresSupport().warnOnDeleteEntity(e);
@@ -689,46 +688,63 @@
}
@Override
- public Entity findByTopiaId(String k) throws TopiaException {
- return query(Restrictions.idEq(k));
+ public E findByTopiaId(String k) throws TopiaException {
+ return createQuery().add(TopiaEntity.TOPIA_ID, k).executeToEntity();
+ //return query(Restrictions.idEq(k));
}
@Override
- public List<Entity> findAll() throws TopiaException {
- try {
- Criteria criteria = createCriteria(FlushMode.AUTO);
- List<Entity> result = (List<Entity>) criteria.list();
- result = getContext().getFiresSupport().fireEntitiesLoad(context,
- result);
- return result;
- } catch (HibernateException eee) {
- throw new TopiaException(eee);
- }
+ public List<E> findAll() throws TopiaException {
+// try {
+// Criteria criteria = createCriteria(FlushMode.AUTO);
+// List<E> result = (List<E>) criteria.list();
+// result = getContext().getFiresSupport().fireEntitiesLoad(context,
+// result);
+// return result;
+// } catch (HibernateException eee) {
+// throw new TopiaException(eee);
+// }
+ return createQuery().executeToEntityList();
}
@Override
public List<String> findAllIds() throws TopiaException {
- List<String> find = context.find("select src.topiaId from " + entityClass.getSimpleName() + "Impl src");
- return find;
+ //List<String> find = context.find("select src.topiaId from " + entityClass.getSimpleName() + "Impl src");
+ //return find;
+ return createQuery().addSelect(TopiaEntity.TOPIA_ID).execute(context);
}
+ @Override
+ public TopiaQuery<E> createQuery() {
+ return TopiaQuery.createQuery(this);
+ }
+ @Override
+ public TopiaQuery<E> createQuery(String entityAlias) {
+ return TopiaQuery.createQuery(this, entityAlias);
+ }
@Override
- public List<Entity> findAllWithOrder(String... propertyNames)
+ public List<E> findAllWithOrder(String... propertyNames)
throws TopiaException {
- try {
- Criteria criteria = createCriteria(FlushMode.AUTO);
- for (String propertyName : propertyNames) {
- criteria.addOrder(Order.asc(propertyName));
- }
- List<Entity> result = (List<Entity>) criteria.list();
- result = getContext().getFiresSupport().fireEntitiesLoad(context,
- result);
- return result;
- } catch (HibernateException eee) {
- throw new TopiaException(eee);
+// try {
+// Criteria criteria = createCriteria(FlushMode.AUTO);
+// for (String propertyName : propertyNames) {
+// criteria.addOrder(Order.asc(propertyName));
+// }
+// List<E> result = (List<E>) criteria.list();
+// result = getContext().getFiresSupport().fireEntitiesLoad(context,
+// result);
+// return result;
+// } catch (HibernateException eee) {
+// throw new TopiaException(eee);
+// }
+
+ TopiaQuery<E> query = createQuery();
+ for (String propertyName : propertyNames) {
+ query.addOrder(propertyName);
}
+ return query.executeToEntityList();
}
/**
@@ -742,69 +758,71 @@
//int result = findAll().size();
// List result = this.getContext().find("SELECT count(*) FROM " + getEntityClass().getName() + "Impl");
// return (Long)result.get(0);
- return new TopiaQuery(getEntityClass()).executeCount(context);
+ return createQuery().executeCount(context);
}
@Override
- public Entity findByProperties(Map<String, Object> properties)
+ public E findByProperties(Map<String, Object> properties)
throws TopiaException {
- return query(Restrictions.allEq(properties));
+ //return query(Restrictions.allEq(properties));
+ return createQuery().add(properties).executeToEntity();
}
@Override
- public List<Entity> findAllByProperties(Map<String, Object> properties)
+ public List<E> findAllByProperties(Map<String, Object> properties)
throws TopiaException {
- return queryAll(Restrictions.allEq(properties));
+ return createQuery().add(properties).executeToEntityList();
+ //return queryAll(Restrictions.allEq(properties));
}
- private List<Entity> queryAll(Criterion criterion) throws TopiaException {
- try {
- Criteria criteria = createCriteria(FlushMode.AUTO);
- criteria.add(criterion);
- List<Entity> result = (List<Entity>) criteria.list();
- result = getContext().getFiresSupport().fireEntitiesLoad(context,
- result);
- return result;
- } catch (HibernateException eee) {
- throw new TopiaException(eee);
- }
- }
+// private List<E> queryAll(Criterion criterion) throws TopiaException {
+// try {
+// Criteria criteria = createCriteria(FlushMode.AUTO);
+// criteria.add(criterion);
+// List<E> result = (List<E>) criteria.list();
+// result = getContext().getFiresSupport().fireEntitiesLoad(context,
+// result);
+// return result;
+// } catch (HibernateException eee) {
+// throw new TopiaException(eee);
+// }
+// }
+//
+// private E query(Criterion criterion) throws TopiaException {
+// try {
+// Criteria criteria = createCriteria(FlushMode.AUTO);
+// criteria.add(criterion);
+// criteria.setMaxResults(1);
+// List<E> result = (List<E>) criteria.list();
+// int sizeBefore = (result != null ? result.size() : 0);
+// result = getContext().getFiresSupport().fireEntitiesLoad(context,
+// result);
+// int sizeAfter = (result != null ? result.size() : 0);
+// if (sizeAfter < sizeBefore) {
+// if (log.isDebugEnabled()) {
+// log.debug((sizeBefore - sizeAfter)
+// + " element(s) removed. Filter entity: "
+// + entityClass.getName() + " - criterion: "
+// + criterion);
+// }
+// }
+// if (result != null && result.size() > 0) {
+// E elem = result.get(0);
+// return elem;
+// }
+// return null;
+// } catch (HibernateException eee) {
+// throw new TopiaException(eee);
+// }
+// }
- private Entity query(Criterion criterion) throws TopiaException {
- try {
- Criteria criteria = createCriteria(FlushMode.AUTO);
- criteria.add(criterion);
- criteria.setMaxResults(1);
- List<Entity> result = (List<Entity>) criteria.list();
- int sizeBefore = (result != null ? result.size() : 0);
- result = getContext().getFiresSupport().fireEntitiesLoad(context,
- result);
- int sizeAfter = (result != null ? result.size() : 0);
- if (sizeAfter < sizeBefore) {
- if (log.isDebugEnabled()) {
- log.debug((sizeBefore - sizeAfter)
- + " element(s) removed. Filter entity: "
- + entityClass.getName() + " - criterion: "
- + criterion);
- }
- }
- if (result != null && result.size() > 0) {
- Entity elem = result.get(0);
- return elem;
- }
- return null;
- } catch (HibernateException eee) {
- throw new TopiaException(eee);
- }
- }
-
//FIXME : Commenté car impossible de trouver le bon Criterion
// ATTENTION ancienne methode du TopiaDAOAbstract deja presente dans le fichier
// /* (non-Javadoc)
// * @see org.nuiton.topia.persistence.TopiaDAO#findContainsProperties(java.util.Map)
// */
- // public Entity findContainsProperties(Map<String, Collection> properties) throws TopiaException {
+ // public E findContainsProperties(Map<String, Collection> properties) throws TopiaException {
// try {
// Criteria criteria = createCriteria(FlushMode.AUTO);
// for (Entry<String, Collection> entry : properties.entrySet()) {
@@ -813,9 +831,9 @@
// }
// }
// criteria.setMaxResults(1);
- // List<Entity> results = (List<Entity>)criteria.list();
+ // List<E> results = (List<E>)criteria.list();
// if (results.size() > 0) {
- // return (Entity)results.get(0);
+ // return (E)results.get(0);
// } else {
// return null;
// }
@@ -827,7 +845,7 @@
// /* (non-Javadoc)
// * @see org.nuiton.topia.persistence.TopiaDAO#findAllContainsProperties(java.util.Map)
// */
- // public List<Entity> findAllContainsProperties(Map<String, Collection> properties) throws TopiaException {
+ // public List<E> findAllContainsProperties(Map<String, Collection> properties) throws TopiaException {
// try {
// Criteria criteria = createCriteria(FlushMode.AUTO);
// for (Entry<String, Collection> entry : properties.entrySet()) {
@@ -835,7 +853,7 @@
// criteria.add(Restrictions.eq(entry.getKey(), value));
// }
// }
- // List<Entity> result = (List<Entity>)criteria.list();
+ // List<E> result = (List<E>)criteria.list();
// return result;
// } catch (HibernateException eee) {
// throw new TopiaException(eee);
1
0
r1742 - trunk/topia-persistence/src/main/java/org/nuiton/topia/generator
by echatellier@users.nuiton.org 04 Jan '10
by echatellier@users.nuiton.org 04 Jan '10
04 Jan '10
Author: echatellier
Date: 2010-01-04 10:28:49 +0100 (Mon, 04 Jan 2010)
New Revision: 1742
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java
Log:
Fix javadoc
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java 2009-12-29 12:12:40 UTC (rev 1741)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java 2010-01-04 09:28:49 UTC (rev 1742)
@@ -138,7 +138,7 @@
*/
public static final String TAG_NATURAL_ID_MUTABLE = "naturalIdMutable";
/**
- * Tag pour spécifier la caractèrelazy d'une association multiple
+ * Tag pour spécifier la caractère lazy d'une association multiple
*/
public static final String TAG_LAZY = "lazy";
/**
1
0