use of org.obeonetwork.dsl.typeslibrary.TypeInstance in project InformationSystem by ObeoNetwork.
the class CreationUtils method createTypeInstance.
public static TypeInstance createTypeInstance(NativeTypesLibrary nativeTypesLibrary, String columnType, int columnSize, int decimalDigits) {
NativeType nativeType = nativeTypesLibrary.findTypeByName(columnType);
if (nativeType == null) {
System.err.println("createTypeInstance : native type [" + columnType + "] not found.");
}
TypeInstance typeInstance = TypesLibraryFactory.eINSTANCE.createTypeInstance();
typeInstance.setNativeType(nativeType);
typeInstance.setLength(columnSize);
typeInstance.setPrecision(decimalDigits);
return typeInstance;
}
Aggregations