@Override public void copyTo(ServiceDocument target) { super.copyTo(target); if (target instanceof MultiTenantDocument) { MultiTenantDocument mtd = (MultiTenantDocument)target; mtd.tenantLinks = this.tenantLinks; } } }
public void copyTo(ResourceState target) { super.copyTo(target); target.id = this.id; target.name = this.name; target.customProperties = this.customProperties; target.tenantLinks = this.tenantLinks; target.groupLinks = this.groupLinks; target.tagLinks = this.tagLinks; target.creationTimeMicros = this.creationTimeMicros; target.regionId = this.regionId; }
@Override public void copyTo(ServiceDocument target) { super.copyTo(target); if (target instanceof ServiceDocumentQueryResult) { ServiceDocumentQueryResult sdqr = (ServiceDocumentQueryResult) target; sdqr.documentLinks = this.documentLinks; sdqr.documents = this.documents; sdqr.selectedLinksPerDocument = this.selectedLinksPerDocument; sdqr.selectedLinks = this.selectedLinks; sdqr.documentCount = this.documentCount; sdqr.prevPageLink = this.prevPageLink; sdqr.nextPageLink = this.nextPageLink; sdqr.nextPageLinksPerGroup = this.nextPageLinksPerGroup; sdqr.queryTimeMicros = this.queryTimeMicros; sdqr.continuousResults = this.continuousResults; } }
public void copyTo(ResourceState target) { super.copyTo(target); target.id = this.id; target.name = this.name; target.desc = this.desc; target.customProperties = this.customProperties; target.tenantLinks = this.tenantLinks; target.groupLinks = this.groupLinks; target.tagLinks = this.tagLinks; target.expandedTags = this.expandedTags; target.creationTimeMicros = this.creationTimeMicros; target.regionId = this.regionId; target.endpointLinks = this.endpointLinks; target.computeHostLink = this.computeHostLink; target.documentCreationTimeMicros = this.documentCreationTimeMicros; } }
} else { ServiceDocument stateClone = new ServiceDocument(); state.copyTo(stateClone); o = stateClone;
if (options.contains(QueryOption.EXPAND_BUILTIN_CONTENT_ONLY)) { ServiceDocument stateClone = new ServiceDocument(); state.copyTo(stateClone); rsp.documents.put(link, stateClone); } else if (state == null) {
void cacheServiceState(Service s, ServiceDocument st, Operation op) { if (op != null && op.hasBody()) { Object rsp = op.getBodyRaw(); // if the response body is of type Document set its common // properties to that of the service state if (rsp.getClass().equals(st.getClass())) { ServiceDocument r = (ServiceDocument) rsp; st.copyTo(r); } } if (op != null && op.getAction() == Action.DELETE) { return; } if (st != null && st.documentKind == null) { log(Level.WARNING, "documentKind is null for %s", s.getSelfLink()); st.documentKind = Utils.buildKind(s.getStateType()); } this.serviceResourceTracker.updateCachedServiceState(s, st, op); }
one.copyTo(two);