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
14 Jun '10
Author: tchemit
Date: 2010-06-14 11:13:07 +0200 (Mon, 14 Jun 2010)
New Revision: 2011
Url: http://nuiton.org/repositories/revision/topia/2011
Log:
add headers
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityFilter.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFilter.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOLegacy.java
trunk/topia-persistence/src/test/java/org/nuiton/topiatest/ExtraDAOEntityDAOImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.event;
/**
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityFilter.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityFilter.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/EntityFilter.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.framework;
import java.beans.PropertyChangeListener;
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFilter.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFilter.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFilter.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.framework;
import org.apache.commons.lang.StringUtils;
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOLegacy.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOLegacy.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOLegacy.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
/* *##%
* ToPIA :: Persistence
* Copyright (C) 2004 - 2009 CodeLutin
Modified: trunk/topia-persistence/src/test/java/org/nuiton/topiatest/ExtraDAOEntityDAOImpl.java
===================================================================
--- trunk/topia-persistence/src/test/java/org/nuiton/topiatest/ExtraDAOEntityDAOImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-persistence/src/test/java/org/nuiton/topiatest/ExtraDAOEntityDAOImpl.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topiatest;
import org.nuiton.topia.TopiaException;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
import java.lang.reflect.Array;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
import org.nuiton.topia.persistence.TopiaEntity;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
import java.util.ArrayList;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
import java.util.ArrayList;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration;
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java 2010-06-13 18:18:35 UTC (rev 2010)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java 2010-06-14 09:13:07 UTC (rev 2011)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * ToPIA :: Service Migration
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2004 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.topia.migration.mappings;
import org.apache.commons.logging.Log;
1
0
Author: tchemit
Date: 2010-06-13 20:18:35 +0200 (Sun, 13 Jun 2010)
New Revision: 2010
Url: http://nuiton.org/repositories/revision/topia/2010
Log:
replace since 2.4 by 2.3.4
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.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
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationCallback.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -7,7 +7,7 @@
* without to have to implements all methods.
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 2.4
+ * @since 2.3.4
*/
public class TopiaContextAdapter implements TopiaContextListener {
@Override
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaTransactionEvent.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -99,7 +99,7 @@
/**
* @return the source context that fires the event
- * @deprecated since 2.4, prefer the overriden {@link #getSource()}.
+ * @deprecated since 2.3.4, prefer the overriden {@link #getSource()}.
*/
@Deprecated
public TopiaContext getTopiaContext() {
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -122,7 +122,7 @@
/**
* @return a collection of {@link TopiaService}
- * @deprecated since 2.4 : useless method, use {@link #getServices()} instead
+ * @deprecated since 2.3.4 : useless method, use {@link #getServices()} instead
*/
@Deprecated
Collection<TopiaService> getAllServices();
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-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaQuery.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -272,7 +272,7 @@
protected String mainAlias;
/**
- * @deprecated since 2.4 : need calling right execute method directly from
+ * @deprecated since 2.3.4 : need calling right execute method directly from
* DAO
*/
@Deprecated
@@ -351,7 +351,7 @@
* added to the select part of the query if it is needed.
*
* @param dao DAO linked to the entity to threat
- * @deprecated since 2.4 : instantiate the query from DAO {@link
+ * @deprecated since 2.3.4 : instantiate the query from DAO {@link
* TopiaDAO#createQuery()}
*/
@Deprecated
@@ -367,7 +367,7 @@
*
* @param dao DAO linked to the entity to threat
* @param alias of the main entity in the query
- * @deprecated since 2.4 : instantiate the query from DAO {@link
+ * @deprecated since 2.3.4 : instantiate the query from DAO {@link
* TopiaDAO#createQuery(String)}
*/
@Deprecated
@@ -413,7 +413,7 @@
* @see #addFrom(Class, String)
* @see #addJoin(String, String, boolean)
* @see #addLeftJoin(String, String, boolean)
- * @deprecated since 2.4 use correct addFrom or addJoin or addLeftJoin
+ * @deprecated since 2.3.4 use correct addFrom or addJoin or addLeftJoin
*/
@Deprecated
public TopiaQuery addFrom(String str) {
@@ -428,7 +428,7 @@
* @param separator The separator to use before adding the element (if null
* the {@link #FROM_SEPARATOR_DEFAULT} will be used).
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
protected TopiaQuery addFrom(String separator, String property, String alias) {
if (!separator.equals(FROM_SEPARATOR_DEFAULT)) {
@@ -454,7 +454,7 @@
* @param fetch Add FETCH keyword to load the property in result (avoid
* lazy initialization)
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addJoin(String property, String alias, boolean fetch) {
return addFromJoin(FROM_SEPARATOR_JOIN, property, alias, fetch);
@@ -474,7 +474,7 @@
* @param fetch Add FETCH keyword to load the property in result (avoid
* lazy initialization)
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addLeftJoin(String property, String alias, boolean fetch) {
return addFromJoin(FROM_SEPARATOR_LEFT_JOIN, property, alias, fetch);
@@ -673,7 +673,7 @@
/**
* @param where
* @return TopiaQuery
- * @deprecated since 2.4, use {@link #addWhere(String)} instead
+ * @deprecated since 2.3.4, use {@link #addWhere(String)} instead
*/
@Deprecated
public TopiaQuery add(String where) {
@@ -686,7 +686,7 @@
*
* @param where element to add
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addWhere(String where) {
if (StringUtils.isEmpty(where)) {
@@ -714,7 +714,7 @@
* @param constraint
* @param paramValue
* @return TopiaQuery
- * @deprecated since 2.4, use {@link #addWhere(String, Op, Object)} instead
+ * @deprecated since 2.3.4, use {@link #addWhere(String, Op, Object)} instead
*/
@Deprecated
public TopiaQuery add(String paramName, Op constraint, Object paramValue) {
@@ -736,7 +736,7 @@
* @param paramValue the value of the parameter (an other entity, a String,
* ...)
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addWhere(String paramName, Op operator, Object paramValue) {
StringBuilder result = new StringBuilder(paramName).append(' ');
@@ -773,7 +773,7 @@
* @param paramValue
* @return TopiaQuery
* @since 2.3.1
- * @deprecated since 2.4, use {@link #addEquals(String, Object...)} instead
+ * @deprecated since 2.3.4, use {@link #addEquals(String, Object...)} instead
*/
public TopiaQuery add(String paramName, Object... paramValue) {
return addEquals(paramName, paramValue);
@@ -793,7 +793,7 @@
* @param paramValue values of the parameter
* @return the TopiaQuery
* @see TopiaQuery#addWhere(String, Op, Object)
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addEquals(String paramName, Object... paramValue) {
if (paramValue == null) {
@@ -847,7 +847,7 @@
/**
* @param properties
* @return TopiaQuery
- * @deprecated since 2.4 use {@link #addEquals(Map)}
+ * @deprecated since 2.3.4 use {@link #addEquals(Map)}
*/
@Deprecated
public TopiaQuery add(Map<String, Object> properties) {
@@ -862,7 +862,7 @@
*
* @param properties to add to the query
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addEquals(Map<String, Object> properties) {
for (String key : properties.keySet()) {
@@ -962,7 +962,7 @@
* @param elementProperty contains in containerProperty collection
* @param containerProperty collection which contains elementProperty
* @return the TopiaQuery
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addInElements(String elementProperty, String containerProperty) {
StringBuilder builder = new StringBuilder(elementProperty).
@@ -989,7 +989,7 @@
* @param subquery existing topiaQuery as subquery
* @return the TopiaQuery
* @see TopiaQuery#getValueName(String)
- * @since 2.4
+ * @since 2.3.4
*/
public TopiaQuery addSubQuery(String queryPart,
TopiaQuery subquery) {
@@ -1295,7 +1295,7 @@
* @return a List of results
* @throws TopiaException for error during execution
* @see #execute(TopiaContext)
- * @deprecated since 2.4, need transaction, use {@link #execute(TopiaContext)}
+ * @deprecated since 2.3.4, need transaction, use {@link #execute(TopiaContext)}
*/
@Deprecated
public List execute() throws TopiaException {
@@ -1458,7 +1458,7 @@
* @return an Object
* @throws TopiaException for error on query execution
* @see #executeToObject(TopiaContext, String)
- * @deprecated since 2.4, need transaction, use {@link #executeToObject(TopiaContext,
+ * @deprecated since 2.3.4, need transaction, use {@link #executeToObject(TopiaContext,
* String)}
*/
@Deprecated
@@ -1490,7 +1490,7 @@
* @return an Integer
* @throws TopiaException for error on query execution
* @see #executeToInteger(TopiaContext, String)
- * @deprecated since 2.4, need transaction, use {@link #executeToInteger(TopiaContext,
+ * @deprecated since 2.3.4, need transaction, use {@link #executeToInteger(TopiaContext,
* String)}
*/
@Deprecated
@@ -1521,7 +1521,7 @@
* @return a String result
* @throws TopiaException for error on query execution
* @see #executeToString(TopiaContext, String)
- * @deprecated since 2.4, need transaction, use {@link #executeToString(TopiaContext,
+ * @deprecated since 2.3.4, need transaction, use {@link #executeToString(TopiaContext,
* String)}
*/
@Deprecated
@@ -1568,7 +1568,7 @@
* @return an int corresponding to the number of result in the query
* @throws TopiaException for error on query execution
* @see #executeCount(TopiaContext)
- * @deprecated since 2.4, use {@link TopiaDAO#countByQuery(TopiaQuery)}
+ * @deprecated since 2.3.4, use {@link TopiaDAO#countByQuery(TopiaQuery)}
*/
@Deprecated
public int executeCount() throws TopiaException {
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -83,7 +83,7 @@
* </ul>
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 2.4
+ * @since 2.3.4
* @plexus.component role="org.nuiton.eugene.Template" role-hint="org.nuiton.topia.generator.EntityTransformer"
*/
public class EntityTransformer extends ObjectModelTransformerToJava {
@@ -466,7 +466,7 @@
ObjectModelOperation op = addOperation(output, "update", "void",
ObjectModelModifier.PUBLIC);
addException(op, TopiaException.class);
- setDocumentation(op,"@deprecated since 2.4, use the DAO api instead.");
+ setDocumentation(op,"@deprecated since 2.3.4, use the DAO api instead.");
addAnnotation(output, op, Deprecated.class.getSimpleName());
addAnnotation(output, op, Override.class.getSimpleName());
setOperationBody(op, ""
@@ -477,7 +477,7 @@
op = addOperation(output, "delete", "void", ObjectModelModifier.PUBLIC);
addException(op, TopiaException.class);
- setDocumentation(op,"@deprecated since 2.4, use the DAO api instead.");
+ setDocumentation(op,"@deprecated since 2.3.4, use the DAO api instead.");
addAnnotation(output, op, Deprecated.class.getSimpleName());
addAnnotation(output, op, Override.class.getSimpleName());
setOperationBody(op, ""
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/InterfaceTransformer.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -44,7 +44,7 @@
* @author fdesbois <fdesbois(a)codelutin.com>
* @version $Id$
* @plexus.component role="org.nuiton.eugene.Template" role-hint="org.nuiton.topia.generator.InterfaceTransformer"
- * @deprecated since 2.4 use {@link org.nuiton.eugene.java.JavaInterfaceTransformer} instead
+ * @deprecated since 2.3.4 use {@link org.nuiton.eugene.java.JavaInterfaceTransformer} instead
*/
@Deprecated
public class InterfaceTransformer extends ObjectModelTransformerToJava {
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 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaGeneratorUtil.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -83,7 +83,7 @@
public static final String STEREOTYPE_DTO = "dto";
/**
* Stéréotype pour les objets devant être générées sous forme de bean
- * @deprecated since 2.4, prefer use the
+ * @deprecated since 2.3.4, prefer use the
* {@link JavaGeneratorUtil#STEREOTYPE_BEAN} method.
*/
@Deprecated
@@ -115,7 +115,7 @@
public static final String STEREOTYPE_ARRAY = "array";
/**
* dependency to add extra operations for entity dao.
- * @since 2.4
+ * @since 2.3.4
*/
public static final String DEPENDENCIES_DAO = "dao";
/**
@@ -587,7 +587,7 @@
*
* @param attr l'attribut a traiter
* @return le nom de l'attribut de classe d'association
- * @deprecated since 2.4, prefer use the
+ * @deprecated since 2.3.4, prefer use the
* {@link GeneratorUtil#getAssocAttrName(ObjectModelAttribute)}
*/
@Deprecated
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-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAO.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -112,7 +112,7 @@
* si l'une echoué les autres echoue aussi.
*
* @throws TopiaException if any pb while commit
- * @deprecated since 2.4 do nothing in dao implementation generated, not
+ * @deprecated since 2.3.4 do nothing in dao implementation generated, not
* well placed
*/
@Deprecated
@@ -122,7 +122,7 @@
* Appelé lorsque le context a eu un rollback de fait.
*
* @throws TopiaException if any pb while rollback
- * @deprecated since 2.4 do nothing in dao implementation generated, not
+ * @deprecated since 2.3.4 do nothing in dao implementation generated, not
* well placed
*/
@Deprecated
@@ -376,7 +376,7 @@
* @param id unique id of the entity to test existence.
* @return true if entity exists, false otherwise
* @throws TopiaException for Topia errors
- * @since 2.4
+ * @since 2.3.4
*/
boolean existByTopiaId(String id) throws TopiaException;
@@ -390,7 +390,7 @@
* @param others altern propertyName and propertyValue
* @return true if entity exists, false otherwise
* @throws TopiaException for Topia errors
- * @since 2.4
+ * @since 2.3.4
*/
boolean existByProperties(String propertyName, Object propertyValue,
Object... others) throws TopiaException;
@@ -402,7 +402,7 @@
* @param query query used to test existence
* @return true if entity exists, false otherwise
* @throws TopiaException
- * @since 2.4
+ * @since 2.3.4
*/
boolean existByQuery(TopiaQuery query) throws TopiaException;
@@ -411,7 +411,7 @@
*
* @return le nombre total d'entites existantes
* @throws TopiaException if any pb while getting datas
- * @deprecated since 2.4 ambiguous name, use {@link #count()} instead.
+ * @deprecated since 2.3.4 ambiguous name, use {@link #count()} instead.
*/
@Deprecated
long size() throws TopiaException;
@@ -421,7 +421,7 @@
*
* @return number of total entities
* @throws TopiaException if any pb while getting datas
- * @since 2.4
+ * @since 2.3.4
*/
int count() throws TopiaException;
@@ -430,7 +430,7 @@
*
* @return number of entities filtered by the query
* @throws TopiaException if any pb while getting datas
- * @since 2.4
+ * @since 2.3.4
*/
int countByQuery(TopiaQuery query) throws TopiaException;
@@ -466,7 +466,7 @@
* @param properties les proprietes a utiliser
* @return l'entité trouvé
* @throws TopiaException if any pb while getting datas
- * @deprecated since 2.4 strange method, not very useful, use {@link
+ * @deprecated since 2.3.4 strange method, not very useful, use {@link
* TopiaQuery} instead
*/
@Deprecated
@@ -482,7 +482,7 @@
* @param others les secondes valeurs ) tester
* @return l'entité trouvé
* @throws TopiaException if any pb while getting datas
- * @deprecated since 2.4 strange method, not very useful, use {@link
+ * @deprecated since 2.3.4 strange method, not very useful, use {@link
* TopiaQuery} instead
*/
@Deprecated
@@ -496,7 +496,7 @@
* @param properties les propriétés à tester
* @return l'entité trouvé
* @throws TopiaException if any pb while getting datas
- * @deprecated since 2.4 strange method, not very useful, use {@link
+ * @deprecated since 2.3.4 strange method, not very useful, use {@link
* TopiaQuery} instead
*/
@Deprecated
@@ -512,7 +512,7 @@
* @param others les secondes valeurs à tester
* @return l'entité trouvé
* @throws TopiaException if any pb while getting datas
- * @deprecated since 2.4 strange method, not very useful, use {@link
+ * @deprecated since 2.3.4 strange method, not very useful, use {@link
* TopiaQuery} instead
*/
@Deprecated
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-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaDAOImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -608,7 +608,7 @@
* Count number of existing entities using {@link TopiaQuery#executeCount(TopiaContext)}
*
* @return a long for the number of entities in database
- * @deprecated since 2.4 ambiguous name, use {@link #count()} instead.
+ * @deprecated since 2.3.4 ambiguous name, use {@link #count()} instead.
*/
@Override
@Deprecated
@@ -765,7 +765,7 @@
* @param properties
* @return the list of entities corresponding to the request
* @throws TopiaException if any pb
- * @deprecated since 2.4
+ * @deprecated since 2.3.4
*/
@Override
@Deprecated
@@ -800,7 +800,7 @@
return result;
}
- /** @deprecated since 2.4 */
+ /** @deprecated since 2.3.4 */
@Override
@Deprecated
public List<E> findAllContainsProperties(String propertyName,
@@ -837,7 +837,7 @@
* @param mode le FlushMode du Criteria
* @return le Criteria nouvellement créé
* @throws TopiaException if any pb
- * @deprecated since 2.4 Criteria is no longer used, prefer using {@link
+ * @deprecated since 2.3.4 Criteria is no longer used, prefer using {@link
* TopiaQuery}
*/
@Deprecated
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/TopiaEntity.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -139,7 +139,7 @@
* overide it to do something after creation
*
* @throws TopiaException if any pb
- * @deprecated since 2.4 : don't really know is concrete usage, the needed
+ * @deprecated since 2.3.4 : don't really know is concrete usage, the needed
* treatment can be directly done after creating the entity with
* {@link TopiaDAO#create(Object...)}
*/
@@ -148,7 +148,7 @@
/**
* @throws TopiaException if any pb
- * @deprecated since 2.4 : context will no longer be keeped by the entity,
+ * @deprecated since 2.3.4 : context will no longer be keeped by the entity,
* so it will be impossible to do such operation. Use {@link
* TopiaDAO#update(TopiaEntity)} instead.
*/
@@ -157,7 +157,7 @@
/**
* @throws TopiaException if any pb
- * @deprecated since 2.4 : context will no longer be keeped by the entity,
+ * @deprecated since 2.3.4 : context will no longer be keeped by the entity,
* so it will be impossible to do such operation. Use {@link
* TopiaDAO#delete(TopiaEntity)} instead.
*/
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/DatabaseManager.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -63,7 +63,7 @@
* @author Eon Sébastien
* @author Trève Vincent
* @version $Revision$
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class DatabaseManager {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationCallback.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -47,7 +47,7 @@
*
* @author tchemit <chemit(a)codelutin.com>
* @version $Revision$
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationCallback}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationCallback}
*/
@Deprecated
public abstract class ManualMigrationCallback {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/ManualMigrationEngine.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -63,7 +63,7 @@
* Classe principale du projet.
*
* @author tchemit
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class ManualMigrationEngine //extends MigrationServiceImpl
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationService.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -38,7 +38,7 @@
* @version $Revision$
*
* Last update : $Date$
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface MigrationService {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -59,7 +59,7 @@
* @author Chevallereau Benjamin
* @author Eon S�bastien
* @author Tr�ve Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class MigrationServiceImpl implements MigrationService {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -27,7 +27,7 @@
/**
* update :
- * @deprecated since 2.4, use the DAO api instead.
+ * @deprecated since 2.3.4, use the DAO api instead.
* @throws TopiaException
*/
@@ -39,7 +39,7 @@
/**
* delete :
- * @deprecated since 2.4, use the DAO api instead.
+ * @deprecated since 2.3.4, use the DAO api instead.
* @throws TopiaException
*/
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationCallback.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationCallback.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationCallback.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -49,7 +49,7 @@
*
* @author tchemit <chemit(a)codelutin.com>
* @version $Id$
- * @since 2.4
+ * @since 2.3.4
*/
public abstract class TopiaMigrationCallback {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -63,7 +63,7 @@
*
* @author tchemit
* @version $Id$
- * @since 2.4
+ * @since 2.3.4
*/
public class TopiaMigrationEngine implements TopiaMigrationService {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationServiceImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -49,7 +49,7 @@
* @author Chevallereau Benjamin
* @author Eon S�bastien
* @author Tr�ve Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class TopiaMigrationServiceImpl extends MigrationServiceImpl implements TopiaMigrationService, TopiaContextListener, TopiaTransactionVetoable {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/callback/MigrationCallbackHandler.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -32,7 +32,7 @@
* MigrationCallBackHandler
*
* @author chatellier
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface MigrationCallbackHandler {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ExceptionAttributeUndefined.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -36,7 +36,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class ExceptionAttributeUndefined extends Exception {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapter.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -39,7 +39,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface MapAdapter {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterAdmin.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -40,7 +40,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface MapAdapterAdmin extends MapAdapter {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/MapAdapterImpl.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -44,7 +44,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class MapAdapterImpl implements MapAdapter, MapAdapterAdmin {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClass.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -36,7 +36,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface ProxyClass {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/ProxyClassMapped.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -39,7 +39,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface ProxyClassMapped {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClass.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -36,7 +36,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class SimpleProxyClass implements ProxyClass {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/common/SimpleProxyClassMapped.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -37,7 +37,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class SimpleProxyClassMapped implements ProxyClassMapped {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/BaseException.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -34,7 +34,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class BaseException extends Exception {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationAdapter.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -67,7 +67,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class ConfigurationAdapter {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ConfigurationHelper.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -61,7 +61,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class ConfigurationHelper {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/DependenciesHelper.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -59,7 +59,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class DependenciesHelper {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/NullMigrationClass.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -37,7 +37,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class NullMigrationClass extends MigrationClass {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/ObjectNotFound.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -34,7 +34,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class ObjectNotFound extends Exception {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/kernel/Transformer.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -56,7 +56,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class Transformer implements MapHelper {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -25,7 +25,7 @@
* TMSVersion DAO helper.
*
* @author tchemit <chemit(a)codelutin.com>
- * @since 2.4
+ * @since 2.3.4
*/
public class TMSVersionDAO {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/AbstractMigration.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -38,7 +38,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public abstract class AbstractMigration implements Migration {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/FinderMigration.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -38,7 +38,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class FinderMigration {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MapHelper.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -42,7 +42,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface MapHelper {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/Migration.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -38,7 +38,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public interface Migration {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationClass.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -37,7 +37,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class MigrationClass implements Comparable<MigrationClass> {
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java 2010-06-13 17:48:26 UTC (rev 2009)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/transformation/MigrationNull.java 2010-06-13 18:18:35 UTC (rev 2010)
@@ -35,7 +35,7 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @deprecated since 2.3.4, please use now the simplify service {@link TopiaMigrationEngine}
*/
@Deprecated
public class MigrationNull extends AbstractMigration {
1
0
r2009 - in trunk/topia-service-migration: . src/main/java/org/nuiton/topia/migration src/main/java/org/nuiton/topia/migration/mappings src/main/resources/org/nuiton/topia/migration src/main/resources/org/nuiton/topia/migration/mappings
by tchemit@users.nuiton.org 13 Jun '10
by tchemit@users.nuiton.org 13 Jun '10
13 Jun '10
Author: tchemit
Date: 2010-06-13 19:48:26 +0200 (Sun, 13 Jun 2010)
New Revision: 2009
Url: http://nuiton.org/repositories/revision/topia/2009
Log:
finalize migration of migration service (no more generation (all stuff was pushed back to source and will disappear soon)
Added:
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/TMSVersionImpl.hbm.xml
Modified:
trunk/topia-service-migration/pom.xml
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java
trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/mappings/TMSVersion.hbm.xml
Modified: trunk/topia-service-migration/pom.xml
===================================================================
--- trunk/topia-service-migration/pom.xml 2010-06-13 17:30:39 UTC (rev 2008)
+++ trunk/topia-service-migration/pom.xml 2010-06-13 17:48:26 UTC (rev 2009)
@@ -102,12 +102,12 @@
<resources>
- <resource>
+ <!--resource>
<directory>${maven.gen.dir}/java</directory>
<includes>
<include>**/*.hbm.xml</include>
</includes>
- </resource>
+ </resource-->
<resource>
<directory>${maven.src.dir}/main/resources</directory>
@@ -121,7 +121,7 @@
<plugins>
- <plugin>
+ <!--plugin>
<groupId>org.nuiton.eugene</groupId>
<artifactId>maven-eugene-plugin</artifactId>
<executions>
@@ -146,7 +146,7 @@
<scope>compile</scope>
</dependency>
</dependencies>
- </plugin>
+ </plugin-->
<plugin>
<groupId>org.nuiton.i18n</groupId>
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,267 @@
+package org.nuiton.topia.migration;
+
+import java.lang.reflect.Array;
+import java.util.Arrays;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.topia.persistence.TopiaEntityEnum;
+
+@Deprecated
+public class MigrationServiceDAOHelper {
+
+
+
+ public enum MigrationServiceEntityEnum implements TopiaEntityEnum {
+
+ TMSVersion(TMSVersion.class);
+ /**
+ * the contract of the entity
+ */
+ protected Class<? extends TopiaEntity> contract;
+ /**
+ * the fully qualified name of the implementation of the entity
+ */
+ protected String implementationFQN;
+ /**
+ * the implementation class of the entity (will be lazy computed at runtime)
+ */
+ protected Class<? extends TopiaEntity> implementation;
+ /**
+ * MigrationServiceEntityEnum :
+ * @param contract
+ */
+
+ MigrationServiceEntityEnum(Class<? extends TopiaEntity > contract) {
+ this.contract = contract;
+ this.implementationFQN = contract.getName()+"Impl";
+ }
+
+ /**
+ * getContract :
+ * @return Class<? extends TopiaEntity>
+ */
+
+ public Class<? extends TopiaEntity> getContract() {
+ return contract;
+ }
+
+ /**
+ * getImplementationFQN :
+ * @return String
+ */
+
+ public String getImplementationFQN() {
+ return implementationFQN;
+ }
+
+ /**
+ * setImplementationFQN :
+ * @param implementationFQN
+ */
+
+ public void setImplementationFQN(String implementationFQN) {
+ this.implementationFQN = implementationFQN;
+ this.implementation = null;
+ }
+
+ /**
+ * accept :
+ * @param klass
+ * @return boolean
+ */
+
+ public boolean accept(Class<? extends TopiaEntity> klass) {
+ return MigrationServiceDAOHelper.getContractClass(klass) == contract;
+ }
+
+ /**
+ * getImplementation :
+ * @return Class<? extends TopiaEntity>
+ */
+
+ public Class<? extends TopiaEntity> getImplementation() {
+ if (implementation == null) {
+ try {
+ implementation = (Class<? extends TopiaEntity>) Class.forName(implementationFQN);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException("could not find class " + implementationFQN);
+ }
+ }
+ return implementation;
+ }
+
+ /**
+ * valueOf :
+ * @param entity
+ * @return MigrationServiceEntityEnum
+ */
+
+ public static MigrationServiceEntityEnum valueOf(TopiaEntity entity) {
+ return valueOf(entity.getClass());
+ }
+
+ /**
+ * valueOf :
+ * @param klass
+ * @return MigrationServiceEntityEnum
+ */
+
+ public static MigrationServiceEntityEnum valueOf(Class<?> klass) {
+ if (klass.isInterface()) {
+ return MigrationServiceEntityEnum.valueOf(klass.getSimpleName());
+ }
+ for (MigrationServiceEntityEnum entityEnum : MigrationServiceEntityEnum.values()) {
+ if (entityEnum.getContract().isAssignableFrom(klass)) {
+ //todo check it works for inheritance
+ return entityEnum;
+ }
+ }
+ throw new IllegalArgumentException("no entity defined for the class " + klass + " in : " + Arrays.toString(MigrationServiceEntityEnum.values()));
+ }
+
+
+ } //MigrationServiceEntityEnum
+ /**
+ * MigrationServiceDAOHelper :
+ */
+
+ protected MigrationServiceDAOHelper() { }
+
+ /**
+ * getModelVersion :
+ * @return String
+ */
+
+ public static String getModelVersion() {
+ return "1";
+ }
+
+ /**
+ * getModelName :
+ * @return String
+ */
+
+ public static String getModelName() {
+ return "MigrationService";
+ }
+
+ /**
+ * getTMSVersionDAO :
+ * @param context
+ * @return TMSVersionDAO
+ * @throws TopiaException
+ */
+
+ public static TMSVersionDAO getTMSVersionDAO(TopiaContext context) throws TopiaException {
+ TopiaContextImplementor ci = (TopiaContextImplementor) context;
+ TMSVersionDAO result = (TMSVersionDAO) ci.getDAO(TMSVersion.class);
+ return result;
+ }
+
+ /**
+ * getDAO :
+ * @param context
+ * @param klass
+ * @return <T extends TopiaEntity, D extends TopiaDAO<? super T>> D
+ * @throws TopiaException
+ */
+
+ public static <T extends TopiaEntity, D extends TopiaDAO<? super T>> D getDAO(TopiaContext context, Class<T> klass) throws TopiaException {
+ TopiaContextImplementor ci = (TopiaContextImplementor) context;
+ MigrationServiceEntityEnum constant = MigrationServiceEntityEnum.valueOf(klass);
+ D dao = (D) ci.getDAO(constant.getContract());
+ return dao;
+ }
+
+ /**
+ * getDAO :
+ * @param context
+ * @param entity
+ * @return <T extends TopiaEntity, D extends TopiaDAO<? super T>> D
+ * @throws TopiaException
+ */
+
+ public static <T extends TopiaEntity, D extends TopiaDAO<? super T>> D getDAO(TopiaContext context, T entity) throws TopiaException {
+ TopiaContextImplementor ci = (TopiaContextImplementor) context;
+ MigrationServiceEntityEnum constant = MigrationServiceEntityEnum.valueOf(entity);
+ D dao = (D) ci.getDAO(constant.getContract());
+ return dao;
+ }
+
+ /**
+ * getContractClass :
+ * @param klass
+ * @return <T extends TopiaEntity> Class<T>
+ */
+
+ public static <T extends TopiaEntity> Class<T> getContractClass(Class<T> klass) {
+ MigrationServiceEntityEnum constant = MigrationServiceEntityEnum.valueOf(klass);
+ return (Class<T>) constant.getContract();
+ }
+
+ /**
+ * getImplementationClass :
+ * @param klass
+ * @return <T extends TopiaEntity> Class<T>
+ */
+
+ public static <T extends TopiaEntity> Class<T> getImplementationClass(Class<T> klass) {
+ MigrationServiceEntityEnum constant = MigrationServiceEntityEnum.valueOf(klass);
+ return (Class<T>) constant.getImplementation();
+ }
+
+ /**
+ * getContractClasses :
+ * @return Class<? extends TopiaEntity>[]
+ */
+
+ public static Class<? extends TopiaEntity>[] getContractClasses() {
+ MigrationServiceEntityEnum[] values = MigrationServiceEntityEnum.values();
+ Class<? extends TopiaEntity>[] result = (Class<? extends TopiaEntity>[]) Array.newInstance(Class.class, values.length);
+ for (int i = 0; i < values.length; i++) {
+ result[i] = values[i].getContract();
+ }
+ return result;
+ }
+
+ /**
+ * getImplementationClasses :
+ * @return Class<? extends TopiaEntity>[]
+ */
+
+ public static Class<? extends TopiaEntity>[] getImplementationClasses() {
+ MigrationServiceEntityEnum[] values = MigrationServiceEntityEnum.values();
+ Class<? extends TopiaEntity>[] result = (Class<? extends TopiaEntity>[]) Array.newInstance(Class.class, values.length);
+ for (int i = 0; i < values.length; i++) {
+ result[i] = values[i].getImplementation();
+ }
+ return result;
+ }
+
+ /**
+ * getImplementationClassesAsString :
+ * @return String
+ */
+
+ public static String getImplementationClassesAsString() {
+ StringBuilder buffer = new StringBuilder();
+ for (Class<? extends TopiaEntity> aClass : getImplementationClasses()) {
+ buffer.append(',').append(aClass.getName());
+ }
+ return buffer.substring(1);
+ }
+
+ /**
+ * getContracts :
+ * @return MigrationServiceEntityEnum[]
+ */
+
+ public static MigrationServiceEntityEnum[] getContracts() {
+ return MigrationServiceEntityEnum.values();
+ }
+
+
+ } //MigrationServiceDAOHelper
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/MigrationServiceDAOHelper.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,22 @@
+package org.nuiton.topia.migration;
+
+import org.nuiton.topia.persistence.TopiaEntity;
+
+@Deprecated
+public interface TMSVersion extends TopiaEntity { String VERSION = "version";
+ /**
+ * setVersion :
+ * @param version La valeur de l'attribut version à positionner.
+ */
+
+ void setVersion(String version);
+
+ /**
+ * getVersion :
+ * @return String
+ */
+
+ String getVersion();
+
+
+} //TMSVersion
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersion.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,143 @@
+package org.nuiton.topia.migration;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.persistence.EntityVisitor;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.topia.persistence.TopiaEntityAbstract;
+
+@Deprecated
+public abstract class TMSVersionAbstract extends TopiaEntityAbstract implements TMSVersion {
+
+ protected String version;
+ /**
+ * getVersion :
+ * @return String
+ */
+
+ public String getVersion() {
+ fireOnPreRead(VERSION, version);
+ java.lang.String result = this.version;
+ fireOnPostRead(VERSION, version);
+ return result;
+}
+
+ /**
+ * update :
+ * @deprecated since 2.4, use the DAO api instead.
+ * @throws TopiaException
+ */
+
+ @Deprecated
+ @Override
+ public void update() throws TopiaException {
+ ((TopiaContextImplementor)getTopiaContext()).getDAO(TMSVersion.class).update(this);
+}
+
+ /**
+ * delete :
+ * @deprecated since 2.4, use the DAO api instead.
+ * @throws TopiaException
+ */
+
+ @Deprecated
+ @Override
+ public void delete() throws TopiaException {
+ ((TopiaContextImplementor)getTopiaContext()).getDAO(TMSVersion.class).delete(this);
+}
+
+ /**
+ * accept :
+ * Envoi via les methodes du visitor l'ensemble des champs de l'entity
+avec leur nom, type et valeur.
+ * @param visitor le visiteur de l'entite.
+ * @throws TopiaException
+ */
+
+ @Override
+ public void accept(EntityVisitor visitor) throws TopiaException {
+ visitor.start(this);
+ visitor.visit(this, VERSION, String.class, version);
+ visitor.end(this);
+}
+
+ /**
+ * getAggregate :
+ * @return List<TopiaEntity>
+ * @throws TopiaException
+ */
+
+ @Override
+ public List<TopiaEntity> getAggregate() throws TopiaException {
+ List<TopiaEntity> tmp = new ArrayList<TopiaEntity>();
+
+ // pour tous les attributs rechecher les composites et les class d'asso
+ // on les ajoute dans tmp
+
+ // on refait un tour sur chaque entity de tmp pour recuperer leur
+ // composite
+ List<TopiaEntity> result = new ArrayList<TopiaEntity>();
+ for (TopiaEntity entity : tmp) {
+ result.add(entity);
+ result.addAll(entity.getAggregate());
+ }
+
+ return result;
+}
+
+ /**
+ * getComposite :
+ * @return List<TopiaEntity>
+ * @throws TopiaException
+ */
+
+ @Override
+ public List<TopiaEntity> getComposite() throws TopiaException {
+ List<TopiaEntity> tmp = new ArrayList<TopiaEntity>();
+
+ // pour tous les attributs rechecher les composites et les class d'asso
+ // on les ajoute dans tmp
+
+ // on refait un tour sur chaque entity de tmp pour recuperer leur
+ // composite
+ List<TopiaEntity> result = new ArrayList<TopiaEntity>();
+ for (TopiaEntity entity : tmp) {
+ if (entity != null) {
+ result.add(entity);
+ result.addAll(entity.getComposite());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * setVersion :
+ * @param value
+ */
+
+ public void setVersion(String value) {
+ String _oldValue = this.version;
+ fireOnPreWrite(VERSION, _oldValue, value);
+ this.version = value;
+ fireOnPostWrite(VERSION, _oldValue, value);
+}
+
+ /**
+ * toString :
+ * @return String
+ */
+
+ @Override
+ public String toString() {
+ String result = new ToStringBuilder(this).
+ append(VERSION, this.version).
+ toString();
+ return result;
+}
+
+
+} //TMSVersionAbstract
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionAbstract.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,8 @@
+package org.nuiton.topia.migration;
+
+
+@Deprecated
+public class TMSVersionDAO extends TMSVersionDAOImpl<TMSVersion> {
+
+
+} //TMSVersionDAO
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAO.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,88 @@
+package org.nuiton.topia.migration;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.persistence.TopiaDAO;
+import org.nuiton.topia.persistence.TopiaDAOImpl;
+import org.nuiton.topia.persistence.TopiaEntity;
+
+@Deprecated
+public abstract class TMSVersionDAOAbstract<E extends TMSVersion> extends TopiaDAOImpl<E> implements TopiaDAO<E> {
+
+ /**
+ * getEntityClass :
+ * @return Class<E>
+ */
+
+ public Class<E> getEntityClass() {
+ return (Class<E>)TMSVersion.class;
+ }
+
+ /**
+ * delete :
+ * @param entity
+ * @throws TopiaException
+ */
+
+ public void delete(E entity) throws TopiaException {
+ super.delete(entity);
+ }
+
+ /**
+ * findByVersion :
+ * Retourne le premier élément trouvé ayant comme valeur pour l'attribut version le paramètre.
+ * @param v
+ * @return E
+ * @throws TopiaException
+ */
+
+ public E findByVersion(String v) throws TopiaException {
+ E result = findByProperty(TMSVersion.VERSION, v);
+ return result;
+ }
+
+ /**
+ * findAllByVersion :
+ * Retourne les éléments ayant comme valeur pour l'attribut version le paramètre.
+ * @param v
+ * @return List<E>
+ * @throws TopiaException
+ */
+
+ public List<E> findAllByVersion(String v) throws TopiaException {
+ List<E> result = findAllByProperty(TMSVersion.VERSION, v);
+ return result;
+ }
+
+ /**
+ * findUsages :
+ * @param type
+ * @param entity
+ * @return <U extends TopiaEntity> List<U>
+ * @throws TopiaException
+ */
+
+ @Override
+ public <U extends TopiaEntity> List<U> findUsages(Class<U> type, E entity) throws TopiaException {
+ return new ArrayList<U>();
+ }
+
+ /**
+ * findAllUsages :
+ * @param entity
+ * @return Map<Class<? extends TopiaEntity>, List<? extends TopiaEntity>>
+ * @throws TopiaException
+ */
+
+ @Override
+ public Map<Class<? extends TopiaEntity>, List<? extends TopiaEntity>> findAllUsages(E entity) throws TopiaException {
+ return new HashMap<Class<? extends TopiaEntity>, List<? extends TopiaEntity>>();
+ }
+
+
+} //TMSVersionDAOAbstract<E extends TMSVersion>
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOAbstract.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,8 @@
+package org.nuiton.topia.migration;
+
+
+@Deprecated
+public class TMSVersionDAOImpl<E extends TMSVersion> extends TMSVersionDAOAbstract<E> {
+
+
+} //TMSVersionDAOImpl<E extends TMSVersion>
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionDAOImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,8 @@
+package org.nuiton.topia.migration;
+
+
+@Deprecated
+public class TMSVersionImpl extends TMSVersionAbstract {
+
+
+} //TMSVersionImpl
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TMSVersionImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-13 17:30:39 UTC (rev 2008)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -29,16 +29,18 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.cfg.Configuration;
-import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.topia.event.TopiaContextAdapter;
import org.nuiton.topia.event.TopiaContextEvent;
import org.nuiton.topia.event.TopiaContextListener;
import org.nuiton.topia.event.TopiaTransactionEvent;
import org.nuiton.topia.event.TopiaTransactionVetoable;
import org.nuiton.topia.framework.TopiaContextImplementor;
import org.nuiton.topia.framework.TopiaUtil;
+import org.nuiton.topia.migration.mappings.TMSVersion;
+import org.nuiton.topia.migration.mappings.TMSVersionDAO;
import org.nuiton.util.Version;
import org.nuiton.util.VersionUtil;
import org.nuiton.util.VersionUtil.VersionComparator;
@@ -74,6 +76,12 @@
/** Un drapeau pour savoir si la table version existe en base (initialise en pre-init) */
protected boolean versionTableExist;
+ /** Configuration hibernate ne mappant que l'entite version de l'ancien systeme de migration (initialise en pre-init) */
+ protected Configuration legacyVersionConfiguration;
+
+ /** Un drapeau pour savoir si la table version (de l'ancien service Manual) existe en base (initialise en pre-init) */
+ protected boolean legacyVersionTableExist;
+
/** Version courante de la base (initialise en pre-init) */
protected Version dbVersion;
@@ -92,6 +100,13 @@
/** Un drapeau pour savoir si le service a bien ete initialise (i.e a bien fini la methode preInit) */
protected boolean init;
+ /**
+ * A flag to check if version was detected in database.
+ * <p/>
+ * This flag is set to {@code true} at the end of method {@link #detectDbVersion()}.
+ */
+ protected boolean versionDetected;
+
/** Un drapeau pour afficher les requetes sql executees */
protected boolean showSql;
@@ -99,18 +114,66 @@
protected boolean showProgression;
/** delegate context listener. */
- protected TopiaContextListener contextListener;
+ protected final TopiaContextListener contextListener;
/** delgate transaction listener */
- protected TopiaTransactionVetoable transactionVetoable;
+ protected final TopiaTransactionVetoable transactionVetoable;
+ public TopiaMigrationEngine() {
+
+ transactionVetoable = new TopiaTransactionVetoable() {
+ @Override
+ public void beginTransaction(TopiaTransactionEvent event) {
+
+ TopiaContextImplementor context =
+ (TopiaContextImplementor) event.getSource();
+
+ // add topia context listener
+ context.addTopiaContextListener(contextListener);
+
+ }
+ };
+ contextListener = new TopiaContextAdapter() {
+
+ @Override
+ public void postCreateSchema(TopiaContextEvent event) {
+ if (log.isDebugEnabled()) {
+ log.debug("postCreateSchema event called : will save version in database");
+ }
+ saveApplicationVersion();
+ }
+
+ @Override
+ public void postUpdateSchema(TopiaContextEvent event) {
+ if (log.isDebugEnabled()) {
+ log.debug("postUpdateSchema event called : will save version in database");
+ }
+ saveApplicationVersion();
+ }
+
+ @Override
+ public void postRestoreSchema(TopiaContextEvent event) {
+ if (log.isDebugEnabled()) {
+ log.debug("postRestoreSchema event detected, redo, schema migration");
+ }
+ try {
+ doMigrateSchema();
+ } catch (Exception e) {
+ if (log.isErrorEnabled()) {
+ log.error("postRestoreSchema schema migration failed for reason " + e.getMessage(), e);
+ }
+ }
+ }
+ };
+ }
+
//--------------------------------------------------------------------------
//-- TopiaService implementation
//--------------------------------------------------------------------------
@Override
public Class<?>[] getPersistenceClasses() {
- return new Class<?>[]{TMSVersionImpl.class};
+ return new Class<?>[]{TMSVersion.class};
}
@Override
@@ -154,27 +217,21 @@
// creation de la configuration hibernate ne concernant que l'entite Version
// afin de pouvoir creer la table via un schemaExport si necessaire
- versionConfiguration = new Configuration();
+ Configuration configuration = new Configuration();
+ configuration.addXML(TMSVersionDAO.MAPPING);
- for (Class<?> clazz : getPersistenceClasses()) {
- if (log.isDebugEnabled()) {
- log.debug("addClass " + clazz);
- }
- versionConfiguration.addClass(clazz);
- }
+ versionConfiguration = creaHibernateConfiguration(configuration);
- Properties prop = new Properties();
- prop.putAll(versionConfiguration.getProperties());
- prop.putAll(config);
-
- versionConfiguration.setProperties(prop);
-
init = true;
// add topia context listener
- context.addTopiaContextListener(getContextListener());
- context.addTopiaTransactionVetoable(getTransactionVetoable());
+ context.addTopiaContextListener(contextListener);
+ context.addTopiaTransactionVetoable(transactionVetoable);
+ if (log.isDebugEnabled()) {
+ log.debug("Service [" + this + "] is init.");
+ }
+
if (migrateOnInit) {
try {
@@ -188,15 +245,15 @@
}
} else {
if (log.isDebugEnabled()) {
- log.debug("migration service, skip migration on init");
+ log.debug("Service [" + this + "] skip migration on init as required");
}
}
-
return true;
}
@Override
public boolean postInit(TopiaContextImplementor context) {
+ // nothing to do in post-init
return true;
}
@@ -211,35 +268,38 @@
}
}
+ //--------------------------------------------------------------------------
+ //-- TopiaMigrationService implementation
+ //--------------------------------------------------------------------------
+
@Override
public boolean migrateSchema() throws MigrationServiceException {
checkInit();
- if (dbVersion == null || !migrateOnInit) {
+ detectDbVersion();
- // no db version was setted or service was not init on int
- // force detection of version to be safe
- if (log.isDebugEnabled()) {
- log.debug("Will detects db version...");
- }
- detectDbVersion();
- }
+// if (dbVersion == null || !migrateOnInit) {
+//
+// // no db version was setted or service was not init on int
+// // force detection of version to be safe
+// if (log.isDebugEnabled()) {
+// log.debug("Will detects db version...");
+// }
+// detectDbVersion();
+// }
- Version applicationVersion = callback.getApplicationVersion();
+ Version version = callback.getApplicationVersion();
- log.info(_("topia.migration.start.migration", applicationVersion.getVersion(), dbVersion.getVersion()));
+ log.info(_("topia.migration.start.migration", version.getVersion(), dbVersion.getVersion()));
- // tell if migration is needed
- boolean bMigrationNeeded = false;
-
if (log.isDebugEnabled()) {
- log.debug("Migrate schema start version = " + dbVersion +
- " _ not versioned = " + dbNotVersioned +
- " _ TMSVersion exists = " + versionTableExist);
+ log.debug("Migrate schema to version = " + dbVersion);
+ log.debug("is db not versionned ? = " + dbNotVersioned);
+ log.debug("TMSVersion exists = " + versionTableExist);
}
- if (versionTableExist && dbVersion.equals(applicationVersion)) {
+ if (versionTableExist && dbVersion.equals(version)) {
log.info(_("topia.migration.skip.migration.db.is.up.to.date"));
// la base est a jour
return true;
@@ -254,18 +314,31 @@
return true;
}
+ if (legacyVersionTableExist && dbVersion.equals(version)) {
+
+ // on a trouvee une table depreciee tmsVersion avec la bonne version de base
+ // il suffit donc d'enregister la version dans la nouvelle table
+ log.info(_("topia.migration.skip.migration.db.is.up.to.date"));
+ // la base est a jour mais il faut migrer la table
+ saveApplicationVersion();
+ return true;
+ }
+
SortedSet<Version> allVersions =
new TreeSet<Version>(new VersionComparator());
allVersions.addAll(Arrays.asList(callback.getAvailableVersions()));
log.info(_("topia.migration.available.versions", allVersions));
- if (dbVersion.before(applicationVersion)) {
+ // tell if migration is needed
+ boolean needToMigrate = false;
+ if (dbVersion.before(version)) {
+
// on filtre les versions a appliquer
List<Version> versionsToApply =
VersionUtil.filterVersions(allVersions,
dbVersion,
- applicationVersion,
+ version,
false,
true
);
@@ -275,16 +348,16 @@
} else {
log.info(_("topia.migration.migrate.versions", versionsToApply));
// ask handler for migration
- bMigrationNeeded = callback.doMigration(rootContext,
- dbVersion,
- showSql,
- showProgression,
- versionsToApply);
+ needToMigrate = callback.doMigration(rootContext,
+ dbVersion,
+ showSql,
+ showProgression,
+ versionsToApply);
if (log.isDebugEnabled()) {
- log.debug("Handler choose : " + bMigrationNeeded);
+ log.debug("Handler choose : " + needToMigrate);
}
- if (!bMigrationNeeded) {
+ if (!needToMigrate) {
// l'utilisateur a annule la migration
return false;
}
@@ -292,10 +365,10 @@
}
// on sauvegarde la version si necessaire (base non versionnee ou migration realisee)
- if (!versionTableExist || bMigrationNeeded) {
+ if (!versionTableExist || needToMigrate) {
if (log.isDebugEnabled()) {
- log.debug("Set application version in database to " + applicationVersion);
+ log.debug("Set application version in database to " + version);
}
// put version in database and create table if required
@@ -308,25 +381,28 @@
return true;
}
+ //--------------------------------------------------------------------------
+ //-- Internal methods
+ //--------------------------------------------------------------------------
+
/**
* Enregistre la version donnee en base avec creation de la table
* si elle n'existe pas.
*/
- public void saveApplicationVersion() {
+ protected void saveApplicationVersion() {
checkInit();
Version version = callback.getApplicationVersion();
+ detectDbVersion();
+
if (log.isDebugEnabled()) {
- log.debug("Save version = " + version +
- " _ table exists = " + versionTableExist);
+ log.debug("Save version = " + version);
+ log.debug("table exists = " + versionTableExist);
+ log.debug("Detected version = " + dbVersion);
}
- if (dbVersion == null) {
- detectDbVersion();
- }
-
try {
boolean createTable = !versionTableExist;
@@ -336,36 +412,34 @@
// si la base n'etait pas versionnee, la table version n'existe pas
// creation
if (log.isDebugEnabled()) {
- log.debug("Adding table to put version");
+ log.debug("Adding tms_version table");
}
// creer le schema en base
// dans la configuration versionConfiguration, il n'y a que la table version
- SchemaExport schemaExport = new SchemaExport(versionConfiguration);
- schemaExport.create(log.isDebugEnabled(), true);
+ TMSVersionDAO.createTable(versionConfiguration);
if (log.isDebugEnabled()) {
log.debug("Table for " + TMSVersion.class.getSimpleName() + " created");
}
+ }
- }
- // Changement de la version en base
+ // Set new version in database
TopiaContext tx = rootContext.beginTransaction();
try {
- TMSVersionDAO dao = MigrationServiceDAOHelper.getTMSVersionDAO(tx);
+ // delete all previous data in table
+ TMSVersionDAO.deleteAll(tx);
- //FIXME on supprime toues les versions precedentes ???
- //FIXME il serait mieux de conserver toutes les versions je pense...
- //FIXME on pourrait conserver l'information sur les date de mise a jour
- List<TMSVersion> toDelete = dao.findAll();
- for (TMSVersion v : toDelete) {
- dao.delete(v);
+ log.info(_("topia.migration.saving.db.version", version));
+
+ // create new version and store it in table
+ TMSVersion tmsVersion =
+ TMSVersionDAO.create(tx, version.getVersion());
+ if (log.isDebugEnabled()) {
+ log.debug("Created version : " + tmsVersion.getVersion());
}
- log.info(_("topia.migration.saving.db.version", version));
- dao.create(TMSVersion.VERSION, version.getVersion());
-
tx.commitTransaction();
} catch (TopiaException e) {
if (tx != null) {
@@ -377,6 +451,15 @@
tx.closeContext();
}
}
+
+ if (legacyVersionTableExist) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Will drop legacy tmsVersion table");
+ }
+ // on supprime l'ancienne table
+ TMSVersionDAO.dropTable(legacyVersionConfiguration);
+ }
} catch (TopiaException e) {
throw new TopiaRuntimeException(e);
}
@@ -388,128 +471,106 @@
dbVersion = version;
}
+ /**
+ * Recupere depuis la base les états internes du service :
+ * <p/>
+ * <ul>
+ * <li>versionTableExist</li>
+ * <li>dbVersion</li>
+ * </ul>
+ */
+ protected void detectDbVersion() {
- protected TopiaContextListener getContextListener() {
- if (contextListener == null) {
- contextListener = new TopiaContextListener() {
- @Override
- public void preCreateSchema(TopiaContextEvent event) {
- }
+ if (versionDetected) {
- @Override
- public void postCreateSchema(TopiaContextEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("postCreateSchema event called : will save version in database");
- }
+ // this method was already invoked
+ if (log.isDebugEnabled()) {
+ log.debug("version was already detected : " + dbVersion);
+ }
+ return;
+ }
- saveApplicationVersion();
- }
+ Version v = null;
+ try {
- @Override
- public void preUpdateSchema(TopiaContextEvent event) {
+ // on detecte si la table de versionning existe
+ versionTableExist =
+ TopiaUtil.isSchemaExist(versionConfiguration,
+ TMSVersion.class.getName());
- }
+ if (log.isDebugEnabled()) {
+ log.debug("Table " + TMSVersionDAO.TABLE_NAME + " exist = " + versionTableExist);
+ }
- @Override
- public void postUpdateSchema(TopiaContextEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("postUpdateSchema event called : will save version in database");
- }
+ if (versionTableExist) {
- saveApplicationVersion();
- }
+ // recuperation de la version de la base
+ v = getVersion(versionTableExist, TMSVersionDAO.TABLE_NAME);
+ return;
+ }
- @Override
- public void preRestoreSchema(TopiaContextEvent event) {
- }
+ // try with legacy table tmsVersion
+ Configuration conf = new Configuration();
+ conf.addXML(TMSVersionDAO.LEGACY_MAPPING);
- @Override
- public void postRestoreSchema(TopiaContextEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("postRestoreSchema event detected, redo, schema migration");
- }
- try {
+ legacyVersionConfiguration = creaHibernateConfiguration(conf);
+ legacyVersionTableExist =
+ TopiaUtil.isSchemaExist(legacyVersionConfiguration,
+ TMSVersion.class.getName());
- doMigrateSchema();
+ if (legacyVersionTableExist) {
- } catch (Exception e) {
- if (log.isErrorEnabled()) {
- log.error("postRestoreSchema schema migration failed for reason " + e.getMessage(), e);
- }
- }
+ if (log.isDebugEnabled()) {
+ log.debug("Legacy : detected " + TMSVersionDAO.LEGACY_TABLE_NAME + " table");
}
- };
- }
- return contextListener;
- }
- protected TopiaTransactionVetoable getTransactionVetoable() {
- if (transactionVetoable == null) {
- transactionVetoable = new TopiaTransactionVetoable() {
- @Override
- public void beginTransaction(TopiaTransactionEvent event) {
+ // recuperation de la version de la base
+ v = getVersion(legacyVersionTableExist, TMSVersionDAO.LEGACY_TABLE_NAME);
- TopiaContextImplementor context = (TopiaContextImplementor) event.getSource();
+ if (v != null) {
- // add topia context listener
- context.addTopiaContextListener(contextListener);
+ if (log.isDebugEnabled()) {
+ log.debug("Legacy : " + _("topia.migration.detected.db.version", v));
+ }
+ }
+ }
+ } finally {
- }
- };
+ if (v == null) {
+ // la base dans ce cas n'est pas versionee.
+ // On dit que la version de la base est 0
+ // et les schema de cette version 0 doivent
+ // etre detenu en local
+ v = Version.VZERO;
+ dbNotVersioned = true;
+ log.info(_("topia.migration.db.not.versionned"));
+ } else {
+ log.info(_("topia.migration.detected.db.version", v));
+ }
+ dbVersion = v;
+ versionDetected = true;
}
- return transactionVetoable;
}
- /**
- * Recupere depuis la base les états internes du service :
- * <p/>
- * <ul>
- * <li>versionTableExist</li>
- * <li>dbVersion</li>
- * </ul>
- */
- protected void detectDbVersion() {
+ protected Version getVersion(boolean versionTableExist, String tableName) {
+ if (!versionTableExist) {
- // on detecte si la table de versionning existe
- versionTableExist = TopiaUtil.isSchemaExist(versionConfiguration, TMSVersionImpl.class.getName());
-
- if (log.isDebugEnabled()) {
- log.debug("Table TMSVersion exist = " + versionTableExist);
+ // table does not exist, version is null
+ return null;
}
- // recuperation de la version de la base
- Version v = null;
try {
- if (versionTableExist) {
- TopiaContext tx = null;
- try {
- tx = rootContext.beginTransaction();
- TMSVersionDAO dao = MigrationServiceDAOHelper.getTMSVersionDAO(tx);
- List<TMSVersion> versionsInDB = dao.findAll();
- if (!versionsInDB.isEmpty()) {
- v = VersionUtil.valueOf(versionsInDB.get(0).getVersion());
- }
- } finally {
- if (tx != null) {
- tx.closeContext();
- }
+ TopiaContext tx = rootContext.beginTransaction();
+ try {
+ Version v = TMSVersionDAO.getVersion(tx, tableName);
+ return v;
+ } finally {
+ if (tx != null) {
+ tx.closeContext();
}
}
} catch (TopiaException e) {
throw new TopiaRuntimeException("Can't obtain dbVersion for reason " + e.getMessage(), e);
}
-
- if (v == null) {
- // la base dans ce cas n'est pas versionee.
- // On dit que la version de la base est 0
- // et les schema de cette version 0 doivent
- // etre detenu en local
- v = Version.VZERO;
- dbNotVersioned = true;
- log.info(_("topia.migration.db.not.versionned"));
- } else {
- log.info(_("topia.migration.detected.db.version", v));
- }
- dbVersion = v;
}
protected String getSafeParameter(Properties config, String key) {
@@ -525,4 +586,18 @@
throw new IllegalStateException("le service n'est pas initialisé!");
}
}
+
+ protected Configuration creaHibernateConfiguration(Configuration configuration) {
+ Properties config = rootContext.getConfig();
+
+ Properties prop = new Properties();
+ prop.putAll(configuration.getProperties());
+ prop.putAll(config);
+
+ configuration.setProperties(prop);
+ return configuration;
+
+ }
+
+
}
\ No newline at end of file
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java 2010-06-13 17:30:39 UTC (rev 2008)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationService.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -37,7 +37,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @version $Id$
*/
-public interface TopiaMigrationService extends TopiaService{ //}, TopiaContextListener, TopiaTransactionVetoable {
+public interface TopiaMigrationService extends TopiaService {
/** Nom du service */
String SERVICE_NAME = "migration";
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java 2010-06-13 17:30:39 UTC (rev 2008)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersion.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -25,8 +25,12 @@
package org.nuiton.topia.migration.mappings;
-import org.nuiton.topia.migration.TopiaMigrationEngine;
+import org.apache.commons.lang.StringUtils;
+import org.nuiton.util.Version;
+import org.nuiton.util.VersionUtil;
+import java.io.Serializable;
+
/**
* TMSVersion.java
*
@@ -34,46 +38,45 @@
* @author Chevallereau Benjamin
* @author Eon Sébastien
* @author Trève Vincent
- * @deprecated since 2.4, please use now the simplify service {@link TopiaMigrationEngine}
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
*/
-@Deprecated
-public class TMSVersion {
+public class TMSVersion implements Serializable {
- /**
- * La version.
- *
- * String (gere les cas 1.0.2 par exemple)
- */
+ private static final long serialVersionUID = 1L;
+
+ public static final String PROPERTY_VERSION = "version";
+
+ public static TMSVersion valueOf(Version version) {
+ return new TMSVersion(version.toString());
+ }
+
+ public static TMSVersion valueOf(String version) {
+ return new TMSVersion(version);
+ }
+
+ /** La version. */
private String version;
- /**
- * Constructeur
- */
- private TMSVersion() {
+ public TMSVersion() {
}
- /**
- * Constructeur
- * @param version la version
- */
public TMSVersion(String version) {
- this();
+ if (StringUtils.isEmpty(version)) {
+ throw new IllegalArgumentException("version parameter can not be null nor empty.");
+ }
this.version = version;
}
- /**
- * Retourne la version
- * @return la version
- */
public String getVersion() {
return version;
}
- /**
- * Change la version
- * @param version
- */
public void setVersion(String version) {
this.version = version;
}
+
+ public Version toVersion() {
+ return StringUtils.isEmpty(version) ? null : VersionUtil.valueOf(version);
+ }
}
Added: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java (rev 0)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,161 @@
+package org.nuiton.topia.migration.mappings;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.hibernate.Criteria;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.jdbc.Work;
+import org.hibernate.tool.hbm2ddl.SchemaExport;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.util.Version;
+import org.nuiton.util.VersionUtil;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+/**
+ * TMSVersion DAO helper.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.4
+ */
+public class TMSVersionDAO {
+
+ /** logger */
+ private final static Log log = LogFactory.getLog(TMSVersionDAO.class);
+
+ public static final String LEGACY_TABLE_NAME = "tmsVersion";
+
+ public static final String TABLE_NAME = "tms_version";
+
+ public static TMSVersion get(TopiaContext tx) throws TopiaException {
+
+ try {
+ Session session = ((TopiaContextImplementor) tx).getHibernate();
+ Criteria criteria = session.createCriteria(TMSVersion.class);
+ List<?> list = criteria.list();
+ TMSVersion result = list.isEmpty() ? null : (TMSVersion) list.get(0);
+ return result;
+ } catch (HibernateException e) {
+ throw new TopiaException("Could not obtain version", e);
+ }
+ }
+
+ public static void createTable(Configuration configuration) {
+ // creer le schema en base
+ // dans la configuration il n'y a que la table version
+ SchemaExport schemaExport = new SchemaExport(configuration);
+ schemaExport.create(log.isDebugEnabled(), true);
+ }
+
+ public static void dropTable(Configuration configuration) {
+ // supprimer le schema en base
+ // dans la configuration il n'y a que la table version
+ SchemaExport schemaExport = new SchemaExport(configuration);
+ schemaExport.drop(log.isDebugEnabled(), true);
+ }
+
+ public static TMSVersion create(TopiaContext tx, String version) throws TopiaException {
+
+ try {
+ Session session = ((TopiaContextImplementor) tx).getHibernate();
+
+ TMSVersion result = TMSVersion.valueOf(version);
+ // save entity
+ session.save(result);
+ return result;
+ } catch (HibernateException e) {
+ throw new TopiaException("Could not create version " + version, e);
+ }
+ }
+
+ public static void update(TopiaContext tx, TMSVersion version) throws TopiaException {
+ try {
+ Session session = ((TopiaContextImplementor) tx).getHibernate();
+ session.saveOrUpdate(version);
+ tx.commitTransaction();
+ } catch (HibernateException e) {
+ throw new TopiaException("Could not update version " + version, e);
+ }
+ }
+
+ public static void deleteAll(TopiaContext tx) throws TopiaException {
+ try {
+ Session session = ((TopiaContextImplementor) tx).getHibernate();
+ Criteria criteria = session.createCriteria(TMSVersion.class);
+ List<?> list = criteria.list();
+ for (Object o : list) {
+ session.delete(o);
+ }
+ } catch (HibernateException e) {
+ throw new TopiaException("Could not delete all versions", e);
+ }
+ }
+
+ public static final String MAPPING =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<!DOCTYPE hibernate-mapping PUBLIC \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +
+ "<hibernate-mapping>\n" +
+ " <class name=\"org.nuiton.topia.migration.mappings.TMSVersion\" table=\"" + TABLE_NAME + "\">\n" +
+ " <id column=\"version\" name=\"version\"/>\n" +
+ " </class>\n" +
+ "</hibernate-mapping>";
+
+ public static final String LEGACY_MAPPING =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+ "<!DOCTYPE hibernate-mapping PUBLIC \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\" \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n" +
+ "<hibernate-mapping>\n" +
+ " <class name=\"org.nuiton.topia.migration.mappings.TMSVersion\" table=\"" + LEGACY_TABLE_NAME + "\">\n" +
+ " <id column=\"version\" name=\"version\"/>\n" +
+ " </class>\n" +
+ "</hibernate-mapping>";
+
+ public static Version getVersion(TopiaContext tx, String tableName) {
+ try {
+ GetVersionWork work = new GetVersionWork(tableName);
+ ((TopiaContextImplementor) tx).getHibernate().doWork(work);
+ Version v = work.getVersion();
+ return v;
+ } catch (TopiaException e) {
+ throw new TopiaRuntimeException("Can't obtain dbVersion for reason " + e.getMessage(), e);
+ }
+ }
+
+ public static class GetVersionWork implements Work {
+
+ Version version;
+
+ private final String tableName;
+
+ public GetVersionWork(String tableName) {
+ this.tableName = tableName;
+ }
+
+ @Override
+ public void execute(Connection connection) throws SQLException {
+ PreparedStatement st = connection.prepareStatement("select " + TMSVersion.PROPERTY_VERSION + " from " + tableName + ";");
+ try {
+ ResultSet set = st.executeQuery();
+
+ if (set.next()) {
+ version = VersionUtil.valueOf(set.getString(1));
+ }
+ } finally {
+
+ st.close();
+ }
+ }
+
+ public Version getVersion() {
+ return version;
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/mappings/TMSVersionDAO.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/TMSVersionImpl.hbm.xml
===================================================================
--- trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/TMSVersionImpl.hbm.xml (rev 0)
+++ trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/TMSVersionImpl.hbm.xml 2010-06-13 17:48:26 UTC (rev 2009)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!-- ce fichier de mapping sera supprimee apres la version 2.4 car plus utilise -->
+<!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.migration">
+ <class name="org.nuiton.topia.migration.TMSVersionImpl" table="tMSVersion" node="org.nuiton.topia.migration.TMSVersionImpl" abstract="false" proxy="org.nuiton.topia.migration.TMSVersion" >
+ <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="version" type="java.lang.String" access="field" column="version" node="version"/>
+ </class>
+</hibernate-mapping>
Property changes on: trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/TMSVersionImpl.hbm.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/mappings/TMSVersion.hbm.xml
===================================================================
--- trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/mappings/TMSVersion.hbm.xml 2010-06-13 17:30:39 UTC (rev 2008)
+++ trunk/topia-service-migration/src/main/resources/org/nuiton/topia/migration/mappings/TMSVersion.hbm.xml 2010-06-13 17:48:26 UTC (rev 2009)
@@ -1,5 +1,6 @@
<?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">
+ <!-- ce fichier de mapping sera supprimee apres la version 2.4 car plus utilise -->
<hibernate-mapping>
<class name="org.nuiton.topia.migration.mappings.TMSVersion" table="tms_version">
<id column="version" name="version"/>
1
0
r2008 - trunk/topia-persistence/src/main/java/org/nuiton/topia/framework
by tchemit@users.nuiton.org 13 Jun '10
by tchemit@users.nuiton.org 13 Jun '10
13 Jun '10
Author: tchemit
Date: 2010-06-13 19:30:39 +0200 (Sun, 13 Jun 2010)
New Revision: 2008
Url: http://nuiton.org/repositories/revision/topia/2008
Log:
isSchemaExist can be used for any type of persistent classes (not only for TopiaEntity)
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2010-06-13 09:43:00 UTC (rev 2007)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2010-06-13 17:30:39 UTC (rev 2008)
@@ -1334,7 +1334,7 @@
}
@Override
- public boolean isSchemaExist(Class<? extends TopiaEntity> clazz)
+ public boolean isSchemaExist(Class<?> clazz)
throws TopiaException {
checkClosed(I18n._(
"topia.persistence.error.unsupported.operation.on.closed.context",
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-06-13 09:43:00 UTC (rev 2007)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2010-06-13 17:30:39 UTC (rev 2008)
@@ -100,7 +100,7 @@
* @return Returns the hibernate.
* @throws TopiaException si aucune transaction n'est ouverte
*/
- boolean isSchemaExist(Class<? extends TopiaEntity> clazz) throws TopiaException;
+ boolean isSchemaExist(Class<?> clazz) throws TopiaException;
/**
* Get DAO for specified class. If Specialized DAO exists then it returned
1
0
r2007 - trunk/topia-persistence/src/main/java/org/nuiton/topia/event
by tchemit@users.nuiton.org 13 Jun '10
by tchemit@users.nuiton.org 13 Jun '10
13 Jun '10
Author: tchemit
Date: 2010-06-13 11:43:00 +0200 (Sun, 13 Jun 2010)
New Revision: 2007
Url: http://nuiton.org/repositories/revision/topia/2007
Log:
introduce TopiaContextAdapter
Added:
trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
Added: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java (rev 0)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java 2010-06-13 09:43:00 UTC (rev 2007)
@@ -0,0 +1,36 @@
+package org.nuiton.topia.event;
+
+/**
+ * Adapter pattern of {@link TopiaContextListener}.
+ * <p/>
+ * This implementation does nothing but permits developpers to use this adapater
+ * without to have to implements all methods.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.4
+ */
+public class TopiaContextAdapter implements TopiaContextListener {
+ @Override
+ public void preCreateSchema(TopiaContextEvent event) {
+ }
+
+ @Override
+ public void postCreateSchema(TopiaContextEvent event) {
+ }
+
+ @Override
+ public void preUpdateSchema(TopiaContextEvent event) {
+ }
+
+ @Override
+ public void postUpdateSchema(TopiaContextEvent event) {
+ }
+
+ @Override
+ public void preRestoreSchema(TopiaContextEvent event) {
+ }
+
+ @Override
+ public void postRestoreSchema(TopiaContextEvent event) {
+ }
+}
Property changes on: trunk/topia-persistence/src/main/java/org/nuiton/topia/event/TopiaContextAdapter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r2006 - trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration
by tchemit@users.nuiton.org 12 Jun '10
by tchemit@users.nuiton.org 12 Jun '10
12 Jun '10
Author: tchemit
Date: 2010-06-12 22:47:00 +0200 (Sat, 12 Jun 2010)
New Revision: 2006
Url: http://nuiton.org/repositories/revision/topia/2006
Log:
Use instanciated listeners in migration
Modified:
trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
Modified: trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java
===================================================================
--- trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-12 20:46:40 UTC (rev 2005)
+++ trunk/topia-service-migration/src/main/java/org/nuiton/topia/migration/TopiaMigrationEngine.java 2010-06-12 20:47:00 UTC (rev 2006)
@@ -172,8 +172,8 @@
init = true;
// add topia context listener
- context.addTopiaContextListener(contextListener);
- context.addTopiaTransactionVetoable(transactionVetoable);
+ context.addTopiaContextListener(getContextListener());
+ context.addTopiaTransactionVetoable(getTransactionVetoable());
if (migrateOnInit) {
try {
1
0
r2005 - trunk/topia-persistence/src/main/java/org/nuiton/topia/framework
by tchemit@users.nuiton.org 12 Jun '10
by tchemit@users.nuiton.org 12 Jun '10
12 Jun '10
Author: tchemit
Date: 2010-06-12 22:46:40 +0200 (Sat, 12 Jun 2010)
New Revision: 2005
Url: http://nuiton.org/repositories/revision/topia/2005
Log:
Evolution #683: Throw a NullPointerException when adding or removing a null listener in TopiaFireSupport
Modified:
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java 2010-06-12 15:54:17 UTC (rev 2004)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaFiresSupport.java 2010-06-12 20:46:40 UTC (rev 2005)
@@ -899,6 +899,9 @@
public void addTopiaEntityListener(
Class<? extends TopiaEntity> entityClass,
TopiaEntityListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entityListeners.add(entityClass, listener);
}
@@ -909,26 +912,44 @@
public void addTopiaEntityVetoable(
Class<? extends TopiaEntity> entityClass,
TopiaEntityVetoable vetoable) {
+ if (vetoable == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entityVetoables.add(entityClass, vetoable);
}
public void addTopiaTransactionListener(TopiaTransactionListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
transactionListeners.add(listener);
}
public void addTopiaTransactionVetoable(TopiaTransactionVetoable vetoable) {
+ if (vetoable== null) {
+ throw new NullPointerException("listener can not be null.");
+ }
transactionVetoables.add(vetoable);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
propertyChangeListeners.add(listener);
}
public void addTopiaContextListener(TopiaContextListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
topiaContextListeners.add(listener);
}
public void addTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable) {
+ if (vetoable == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entitiesVetoables.add(vetoable);
}
@@ -941,6 +962,9 @@
public void removeTopiaEntityListener(
Class<? extends TopiaEntity> entityClass,
TopiaEntityListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entityListeners.remove(entityClass, listener);
}
@@ -951,26 +975,44 @@
public void removeTopiaEntityVetoable(
Class<? extends TopiaEntity> entityClass,
TopiaEntityVetoable vetoable) {
+ if (vetoable == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entityVetoables.remove(entityClass, vetoable);
}
public void removeTopiaTransactionListener(TopiaTransactionListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
transactionListeners.remove(listener);
}
public void removeTopiaTransactionVetoable(TopiaTransactionVetoable vetoable) {
+ if (vetoable == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
transactionVetoables.remove(vetoable);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
propertyChangeListeners.remove(listener);
}
public void removeTopiaContextListener(TopiaContextListener listener) {
+ if (listener == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
topiaContextListeners.remove(listener);
}
public void removeTopiaEntitiesVetoable(TopiaEntitiesVetoable vetoable) {
+ if (vetoable == null) {
+ throw new NullPointerException("listener can not be null.");
+ }
entitiesVetoables.remove(vetoable);
}
1
0
Author: fdesbois
Date: 2010-06-12 17:54:17 +0200 (Sat, 12 Jun 2010)
New Revision: 2004
Url: http://nuiton.org/repositories/revision/topia/2004
Log:
Use eugene 2.0.2
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-12 14:25:33 UTC (rev 2003)
+++ trunk/pom.xml 2010-06-12 15:54:17 UTC (rev 2004)
@@ -230,7 +230,7 @@
<projectId>topia</projectId>
<!-- libs version -->
- <eugene.version>2.0.2-SNAPSHOT</eugene.version>
+ <eugene.version>2.0.2</eugene.version>
<lutinutil.version>1.3.1</lutinutil.version>
<processor.version>1.0.3</processor.version>
<i18n.version>1.2.2</i18n.version>
1
0
Author: tchemit
Date: 2010-06-12 16:25:33 +0200 (Sat, 12 Jun 2010)
New Revision: 2003
Url: http://nuiton.org/repositories/revision/topia/2003
Log:
use nuiton-utils 1.3.1
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-11 10:32:51 UTC (rev 2002)
+++ trunk/pom.xml 2010-06-12 14:25:33 UTC (rev 2003)
@@ -231,7 +231,7 @@
<!-- libs version -->
<eugene.version>2.0.2-SNAPSHOT</eugene.version>
- <lutinutil.version>1.3.1-SNAPSHOT</lutinutil.version>
+ <lutinutil.version>1.3.1</lutinutil.version>
<processor.version>1.0.3</processor.version>
<i18n.version>1.2.2</i18n.version>
<xmlrpc.version>3.1.2</xmlrpc.version>
1
0
r2002 - in trunk/topia-service-security/src/main/java/org/nuiton/topia/taas: . jaas
by sletellier@users.nuiton.org 11 Jun '10
by sletellier@users.nuiton.org 11 Jun '10
11 Jun '10
Author: sletellier
Date: 2010-06-11 12:32:51 +0200 (Fri, 11 Jun 2010)
New Revision: 2002
Url: http://nuiton.org/repositories/revision/topia/2002
Log:
Realy fork jass checkPermission method
Modified:
trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java
trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java
Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java
===================================================================
--- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java 2010-06-10 23:26:35 UTC (rev 2001)
+++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/TaasService.java 2010-06-11 10:32:51 UTC (rev 2002)
@@ -341,10 +341,15 @@
// Code that note use realy jaas
Set<TaasPrincipalWrapper> ps = subj.getPrincipals(TaasPrincipalWrapper.class);
for (TaasPrincipalWrapper p : ps) {
- if (!p.getPermissions().implies(myp)) {
- throw new SecurityException("Access denied to object " + myp);
+ if (log.isDebugEnabled()) {
+ log.debug("Check permissions for principal wrapper : " + p);
}
+ if (p.getPermissions().implies(myp)) {
+ return;
+ }
}
+ throw new SecurityException("Access denied to object " + myp);
+
// Old code that use realy jaas
//AccessController.checkPermission(myp);
}
Modified: trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java
===================================================================
--- trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java 2010-06-10 23:26:35 UTC (rev 2001)
+++ trunk/topia-service-security/src/main/java/org/nuiton/topia/taas/jaas/TaasPolicy.java 2010-06-11 10:32:51 UTC (rev 2002)
@@ -51,7 +51,7 @@
import org.nuiton.topia.taas.TaasService;
/**
- * Implantation d'un policy avec une prise en compte des permissions � la vol�e.
+ * Implantation d'un policy avec une prise en compte des permissions à la volée.
* @author ruchaud
*/
public class TaasPolicy extends Policy {
@@ -118,7 +118,7 @@
}
}
} else {
- log.error("R�cup�ration des Permissions impossible");
+ log.error("Récupération des Permissions impossible");
}
return pc;
} catch (Throwable eee) {
@@ -149,8 +149,8 @@
}
/**
- * Installe cette TopiaPolicy. Si la Policy existante est d�ja cette
- * TopiaPolicy alors la m�thode n'a pas d'effet. Si une autre Policy existe
+ * Installe cette TopiaPolicy. Si la Policy existante est déja cette
+ * TopiaPolicy alors la méthode n'a pas d'effet. Si une autre Policy existe
* deja alors cette TopiaPolicy, elle conserve l'ancienne Policy dans
* parentPolicy et la remplace alors.
*/
1
0