On Friday 30 July 2004 03:58 pm, Ignacio Renuncio wrote:
> Hi again,
> 
> We've got another problem related to the display of the N most recent
> objects of a given type.
> 
> The code connects to a remote cloud and is able to display all of the nodes,
> but when we try to use the class Daymarkers to find out the age of each one,
> we saw that org.mmbase.module.core.MMObjectBuilder is not available in
> mmbase-rmmci.jar
> 
> How can we add this functionality of displaying the N most recently changed
> items to our remote application?
> Should I simply add mmbase.jar? Is that right? Should that support come
> included into mmbase-rmmci.jar?

Hi,  daymarks won't help you list the most recently changed nodes
mmbase-1.7 does not keep track of changes if you want that you might want to add a 
mtime and ctime to you objects
and make them use a builder that does the following :

    public boolean commit(MMObjectNode objectNode){
        objectNode.setValue("mtime",(int)(System.currentTimeMillis() / 1000));
        return  super.commit(objectNode);
    }

    public int insert(String owner, MMObjectNode objectNode) {
        objectNode.setValue("ctime",(int)(System.currentTimeMillis() / 1000));
        objectNode.setValue("mtime",(int)(System.currentTimeMillis() / 1000));
        return super.insert(owner,objectNode);
    }

How do you use the daymarks for the moment?





Reply via email to