package com.devicehive.vo;
/*
* #%L
* DeviceHive Common Dao Interfaces
* %%
* Copyright (C) 2016 DataArt
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import com.devicehive.json.strategies.JsonPolicyDef;
import com.devicehive.model.HiveEntity;
import com.devicehive.model.JsonStringWrapper;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import static com.devicehive.json.strategies.JsonPolicyDef.Policy.*;
/**
* Device Class Value Object.
*/
public class DeviceClassVO implements HiveEntity {
@JsonPolicyDef({DEVICE_PUBLISHED, NETWORK_PUBLISHED, DEVICECLASS_LISTED, DEVICECLASS_PUBLISHED, DEVICECLASS_SUBMITTED})
private Long id;
@NotNull(message = "name field cannot be null.")
@Size(min = 1, max = 128, message = "Field cannot be empty. The length of name should not be more than 128 symbols.")
@JsonPolicyDef({DEVICE_PUBLISHED, DEVICE_SUBMITTED, NETWORK_PUBLISHED, DEVICECLASS_LISTED, DEVICECLASS_PUBLISHED})
private String name;
@JsonPolicyDef({DEVICE_PUBLISHED, DEVICE_SUBMITTED, NETWORK_PUBLISHED, DEVICECLASS_LISTED, DEVICECLASS_PUBLISHED})
private Boolean isPermanent;
@JsonPolicyDef({DEVICE_PUBLISHED, DEVICE_SUBMITTED, NETWORK_PUBLISHED, DEVICECLASS_LISTED, DEVICECLASS_PUBLISHED})
private JsonStringWrapper data;
private long entityVersion;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getIsPermanent() {
return isPermanent;
}
public void setIsPermanent(Boolean isPermanent) {
this.isPermanent = isPermanent;
}
public JsonStringWrapper getData() {
return data;
}
public void setData(JsonStringWrapper data) {
this.data = data;
}
public long getEntityVersion() {
return entityVersion;
}
public void setEntityVersion(long entityVersion) {
this.entityVersion = entityVersion;
}
}