public class Depository extends Object implements IDomainModel
Modifier and Type | Field and Description |
---|---|
protected String |
id
The unique id it is also a slug used in URIs.
|
protected MeasurementType |
measurementType
Type of measurements stored in the Depository.
|
protected String |
name
Name of the Depository.
|
protected String |
organizationId
The id of the owner of this depository.
|
Constructor and Description |
---|
Depository()
The default constructor.
|
Depository(String name,
MeasurementType measurementType,
String ownerId)
Create a new Depository.
|
Depository(String slug,
String name,
MeasurementType measurementType,
String orgId)
Create a new Depository.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getId()
The slug is the name of the instance lower-cased, spaces replaced with '-',
and special characters removed.
|
MeasurementType |
getMeasurementType() |
String |
getName() |
String |
getOrganizationId() |
int |
hashCode() |
void |
setId(String id)
Sets the instance's slug.
|
void |
setMeasurementType(MeasurementType measurementType) |
void |
setName(String name)
Sets the name of the instance.
|
void |
setOrganizationId(String orgId)
Sets the id of the owner of this instance.
|
String |
toString() |
protected String name
protected String id
protected MeasurementType measurementType
protected String organizationId
public Depository()
public Depository(String name, MeasurementType measurementType, String ownerId)
name
- The name of the Depository.measurementType
- The type of the measurements this Depository
accepts.ownerId
- the id of the owner of the location.public Depository(String slug, String name, MeasurementType measurementType, String orgId)
slug
- The unique slug.name
- The name of the Depository.measurementType
- The type of the measurements this Depository
accepts.orgId
- the id of the organization of the Depository.public String getId()
IDomainModel
getId
in interface IDomainModel
public MeasurementType getMeasurementType()
public String getName()
getName
in interface IDomainModel
public String getOrganizationId()
getOrganizationId
in interface IDomainModel
public void setId(String id)
IDomainModel
setId
in interface IDomainModel
id
- the id to setpublic void setMeasurementType(MeasurementType measurementType)
measurementType
- the measurementType to setpublic void setName(String name)
IDomainModel
setName
in interface IDomainModel
name
- the name to set.public void setOrganizationId(String orgId)
IDomainModel
setOrganizationId
in interface IDomainModel
orgId
- the id of the owner.Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.