use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.
the class JpaBaseComponentDescriptorDaoTest method createComponentDescriptor.
private void createComponentDescriptor(ComponentType type, ComponentScope scope, int index) {
ComponentDescriptor component = new ComponentDescriptor();
component.setId(new ComponentDescriptorId(UUIDs.timeBased()));
component.setType(type);
component.setScope(scope);
component.setName("COMPONENT_" + index);
componentDescriptorDao.save(component);
}
use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.
the class ComponentDescriptorEntity method toData.
@Override
public ComponentDescriptor toData() {
ComponentDescriptor data = new ComponentDescriptor(new ComponentDescriptorId(this.getId()));
data.setType(type);
data.setScope(scope);
data.setName(this.getName());
data.setClazz(this.getClazz());
data.setActions(this.getActions());
data.setConfigurationDescriptor(configurationDescriptor);
return data;
}
use of org.thingsboard.server.common.data.id.ComponentDescriptorId in project thingsboard by thingsboard.
the class ComponentDescriptorEntity method toData.
@Override
public ComponentDescriptor toData() {
ComponentDescriptor data = new ComponentDescriptor(new ComponentDescriptorId(id));
data.setType(type);
data.setScope(scope);
data.setName(this.getName());
data.setClazz(this.getClazz());
data.setActions(this.getActions());
data.setConfigurationDescriptor(this.getConfigurationDescriptor());
return data;
}
Aggregations