private String getParentId() { if (typeId != null) return typeId; if (type == null) { throw new UnresolvableReferenceExcpetion("type and parentId are both not set"); } DynamicType dynamicType = resolver.getDynamicType(type); if (dynamicType == null) { throw new UnresolvableReferenceExcpetion(type); } typeId = dynamicType.getId(); return typeId; }