Examples: LimitRevisions property (Database - Java)

This agent cycles the revision limit from 0 to 1000 in increments of 100.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      double lr = db.getLimitRevisions();
      if (lr >= 1000)
        db.setLimitRevisions(0);
      else
        db.setLimitRevisions(lr + 100);
      System.out.println("Limit for $Revisions is " +
        db.getLimitRevisions());

    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}