gpt4 book ai didi

com.sitewhere.rest.model.area.Zone.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 00:13:31 26 4
gpt4 key购买 nike

本文整理了Java中com.sitewhere.rest.model.area.Zone.<init>()方法的一些代码示例,展示了Zone.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.<init>()方法的具体详情如下:
包路径:com.sitewhere.rest.model.area.Zone
类名称:Zone
方法名:<init>

Zone.<init>介绍

暂无

代码示例

代码示例来源:origin: sitewhere/sitewhere

/**
   * Convert a {@link Document} into the SPI equivalent.
   * 
   * @param source
   * @return
   */
  public static Zone fromDocument(Document source) {
  Zone result = new Zone();
  MongoZone.fromDocument(source, result);
  return result;
  }
}

代码示例来源:origin: sitewhere/sitewhere

/**
 * Convert zone from GRPC to API.
 * 
 * @param grpc
 * @return
 * @throws SiteWhereException
 */
public static Zone asApiZone(GZone grpc) throws SiteWhereException {
Zone api = new Zone();
api.setName(grpc.getName());
api.setBounds(CommonModelConverter.asApiLocations(grpc.getBoundsList()));
api.setFillColor(grpc.getFillColor());
api.setBorderColor(grpc.getBorderColor());
api.setOpacity(grpc.getOpacity());
CommonModelConverter.setEntityInformation(api, grpc.getEntityInformation());
return api;
}

代码示例来源:origin: sitewhere/sitewhere

/**
 * Common logic for creating a zone based on an incoming request.
 * 
 * @param request
 * @param area
 * @param uuid
 * @return
 * @throws SiteWhereException
 */
public static Zone zoneCreateLogic(IZoneCreateRequest request, IArea area, String uuid) throws SiteWhereException {
Zone zone = new Zone();
Persistence.entityCreateLogic(request, zone);
zone.setAreaId(area.getId());
zone.setName(request.getName());
zone.setBorderColor(request.getBorderColor());
zone.setFillColor(request.getFillColor());
zone.setOpacity(request.getOpacity());
zone.setBounds(Location.copy(request.getBounds()));
return zone;
}

代码示例来源:origin: com.sitewhere/sitewhere-java-model

/**
   * Create a copy of an SPI object. Used by web services for marshaling.
   * 
   * @param input
   * @return
   */
  public static Zone copy(IZone input) throws SiteWhereException {
  Zone result = new Zone();
  result.setId(input.getId());
  result.setToken(input.getToken());
  result.setAreaId(input.getAreaId());
  result.setName(input.getName());
  result.setCreatedDate(input.getCreatedDate());
  result.setBorderColor(input.getBorderColor());
  result.setFillColor(input.getFillColor());
  result.setOpacity(input.getOpacity());
  result.setBounds(Location.copy(input.getBounds()));

  PersistentEntity.copy(input, result);
  return result;
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com