Package org.traccar.web.shared.model

Examples of org.traccar.web.shared.model.Device


        deviceHandler.onSelected(device);
    }

    @Override
    public void onAdd() {
        new DeviceDialog(new Device(), new DeviceDialog.DeviceHandler() {
            @Override
            public void onSave(Device device) {
                Application.getDataService().addDevice(device, new BaseAsyncCallback<Device>() {
                    @Override
                    public void onSuccess(Device result) {
View Full Code Here


        }).show();
    }

    @Override
    public void onEdit(Device device) {
        new DeviceDialog(new Device(device), new DeviceDialog.DeviceHandler() {
            @Override
            public void onSave(Device device) {
                Application.getDataService().updateDevice(device, new BaseAsyncCallback<Device>() {
                    @Override
                    public void onSuccess(Device result) {
View Full Code Here

            List<Device> results = query.getResultList();           
           
            if (results.isEmpty()) {
                entityManager.getTransaction().begin();
                try {
                    Device tmp_device = entityManager.find(Device.class, device.getId());
                    tmp_device.setName(device.getName());
                    tmp_device.setUniqueId(device.getUniqueId());
                    entityManager.getTransaction().commit();
                    return tmp_device;
                } catch (RuntimeException e) {
                    entityManager.getTransaction().rollback();
                    throw e;
View Full Code Here

TOP

Related Classes of org.traccar.web.shared.model.Device

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.