use of com.qcadoo.model.internal.FieldDefinitionImpl in project qcadoo by qcadoo.
the class ModelXmlToDefinitionConverterImpl method getPriorityFieldDefinition.
private FieldDefinition getPriorityFieldDefinition(final XMLStreamReader reader, final DataDefinitionImpl dataDefinition) {
String scopeAttribute = getStringAttribute(reader, "scope");
FieldDefinition scopedField = null;
if (scopeAttribute != null) {
scopedField = dataDefinition.getField(scopeAttribute);
}
return new FieldDefinitionImpl(dataDefinition, getStringAttribute(reader, "name")).withType(new PriorityType(scopedField));
}
use of com.qcadoo.model.internal.FieldDefinitionImpl in project qcadoo by qcadoo.
the class ModelXmlToDefinitionConverterImpl method addVersionFields.
private void addVersionFields(final DataDefinitionImpl dataDefinition) {
FieldDefinitionImpl fieldDefinition = new FieldDefinitionImpl(dataDefinition, VersionableConstants.VERSION_FIELD_NAME);
fieldDefinition.withReadOnly(false);
fieldDefinition.setPersistent(true);
fieldDefinition.withType(new LongType(false));
dataDefinition.withField(fieldDefinition);
}
Aggregations