|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.SimpleDate
public class SimpleDate
A simple implementation of the TemplateDateModel interface. Note that this class is immutable.
This class is thread-safe.
Field Summary |
---|
Fields inherited from interface freemarker.template.TemplateDateModel |
---|
DATE, DATETIME, TIME, TYPE_NAMES, UNKNOWN |
Fields inherited from interface freemarker.template.TemplateModel |
---|
NOTHING |
Constructor Summary | |
---|---|
SimpleDate(java.sql.Date date)
Creates a new date model wrapping the specified date object and having DATE type. |
|
SimpleDate(java.util.Date date,
int type)
Creates a new date model wrapping the specified date object and having the specified type. |
|
SimpleDate(java.sql.Time time)
Creates a new date model wrapping the specified time object and having TIME type. |
|
SimpleDate(java.sql.Timestamp datetime)
Creates a new date model wrapping the specified time object and having DATETIME type. |
Method Summary | |
---|---|
java.util.Date |
getAsDate()
Returns the date value. |
int |
getDateType()
Returns the type of the date. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleDate(java.sql.Date date)
public SimpleDate(java.sql.Time time)
public SimpleDate(java.sql.Timestamp datetime)
public SimpleDate(java.util.Date date, int type)
Method Detail |
---|
public java.util.Date getAsDate()
TemplateDateModel
getAsDate
in interface TemplateDateModel
Date
instance associated with this date model.public int getDateType()
TemplateDateModel
getDateType
in interface TemplateDateModel
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |