public interface Field extends Serializable
It is defined by a name and a type.
Modifier and Type | Field and Description |
---|---|
static int |
CONSTANT |
static int |
NILLABLE |
Modifier and Type | Method and Description |
---|---|
Set<Constraint> |
getConstraints() |
Type |
getDeclaringType()
Gets the complex type or list type that declared this field.
|
Object |
getDefaultValue()
Gets this field default value or null if none.
|
int |
getMaxLength()
Gets the maximum length for this field.
|
int |
getMaxOccurs()
Gets the maximum number this field may occurs in the owner type.
|
int |
getMinOccurs()
Gets the minimum number this field may occurs in the owner type.
|
QName |
getName()
Gets the field name.
|
Type |
getType()
Gets the field type.
|
boolean |
isConstant()
Checks whether this field is constant (is read only).
|
boolean |
isNillable()
Checks whether this field is nillable (can have null values).
|
void |
setConstant(boolean isConstant)
Sets the constant flag.
|
void |
setDefaultValue(String value)
Sets the default value of this field.
|
void |
setMaxLength(int length)
Sets the maximum length for this field.
|
void |
setMaxOccurs(int max)
Sets max number of occurrences for this field.
|
void |
setMinOccurs(int min)
Sets min number of occurrences for this field.
|
void |
setNillable(boolean isNillable)
Sets the nillable flag.
|
static final int NILLABLE
static final int CONSTANT
Type getDeclaringType()
The declaring type may differ from the complex type owning this field.
For example, in the case of a derived complex type, the field is owned by both the derived type and the base type, but it's declared only by the base type.
Object getDefaultValue()
boolean isNillable()
boolean isConstant()
void setDefaultValue(String value)
value
- the value to setvoid setNillable(boolean isNillable)
isNillable
- void setConstant(boolean isConstant)
isConstant
- int getMaxOccurs()
By default this is 1. -1 is returned if not a maximum limit is imposed.
int getMinOccurs()
By default this is 1.
void setMaxOccurs(int max)
max
- max number of occurrencesvoid setMinOccurs(int min)
min
- min number of occurrencesint getMaxLength()
Value -1 means no constraint.
void setMaxLength(int length)
length
- the length, or -1 for no constraintSet<Constraint> getConstraints()
Copyright © 2018 Nuxeo. All rights reserved.