private AssociationDefinitionModel fetchAssociationDefinition( Association assoc, String wholeTypeUri, String partTypeUri) { try { long assocId = assoc.getId(); return new AssociationDefinitionModel( assocId, assoc.getTypeUri(), wholeTypeUri, partTypeUri, fetchWholeCardinality(assocId).getUri(), fetchPartCardinality(assocId).getUri(), fetchAssocDefViewConfig(assoc)); } catch (Exception e) { throw new RuntimeException( "Fetching association definition failed (wholeTypeUri=\"" + wholeTypeUri + "\", partTypeUri=" + partTypeUri + ", " + assoc + ")", e); } }