Interface NFEAttributeConstraint
-
- All Known Implementing Classes:
NFEBasicAttributeConstraint
public interface NFEAttributeConstraintRepresents a constraint for an attribute definition. It can specify the attribute default value and whether the attribute is writable or not.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NFEAttributeConstraintcreateCopy()Returns object copy.NFEAttributeDescriptorgetAttributeDescriptor()Gets the attribute descriptor where the constraint is enforcedjava.lang.ObjectgetDefaultValue()Gets the value the attribute must contain when it is createdlonggetId()Gets the constraint IDbooleanisReadOnly()Gets whether the attribute is writable or read-onlybooleanisVisible()Tells whether the attribute is visible or not.voidsetAttributeDescriptor(NFEAttributeDescriptor attrDescriptor)Sets the attribute descriptor where the constraint is enforcedvoidsetDefaultValue(java.lang.Object defaultValue)Sets the value the attribute must contain when it is createdvoidsetId(long id)Sets the constraint IDvoidsetReadOnly(boolean readOnly)Sets whether the attribute is writable or read-onlyvoidsetVisible(boolean visible)Sets whether the attribute is visible or not.
-
-
-
Method Detail
-
getId
long getId()
Gets the constraint ID- Returns:
- the constraint ID
-
setId
void setId(long id)
Sets the constraint ID- Parameters:
id- the constraint ID
-
setAttributeDescriptor
void setAttributeDescriptor(NFEAttributeDescriptor attrDescriptor)
Sets the attribute descriptor where the constraint is enforced- Parameters:
attrDescriptor- an attribute descriptor instance
-
getAttributeDescriptor
NFEAttributeDescriptor getAttributeDescriptor()
Gets the attribute descriptor where the constraint is enforced- Returns:
- an attribute descriptor instance
-
setDefaultValue
void setDefaultValue(java.lang.Object defaultValue)
Sets the value the attribute must contain when it is created- Parameters:
defaultValue- an attribute default value. The type should match the type specified by the constraint's attribute descriptor
-
getDefaultValue
java.lang.Object getDefaultValue()
Gets the value the attribute must contain when it is created- Returns:
- the attribute default value
-
setReadOnly
void setReadOnly(boolean readOnly)
Sets whether the attribute is writable or read-only- Parameters:
readOnly- true if the attribute is read-only
-
isReadOnly
boolean isReadOnly()
Gets whether the attribute is writable or read-only- Returns:
- true if the attribute is read-only
-
setVisible
void setVisible(boolean visible)
Sets whether the attribute is visible or not. It is used with graphical editors.- Parameters:
visible- true for visible
-
isVisible
boolean isVisible()
Tells whether the attribute is visible or not. It is used with graphical editors.- Returns:
- true for visible
-
createCopy
NFEAttributeConstraint createCopy()
Returns object copy.- Returns:
- object copy
-
-