blob: 8c25cda8cfbe923c4f61c43f20a3d3106e4717b3 [file] [log] [blame]
tom3065d122014-09-03 21:56:43 -07001package org.onlab.onos.net;
2
3import org.onlab.onos.net.provider.ProviderId;
4
5/**
6 * Base implementation of a network model entity.
7 */
8public class AbstractModel implements Provided {
9
10 private final ProviderId providerId;
11
tomc6491322014-09-19 15:27:40 -070012 // For serialization
13 public AbstractModel() {
14 providerId = null;
15 }
16
tom3065d122014-09-03 21:56:43 -070017 /**
18 * Creates a model entity attributed to the specified provider.
19 *
20 * @param providerId identity of the provider
21 */
22 protected AbstractModel(ProviderId providerId) {
23 this.providerId = providerId;
24 }
25
26 @Override
27 public ProviderId providerId() {
28 return providerId;
29 }
30
31}