use of org.obeonetwork.dsl.database.parts.SequencePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class SequencePropertiesEditionComponent method initPart.
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
* org.eclipse.emf.ecore.resource.ResourceSet)
*/
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
setInitializing(true);
if (editingPart != null && key == partKey) {
editingPart.setContext(elt, allResource);
final Sequence sequence = (Sequence) elt;
final SequencePropertiesEditionPart sequencePart = (SequencePropertiesEditionPart) editingPart;
// init values
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.name))
sequencePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, sequence.getName()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.StartIncrement.start))
sequencePart.setStart(EEFConverterUtil.convertToString(EcorePackage.Literals.EBIG_INTEGER, sequence.getStart()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.StartIncrement.increment))
sequencePart.setIncrement(EEFConverterUtil.convertToString(EcorePackage.Literals.EBIG_INTEGER, sequence.getIncrement()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.MinMax.minValue))
sequencePart.setMinValue(EEFConverterUtil.convertToString(EcorePackage.Literals.EBIG_INTEGER, sequence.getMinValue()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.MinMax.maxValue))
sequencePart.setMaxValue(EEFConverterUtil.convertToString(EcorePackage.Literals.EBIG_INTEGER, sequence.getMaxValue()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.CycleCacheSize.cycle)) {
sequencePart.setCycle(sequence.isCycle());
}
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.CycleCacheSize.cacheSize))
sequencePart.setCacheSize(EEFConverterUtil.convertToString(EcorePackage.Literals.EBIG_INTEGER, sequence.getCacheSize()));
if (isAccessible(DatabaseViewsRepository.Sequence.Properties.comments))
sequencePart.setComments(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, sequence.getComments()));
// init filters
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations