Create EntityViewId class
This commit is contained in:
		
							parent
							
								
									42a831a311
								
							
						
					
					
						commit
						2b0ac1f1d0
					
				@ -0,0 +1,27 @@
 | 
			
		||||
package org.thingsboard.server.common.data.id;
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonCreator;
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
			
		||||
import org.thingsboard.server.common.data.EntityType;
 | 
			
		||||
 | 
			
		||||
import java.util.UUID;
 | 
			
		||||
 | 
			
		||||
public class EntityViewId extends UUIDBased implements EntityId {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    @JsonCreator
 | 
			
		||||
    public EntityViewId(@JsonProperty("id") UUID id) {
 | 
			
		||||
        super(id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static EntityViewId fromString(String entityViewID) {
 | 
			
		||||
        return new EntityViewId(UUID.fromString(entityViewID));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public EntityType getEntityType() {
 | 
			
		||||
        return EntityType.ENTITY_VIEW;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user