Class Helper
java.lang.Object
org.codehaus.modello.plugin.velocity.Helper
Helper class to use inside velocity templates.
This will be made available using ${Helper} inside the template.
For example, the following line will return the list of ancestors for a given modello class:
#set ( $ancestors = $Helper.ancestors( $class ) )
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionancestors(ModelClass clazz) Returns the list of ancestors for the givenModelClass.capitalise(String str) Returns the capitalised version of the given string.booleanisFlatItems(ModelField field) Checks if the givenModelFieldis a flat item.Returns the singular name for the given string.uncapitalise(String str) Returns the uncapitalised version of the given string.xmAssociationMetadata(ModelField field) Returns theXmlAssociationMetadatafor the givenModelField.xmlClassMetadata(ModelClass clazz) Returns theXmlClassMetadatafor the givenModelClass.xmlFieldMetadata(ModelField field) Returns theXmlFieldMetadatafor the givenModelField.xmlFields(ModelClass modelClass) Returns a list of allModelFieldfor a givenModelClass.
-
Field Details
-
version
-
-
Constructor Details
-
Helper
-
-
Method Details
-
capitalise
Returns the capitalised version of the given string. -
uncapitalise
Returns the uncapitalised version of the given string. -
singular
Returns the singular name for the given string. -
ancestors
Returns the list of ancestors for the givenModelClass. -
xmlClassMetadata
Returns theXmlClassMetadatafor the givenModelClass. -
xmlFieldMetadata
Returns theXmlFieldMetadatafor the givenModelField. -
xmAssociationMetadata
Returns theXmlAssociationMetadatafor the givenModelField. -
isFlatItems
Checks if the givenModelFieldis a flat item. -
xmlFields
Returns a list of allModelFieldfor a givenModelClass. The list will contain all fields defined on the class and on its parents, excluding any field flagged as being xml transient.
-