blob: 64a6dbcce336c62b3dc5d0bd18addfe37f5d053f [file] [log] [blame]
package org.eclipse.osbp.xtext.datamartdsl.util
import org.eclipse.osbp.xtext.datamartdsl.DatamartAttribute
import org.eclipse.osbp.xtext.datamartdsl.DatamartAttributeBase
class DatamartAttributeUtil {
def static getAliasedAttributeName(DatamartAttributeBase attributeBase){
if (attributeBase instanceof DatamartAttribute){
var attribute = attributeBase as DatamartAttribute
if (attribute.aliased){
return '''«attribute?.aliasName?.replace("^", "")»'''
}
}
return '''«attributeBase?.attributeRef?.name?.replace("^", "")»'''
}
}