Package com.opencloud.rem.common.form
Class Field
- java.lang.Object
-
- com.opencloud.rem.common.form.Field
-
- All Implemented Interfaces:
Serializable
public class Field extends Object implements Serializable
Represents a single field in a form schema.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
displayName()
Gets the name to display for this field.String
getAttribute(String name)
Gets the specified attribute for this field.String
getDescription()
Gets the description for this field.String
getDisplayName()
Gets the display name for this field.FieldType
getFieldType()
Gets theFieldType
for this field.FieldValueProvider
getFieldValueProvider()
Gets theFieldValueProvider
for this field.String
getName()
Gets the name of this field.boolean
hasAttribute(String name)
Gets whether or not this field has the specified attribute.boolean
hasFieldValueProvider()
Gets whether or not this field has aFieldValueProvider
.boolean
isId()
Gets whether or not this is an ID field.boolean
isNullable()
Gets whether or not this field is nullable.boolean
isReadable()
Gets whether or not this field is readable.boolean
isRequired()
Gets whether or not this field is required.boolean
isWritable()
Gets whether or not this field is writable.String
toString()
-
-
-
Method Detail
-
getName
public String getName()
Gets the name of this field.- Returns:
- the field's name - never
null
-
getDisplayName
public String getDisplayName()
Gets the display name for this field.- Returns:
- the field's display name or
null
if unset
-
getFieldType
public FieldType getFieldType()
Gets theFieldType
for this field.- Returns:
- the field's
FieldType
- nevernull
-
getDescription
public String getDescription()
Gets the description for this field.- Returns:
- the field's description or
null
if unset
-
isId
public boolean isId()
Gets whether or not this is an ID field.- Returns:
true
if this field is an ID field
-
isRequired
public boolean isRequired()
Gets whether or not this field is required.- Returns:
true
if this field is required
-
isReadable
public boolean isReadable()
Gets whether or not this field is readable.- Returns:
true
if this field is readable
-
isWritable
public boolean isWritable()
Gets whether or not this field is writable.- Returns:
true
if this field is writable
-
hasAttribute
public boolean hasAttribute(String name)
Gets whether or not this field has the specified attribute.- Parameters:
name
- the name of the attribute to check- Returns:
true
if this field has the specified attribute
-
getAttribute
public String getAttribute(String name)
Gets the specified attribute for this field.- Parameters:
name
- the name of the attribute to get- Returns:
- the value of the specified attribute - may be
null
-
hasFieldValueProvider
public boolean hasFieldValueProvider()
Gets whether or not this field has aFieldValueProvider
.- Returns:
true
if this field has aFieldValueProvider
-
getFieldValueProvider
public FieldValueProvider getFieldValueProvider()
Gets theFieldValueProvider
for this field.- Returns:
- the
FieldValueProvider
ornull
if unset
-
isNullable
public boolean isNullable()
Gets whether or not this field is nullable.
To be nullable a field must meet all of the following conditions:
- not required
- not an ID field
- not a primitive type
- Returns:
true
if this field is nullable
-
displayName
public String displayName()
Gets the name to display for this field.- Returns:
- the
displayName
if set, otherwise thename
-
-