@ Nonnull public static String getColumnElementID ( @ Nonnull final Object aColumnElement ) { if ( aColumnElement instanceof ColumnRef ) return ( ( ColumnRef ) aColumnElement ) . getId ( ) ; if ( aColumnElement instanceof Column ) return ( ( Column ) aColumnElement ) . getId ( ) ; if ( aColumnElement instanceof Key ) { final List < KeyColumnRef > aKeyColumnRefs = ( ( Key ) aColumnElement ) . getColumnRef ( ) ; final KeyColumnRef aKeyColumnRef = CollectionHelper . getFirstElement ( aKeyColumnRefs ) ; if ( aKeyColumnRef == null ) throw new IllegalArgumentException ( "Key contains not KeyColumnRef!!" ) ; final Object aRef = aKeyColumnRef . getRef ( ) ; if ( aRef instanceof Column ) return ( ( Column ) aRef ) . getId ( ) ; throw new IllegalArgumentException ( "Unsupported referenced object: " + aRef + " - " + ClassHelper . getSafeClassName ( aRef ) ) ; } throw new IllegalArgumentException ( "Illegal column element: " + aColumnElement + " - " + ClassHelper . getSafeClassName ( aColumnElement ) ) ; }
Get the ID of the passed column element .