Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 1d55e100 by Tony Chemit at 2021-01-29T12:36:29+01:00 Use last Topia extension API : * generate flat-layout for hibernate mapping * do no generate stuff for abstract entities * stop generating dao bad design code * reuse natural ids \o/ - - - - - 3 changed files: - + models/persistence/definition/src/main/models/Observe/persistence/class/naturalIdMutable.properties - pom.xml - toolkit/persistence/src/main/java/fr/ird/observe/entities/AbstractObserveTopiaDao.java Changes: ===================================== models/persistence/definition/src/main/models/Observe/persistence/class/naturalIdMutable.properties ===================================== @@ -0,0 +1,27 @@ +### +# #%L +# ObServe Models :: Persistence :: Definition +# %% +# Copyright (C) 2008 - 2021 IRD, Code Lutin, Ultreia.io +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### +referential.common.LengthLengthParameter=true +referential.common.LengthWeightParameter=true +referential.common.Person=true +referential.common.ShipOwner=true +referential.common.Species=true +referential.common.VesselSizeCategory=true ===================================== pom.xml ===================================== @@ -154,7 +154,7 @@ <lib.version.h2>1.4.196</lib.version.h2> <lib.version.nuiton.utils>3.0</lib.version.nuiton.utils> - <lib.version.java4all.topia>1.39</lib.version.java4all.topia> + <lib.version.java4all.topia>1.40</lib.version.java4all.topia> <!-- <lib.version.java4all.eugene>3.0-alpha-38</lib.version.java4all.eugene>--> <!-- <lib.version.java4all.jaxx>3.0-alpha-92</lib.version.java4all.jaxx>--> <!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>--> ===================================== toolkit/persistence/src/main/java/fr/ird/observe/entities/AbstractObserveTopiaDao.java ===================================== @@ -24,6 +24,7 @@ package fr.ird.observe.entities; import fr.ird.observe.dto.IdDto; import org.nuiton.topia.persistence.HqlAndParametersBuilder; +import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaEntityEnum; import org.nuiton.topia.persistence.TopiaQueryBuilderAddCriteriaOrRunQueryStep; import org.nuiton.topia.persistence.internal.AbstractTopiaDao; @@ -77,4 +78,28 @@ public abstract class AbstractObserveTopiaDao<E extends Entity> extends Abstract } }); } + + @Override + public <R extends TopiaEntity> List<R> findUsages(Class<R> type, E entity) { + // No more used by us, prefer use the TopiaUsageService which is more performant + return null; + } + + @Override + public Map<Class<? extends TopiaEntity>, List<? extends TopiaEntity>> findAllUsages(E entity) { + // No more used by us, prefer use the TopiaUsageService which is more performant + return null; + } + + @Override + public List<TopiaEntity> getComposite(E entity) { + // Never wants to use this, prefer use TopiaMetadataModel + return null; + } + + @Override + public List<TopiaEntity> getAggregate(E entity) { + // Never wants to use this, prefer use TopiaMetadataModel + return null; + } } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/1d55e10088a6e574196202e8ea... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/1d55e10088a6e574196202e8ea... You're receiving this email because of your account on gitlab.com.