public class Parameter extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Parameter.Type
Description of the different types of a field.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH_NOT_SET
Fixed value used for determining the not-set value for the varchar.
|
| Constructor and Description |
|---|
Parameter(Method parent,
Parameter.Type type)
Constructor specifically meant for constructing a return-type.
|
Parameter(Method parent,
Parameter.Type type,
String name,
String label,
boolean nillable,
String default_value)
Standard constructor, which sets all the common variables for a field.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
String |
getDefaultValue()
Returns the value the database should set for the field when there is no
value set.
|
String |
getDescription()
Returns the description of the entity.
|
Method |
getEntity() |
List<String> |
getEnumOptions() |
String |
getLabel()
This method returns the label of this field.
|
String |
getName()
This method returns the name of this field.
|
Method |
getParent()
Deprecated.
|
Parameter.Type |
getType()
This method returns the type of this field.
|
Object |
getUserData() |
int |
getVarCharLength()
When this field is of type Type.VARCHAR, this method returns the maximum
length the varchar can be.
|
int |
hashCode()
Returns a hash code value for the Field.
|
boolean |
isNillable()
Returns whether this field can be NULL in the database.
|
void |
setDescription(String description)
Sets the description of this entity.
|
void |
setEnumOptions(List<String> options) |
void |
setType(Parameter.Type type) |
void |
setUserData(Object obj) |
void |
setVarCharLength(int length)
When this field is of type Type.VARCHAR, this method sets the maximum
length the varchar can be.
|
String |
toString()
Returns a string representation of the Field.
|
public static final int LENGTH_NOT_SET
public Parameter(Method parent, Parameter.Type type)
public Parameter(Method parent, Parameter.Type type, String name, String label, boolean nillable, String default_value)
type - The type of the field.name - The name of the field, which needs to be unique for the
entity.label - The label of the field, which is used for the user interface.nillable - Indicates whether this field can have the value NULL in the
database.@Deprecated public Method getParent()
public Method getEntity()
public Parameter.Type getType()
public void setType(Parameter.Type type)
type - public String getName()
public String getLabel()
public boolean isNillable()
public String getDefaultValue()
public String getDescription()
public void setDescription(String description)
public void setEnumOptions(List<String> options) throws MolgenisModelException
MolgenisModelExceptionpublic List<String> getEnumOptions() throws MolgenisModelException
MolgenisModelExceptionpublic void setVarCharLength(int length)
throws Exception
length - The maximum length the varchar field can be.Exception - When the field is not of type Type.VARCHAR.public int getVarCharLength()
throws Exception
Exception - When the field is not of type Type.VARCHAR.public void setUserData(Object obj)
public Object getUserData()
public String toString()
public boolean equals(Object obj)
Copyright © 2015. All Rights Reserved.