public class FieldImpl extends Object implements Field
| Constructor and Description |
|---|
FieldImpl(QName name,
TypeRef<? extends Type> declaringType,
TypeRef<? extends Type> type) |
FieldImpl(QName name,
TypeRef<? extends Type> declaringType,
TypeRef<? extends Type> type,
String defaultValue,
int flags) |
FieldImpl(QName name,
Type declaringType,
Type type) |
| Modifier and Type | Method and Description |
|---|---|
ComplexType |
getDeclaringType()
Gets the complex 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.
|
String |
toString() |
public FieldImpl(QName name, TypeRef<? extends Type> declaringType, TypeRef<? extends Type> type)
public ComplexType getDeclaringType()
FieldThe 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.
getDeclaringType in interface Fieldpublic Object getDefaultValue()
FieldgetDefaultValue in interface Fieldpublic boolean isNillable()
FieldisNillable in interface Fieldpublic boolean isConstant()
FieldisConstant in interface Fieldpublic void setDefaultValue(String value)
FieldsetDefaultValue in interface Fieldvalue - the value to setpublic void setNillable(boolean isNillable)
FieldsetNillable in interface Fieldpublic void setConstant(boolean isConstant)
FieldsetConstant in interface Fieldpublic int getMaxOccurs()
FieldBy default this is 1. -1 is returned if not a maximum limit is imposed.
getMaxOccurs in interface Fieldpublic int getMinOccurs()
FieldBy default this is 1.
getMinOccurs in interface Fieldpublic void setMaxOccurs(int max)
FieldsetMaxOccurs in interface Fieldmax - max number of occurrencespublic void setMinOccurs(int min)
FieldsetMinOccurs in interface Fieldmin - min number of occurrencespublic int getMaxLength()
FieldValue -1 means no constraint.
getMaxLength in interface Fieldpublic void setMaxLength(int length)
FieldsetMaxLength in interface Fieldlength - the length, or -1 for no constraintCopyright © 2011 Nuxeo SA. All Rights Reserved.