From 6bed78b5a0763dd9e6b9f75a260f34b8acd05acd Mon Sep 17 00:00:00 2001 From: danikov Date: Wed, 29 Feb 2012 11:31:53 +0000 Subject: [PATCH] add convenience constructor to make a reference to an entityType from the entityType --- .../org/jclouds/vcloud/director/v1_5/domain/Reference.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Reference.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Reference.java index e055bb5264..c40d5911a6 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Reference.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Reference.java @@ -88,6 +88,10 @@ public class Reference extends ReferenceType { public Builder fromReference(Reference in) { return fromReferenceType(in); } + + public Builder fromEntity(EntityType in) { + return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType()); + } } public Reference(URI href, String id, String name, String type) {