Package freemarker.ext.beans
Class DateModel
java.lang.Object
freemarker.ext.beans.BeanModel
freemarker.ext.beans.DateModel
- All Implemented Interfaces:
- WrapperTemplateModel,- AdapterTemplateModel,- TemplateDateModel,- TemplateHashModel,- TemplateHashModelEx,- TemplateModel,- TemplateModelWithAPISupport
Wraps arbitrary subclass of 
Date into a reflective model.
 Beside acting as a TemplateDateModel, you can call all Java methods
 on these objects as well.- 
Field SummaryFields inherited from interface freemarker.template.TemplateDateModelDATE, DATETIME, TIME, TYPE_NAMES, UNKNOWNFields inherited from interface freemarker.template.TemplateModelNOTHING
- 
Constructor SummaryConstructorsConstructorDescriptionDateModel(Date date, BeansWrapper wrapper)Creates a new model that wraps the specified date object.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the date value.intReturns the type of the date.Methods inherited from class freemarker.ext.beans.BeanModelget, get, getAdaptedObject, getAPI, getBeforeMethodCall, getWrappedObject, hasPlainGetMethod, invokeGenericGet, isEmpty, keys, keySet, size, toString, unwrap, values, wrap
- 
Constructor Details- 
DateModelCreates a new model that wraps the specified date object.- Parameters:
- date- the date object to wrap into a model.
- wrapper- the- BeansWrapperassociated with this model. Every model has to have an associated- BeansWrapperinstance. The model gains many attributes from its wrapper, including the caching behavior, method exposure level, method-over-item shadowing policy etc.
 
 
- 
- 
Method Details- 
getAsDateDescription copied from interface:TemplateDateModelReturns the date value. The return value must not benull.- Specified by:
- getAsDatein interface- TemplateDateModel
 
- 
getDateTypepublic int getDateType()Description copied from interface:TemplateDateModelReturns the type of the date. It can be any ofTemplateDateModel.TIME,TemplateDateModel.DATE, orTemplateDateModel.DATETIME.- Specified by:
- getDateTypein interface- TemplateDateModel
 
 
-