use of io.vertigo.dynamo.plugins.environment.dsl.entity.DslEntityField in project vertigo by KleeGroup.
the class DslDefinition method getDefinitionLinkNames.
/**
* Permet de récupérer la liste des définitions d'un champ.
*
* @param fieldName Nom du champ.
* @return List
*/
public List<String> getDefinitionLinkNames(final String fieldName) {
final DslEntityField dslEntityField = entity.getField(fieldName);
Assertion.checkState(dslEntityField.getType().isEntityLink(), "expected a link on {0}", fieldName);
// ---
return definitionLinkNamesByFieldName.get(dslEntityField);
}
use of io.vertigo.dynamo.plugins.environment.dsl.entity.DslEntityField in project vertigo by KleeGroup.
the class DslDefinition method getPropertyValue.
/**
* Retourne la valeur d'une (méta) propriété liée au domaine, champ, dtDéfinition...
* null si cette propriété n'existe pas
* @param fieldName Name of the field
* @return valeur de la propriété
*/
public Object getPropertyValue(final String fieldName) {
final DslEntityField dslEntityField = entity.getField(fieldName);
Assertion.checkState(dslEntityField.getType().isProperty(), "expected a property on {0}", fieldName);
// Conformémément au contrat, on retourne null si pas de propriété trouvée
return propertyValueByFieldName.get(dslEntityField);
}
use of io.vertigo.dynamo.plugins.environment.dsl.entity.DslEntityField in project vertigo by KleeGroup.
the class DslDefinition method getChildDefinitions.
/**
* Récupération de la liste des definitions dont est composée la définition principale.
* @param fieldName String
* @return List
*/
public List<DslDefinition> getChildDefinitions(final String fieldName) {
final DslEntityField dslEntityField = entity.getField(fieldName);
Assertion.checkState(dslEntityField.getType().isEntity(), "expected an entity on {0}", fieldName);
// ---
return childDefinitionsByFieldName.get(dslEntityField);
}
use of io.vertigo.dynamo.plugins.environment.dsl.entity.DslEntityField in project vertigo by KleeGroup.
the class DslDefinitionBuilder method addAllDefinitionLinks.
/**
* Ajoute une liste de définitions au champ défini par fieldName.
* La définition n'est connue que par sa référence, son nom.
* @param fieldName Name of the field
* @param definitionNames list of the names of the dedinitions
* @return this builder
*/
public DslDefinitionBuilder addAllDefinitionLinks(final String fieldName, final List<String> definitionNames) {
Assertion.checkNotNull(definitionNames);
final DslEntityField dslEntityField = entity.getField(fieldName);
Assertion.checkState(dslEntityField.getType().isEntityLink(), "expected a link on {0}", fieldName);
// ---
definitionLinkNamesByFieldName.get(dslEntityField).addAll(definitionNames);
return this;
}
use of io.vertigo.dynamo.plugins.environment.dsl.entity.DslEntityField in project vertigo by KleeGroup.
the class DslDefinitionBuilder method addAllChildDefinitions.
private void addAllChildDefinitions(final String fieldName, final List<DslDefinition> dslDefinitions) {
Assertion.checkNotNull(dslDefinitions);
final DslEntityField dslEntityField = entity.getField(fieldName);
Assertion.checkState(dslEntityField.getType().isEntity(), "expected an entity on {0}", fieldName);
// ---
childDefinitionsByFieldName.get(dslEntityField).addAll(dslDefinitions);
}
Aggregations