public static Event valueOf ( final CommonEvent selEvent ) { final Data data = Data . valueOf ( selEvent . getDataType ( ) . asBaseType ( ) , selEvent . getData ( ) ) ; if ( selEvent . getMeta ( ) == null ) { return new Event ( selEvent . getId ( ) , data ) ; } final Data meta = Data . valueOf ( "meta" , selEvent . getMeta ( ) ) ; return new Event ( selEvent . getId ( ) , data , meta ) ; }
Creates an event using a common event .