A repository item can use properties whose values are dates or timestamps, with the value set to the current date or time, using the java.util.Date
, java.sql.Date
, or java.sql.Timestamp
classes. You can have a property whose value will be set to the current time or date at the moment a repository item is created. You can do this by setting the feature descriptor attribute useNowForDefault
. For example:
<property name="creationDate" data-type="timestamp">
<attribute name="useNowForDefault" value="true"/>
</property>
For more information about this technique, see the Assigning FeatureDescriptorValues with the <attribute> Tag section in this chapter.