Class PropertyModelImpl
java.lang.Object
org.apache.tapestry5.beanmodel.internal.beanmodel.PropertyModelImpl
- All Implemented Interfaces:
PropertyModel
,AnnotationProvider
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyModelImpl
(BeanModel model, String name, PropertyConduit conduit, Messages messages) -
Method Summary
Modifier and TypeMethodDescriptionChanges the data type for the property.<T extends Annotation>
TgetAnnotation
(Class<T> annotationClass) Searches for the specified annotation, returning the matching annotation instance.Returns an object used to read or update the property.Returns a logical name for the type of UI needed to view or edit the property.getId()
Returns the id used to access other resources (this is based on the property name, but with any excess punctuation stripped out).getLabel()
Returns a user-presentable label for the property.Returns the name of the property (which may, in fact, be a property expression).Returns the type of the property.boolean
Returns true if the property can be used for sorting.Changes the label for the property to the provided value.model()
Returns the containing model, often used for "fluent" construction of the model.sortable
(boolean sortable) Updates sortable and returns the model for further changes.
-
Constructor Details
-
PropertyModelImpl
-
-
Method Details
-
getId
Description copied from interface:PropertyModel
Returns the id used to access other resources (this is based on the property name, but with any excess punctuation stripped out).- Specified by:
getId
in interfacePropertyModel
-
getPropertyType
Description copied from interface:PropertyModel
Returns the type of the property.- Specified by:
getPropertyType
in interfacePropertyModel
-
getConduit
Description copied from interface:PropertyModel
Returns an object used to read or update the property. For virtual properties (properties that do not actually exist on the bean), the conduit may be null.- Specified by:
getConduit
in interfacePropertyModel
-
label
Description copied from interface:PropertyModel
Changes the label for the property to the provided value.- Specified by:
label
in interfacePropertyModel
- Parameters:
label
- new label for property- Returns:
- the property model, for further changes
-
getLabel
Description copied from interface:PropertyModel
Returns a user-presentable label for the property.- Specified by:
getLabel
in interfacePropertyModel
-
getPropertyName
Description copied from interface:PropertyModel
Returns the name of the property (which may, in fact, be a property expression).- Specified by:
getPropertyName
in interfacePropertyModel
-
model
Description copied from interface:PropertyModel
Returns the containing model, often used for "fluent" construction of the model.- Specified by:
model
in interfacePropertyModel
-
dataType
Description copied from interface:PropertyModel
Changes the data type for the property.- Specified by:
dataType
in interfacePropertyModel
- Returns:
- the property model, for further changes
-
getDataType
Description copied from interface:PropertyModel
Returns a logical name for the type of UI needed to view or edit the property. This is initially determined from the property type.- Specified by:
getDataType
in interfacePropertyModel
-
isSortable
Description copied from interface:PropertyModel
Returns true if the property can be used for sorting. By default, this is true only if the property type implements Comparable.- Specified by:
isSortable
in interfacePropertyModel
-
sortable
Description copied from interface:PropertyModel
Updates sortable and returns the model for further changes.- Specified by:
sortable
in interfacePropertyModel
- Returns:
- the property model, for further changes
-
getAnnotation
Description copied from interface:AnnotationProvider
Searches for the specified annotation, returning the matching annotation instance.- Specified by:
getAnnotation
in interfaceAnnotationProvider
- Parameters:
annotationClass
- used to select the annotation to return- Returns:
- the annotation, or null if not found
-