This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository topia. See http://git.nuiton.org/topia.git commit 7004d98708d998217a44c26b51d3dc6b034eecbd Author: Tony CHEMIT <chemit@codelutin.com> Date: Sun Aug 23 19:12:19 2015 +0200 Add generateForeignKeyNames tag value definition (See #3722) --- .../org/nuiton/topia/templates/TopiaTagValues.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java index eda2348..ebc18d4 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java @@ -353,6 +353,16 @@ public class TopiaTagValues extends TagValueDefinitionProvider { public static final String TAG_INDEX_FOREIGN_KEYS = "indexForeignKeys"; /** + * Tag to generate deterministic foreign key names in hibernate mapping files. + * + * @see #isGenerateForeignKeyNames(ObjectModelClassifier, ObjectModel) + * @since 3.0.1 + */ + @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}, + documentation = "To generate deterministic foreign keys names in hibernate mappings.") + public static final String TAG_GENERATE_FOREIGN_KEY_NAMES = "generateForeignKeyNames"; + + /** * Tag to specify a super class to use instead of * {@link org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext}. * <p/> @@ -730,6 +740,23 @@ public class TopiaTagValues extends TagValueDefinitionProvider { return value; } + /** + * Obtain the value of the {@link TopiaTagValues#TAG_GENERATE_FOREIGN_KEY_NAMES} + * tag value on the given model or classifier and returns {@code true} if the tag value was found and value {@code true}. + * + * It will first look on the model, and then in the given classifier. + * + * @param model model to seek + * @param classifier classifier to seek + * @return {@code true} if tag value was found on classifier or model and his value is {@code true}, otherwise {@code false}. + * @see TopiaTagValues#TAG_GENERATE_FOREIGN_KEY_NAMES + * @since 2.10 + */ + public boolean isGenerateForeignKeyNames(ObjectModelClassifier classifier, ObjectModel model) { + boolean value = findBooleanTagValue(TAG_GENERATE_FOREIGN_KEY_NAMES, classifier, model); + return value ; + } + protected static final Map<String, String> HIBERNATE_ATTRIBUTE_TYPE_DEFAULT_VALUES = Maps.newHashMap(); static { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.