|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.edu.agh.cast.data.model.DataSetDescriptor
public class DataSetDescriptor
Descriptor of a data set (see IDataSet).
The descriptor holds the basic data concerning the described data set, such as:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface pl.edu.agh.cast.data.model.Identifiable |
|---|
Identifiable.Properties |
| Constructor Summary | |
|---|---|
DataSetDescriptor()
Default constructor. |
|
DataSetDescriptor(Type type)
Initializes descriptor with type. |
|
DataSetDescriptor(Type type,
String name)
Constructor for descriptors of new data sets. |
|
DataSetDescriptor(Type type,
UUID id,
String name,
Date creationDate)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
checkIfValid()
Checks if the attributes of this description are valid. |
boolean |
equals(Object that)
|
Date |
getCreationDate()
|
UUID |
getId()
Returns the ID of the data set. |
String |
getName()
|
Type |
getType()
Returns the type of the data set. |
int |
hashCode()
|
boolean |
isValid()
Checks if this description is valid. |
void |
setCreationDate(Date creationDate)
|
void |
setId(UUID id)
Sets the ID of the data set. |
void |
setName(String name)
|
void |
setType(Type type)
Sets the type of the data set. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataSetDescriptor()
Usage of this constructor is discouraged, since it does not provide any integrity control. If, however, this
constructor is used, the isValid() method should be called in order to check the integrity.
public DataSetDescriptor(Type type)
type - the data set type
public DataSetDescriptor(Type type,
String name)
The new descriptor has a random ID and current creation date.
type - the data set typename - the data set name
public DataSetDescriptor(Type type,
UUID id,
String name,
Date creationDate)
type - the data set typeid - the data set IDname - the data set namecreationDate - the data set creation date| Method Detail |
|---|
public final boolean isValid()
Data set description is valid when the ID and type (subtype of IDataSet.TYPE) are configured.
isValid in interface IValidatabletrue if this description is valid, false otherwiseprotected boolean checkIfValid()
This method is called by the isValid() method. By default it always returns true, however
it can be overridden in order to define new validation rules. In such case the implementation from base class
should be called inside the overridden method in order to preserve data consistency.
true if attributes of this descriptor are valid, false otherwisepublic final UUID getId()
getId in interface Identifiablepublic final void setId(UUID id)
id - the data set ID
ModelException - if the ID is already set and it is not equal to given one
IllegalArgumentException - if the given ID is nullpublic final Type getType()
getType in interface Identifiablepublic final void setType(Type type)
type - the data set type
ModelException - if the type is already set
IllegalArgumentException - if the given type is null or is not a type of data setpublic final String getName()
public final void setName(String name)
public Date getCreationDate()
public void setCreationDate(Date creationDate)
public final boolean equals(Object that)
equals in class ObjectObject.equals(java.lang.Object)public final int hashCode()
hashCode in class ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||