/** * Creates a new model that wraps the specified date object. * @param date the date object to wrap into a model. * @param wrapper the {@link BeansWrapper} associated with this model. * Every model has to have an associated {@link BeansWrapper} instance. The * model gains many attributes from its wrapper, including the caching * behavior, method exposure level, method-over-item shadowing policy etc. */ public DateModel(Date date, BeansWrapper wrapper) { super(date, wrapper); if (date instanceof java.sql.Date) { type = DATE; } else if (date instanceof java.sql.Time) { type = TIME; } else if (date instanceof java.sql.Timestamp) { type = DATETIME; } else { type = wrapper.getDefaultDateType(); } }
/** * Creates a new model that wraps the specified date object. * @param date the date object to wrap into a model. * @param wrapper the {@link BeansWrapper} associated with this model. * Every model has to have an associated {@link BeansWrapper} instance. The * model gains many attributes from its wrapper, including the caching * behavior, method exposure level, method-over-item shadowing policy etc. */ public DateModel(Date date, BeansWrapper wrapper) { super(date, wrapper); if (date instanceof java.sql.Date) { type = DATE; } else if (date instanceof java.sql.Time) { type = TIME; } else if (date instanceof java.sql.Timestamp) { type = DATETIME; } else { type = wrapper.getDefaultDateType(); } }
/** * Creates a new model that wraps the specified date object. * @param date the date object to wrap into a model. * @param wrapper the {@link BeansWrapper} associated with this model. * Every model has to have an associated {@link BeansWrapper} instance. The * model gains many attributes from its wrapper, including the caching * behavior, method exposure level, method-over-item shadowing policy etc. */ public DateModel(Date date, BeansWrapper wrapper) { super(date, wrapper); if (date instanceof java.sql.Date) { type = DATE; } else if (date instanceof java.sql.Time) { type = TIME; } else if (date instanceof java.sql.Timestamp) { type = DATETIME; } else { type = wrapper.getDefaultDateType(); } }
/** * Creates a new model that wraps the specified date object. * @param date the date object to wrap into a model. * @param wrapper the {@link BeansWrapper} associated with this model. * Every model has to have an associated {@link BeansWrapper} instance. The * model gains many attributes from its wrapper, including the caching * behavior, method exposure level, method-over-item shadowing policy etc. */ public DateModel(Date date, BeansWrapper wrapper) { super(date, wrapper); if(date instanceof java.sql.Date) { type = DATE; } else if(date instanceof java.sql.Time) { type = TIME; } else if(date instanceof java.sql.Timestamp) { type = DATETIME; } else { type = wrapper.getDefaultDateType(); } }