public static Key get4Instance ( final Instance _instance ) throws EFapsException { Key . LOG . debug ( "Retrieving Key for {}" , _instance ) ; final Key ret = new Key ( ) ; ret . setPersonId ( Context . getThreadContext ( ) . getPersonId ( ) ) ; final Type type = _instance . getType ( ) ; ret . setTypeId ( type . getId ( ) ) ; if ( type . isCompanyDependent ( ) ) { ret . setCompanyId ( Context . getThreadContext ( ) . getCompany ( ) . getId ( ) ) ; } Key . LOG . debug ( "Retrieved Key {}" , ret ) ; return ret ; }
Gets the for instance .