Package lotus.domino

Examples of lotus.domino.Database


    }
  }

  public void getCreatedOld() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy hh:mm");
      String formatted = format.format(doc.getCreated().toJavaDate());
      ExtLibUtil.getViewScope().put("oldJavaTest", formatted);
    } catch (NotesException e) {
View Full Code Here


    }
  }

  public void getOtherDates() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      StringBuilder sb = new StringBuilder();
      SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy hh:mm");
      sb.append("Created: " + format.format(doc.getCreated().toJavaDate()));
      sb.append("....");
View Full Code Here

    }
  }

  public void getFormName() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      if (doc.hasItem("Form")) {
        ExtLibUtil.getViewScope().put("oldJavaTest", doc.getItemValueString("Form"));
      }
    } catch (NotesException e) {
View Full Code Here

    }
  }

  public void getForm() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      if (doc.hasItem("Form")) {
        String formName = doc.getItemValueString("Form");
        Form fm = currDb.getForm(formName);
        NoteCollection notes = currDb.createNoteCollection(false);
        notes.add(fm);
        ExtLibUtil.getViewScope().put("oldJavaTest", notes.getFirstNoteID());
      }
    } catch (NotesException e) {
      //handle Exception
View Full Code Here

    }
  }

  public void replaceItemValueSummary() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      StringBuilder sb = new StringBuilder();
      sb.append("Here is a value");
      Item itm = doc.replaceItemValue("oldSummaryField", sb.toString());
      ExtLibUtil.getViewScope().put("oldJavaTest",
View Full Code Here

    }
  }

  public void createNathan() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      Document contact = currDb.createDocument();
      contact.replaceItemValue("Form", "Contact");
      contact.replaceItemValue("FirstName", "Nathan");
      contact.replaceItemValue("LastName", "Freeman");
      contact.replaceItemValue("Email", "godOfAwesome@worldOfAweso.me");
      contact.replaceItemValue("City", "Washington");
View Full Code Here

    }
  }

  public void createPaul() {
    try {
      Database currDb = ExtLibUtil.getCurrentDatabase();
      Document contact = currDb.createDocument();
      contact.replaceItemValue("Form", "Contact");
      contact.replaceItemValue("FirstName", "Paul");
      contact.replaceItemValue("LastName", "Withers");
      contact.replaceItemValue("Email", "lordOfPrettyGood@worldOfAweso.me");
      contact.replaceItemValue("City", "Washington");
View Full Code Here

      //handle Exception
    }
  }

  public void breakNames() {
    Database currDb = ExtLibUtil.getCurrentDatabase();
    try {
      View contacts = currDb.getView("AllContacts");
      Document doc = contacts.getFirstDocument();
      Item testItem = doc.replaceItemValue("oldMuppetField", 1);
      testItem.setNames(true);
      doc.save(true, false);
      ExtLibUtil.getViewScope().put("javaTest", testItem.getType());
View Full Code Here

    _spotlightNewsEntries = new ArrayList<NewsEntry>();
    _topTopStories = new ArrayList<NewsEntry>();
    _typedNewsEntries = new HashMap<String, List<NewsEntry>>();
    _categorizedTopNewsEntries = new HashMap<String, List<NewsEntry>>();

    Database db = ExtLibUtil.getCurrentDatabase();
    View view = null;
    ViewNavigator navigator = null;
    FacesContext context = FacesContext.getCurrentInstance();
    ConfigCache config = (ConfigCache) context.getApplication()
    .getVariableResolver().resolveVariable(context, "configCache");

    try {
      view = db.getView("NewsModeratedCached");
      view.setAutoUpdate(false);
      navigator = view.createViewNav();
      ViewEntry tmpEntry;
      ViewEntry entry = navigator.getFirst();
      while (entry != null) {
View Full Code Here

        sNLink = sNLink1.substring(0, hashIndex);
      } else {
        sNLink = sNLink1;
      }

      Database db = ExtLibUtil.getCurrentDatabase();
      newsByLink = db.getView("NewsAllbyLink");
      newsByLink.setAutoUpdate(false);
      docs = newsByLink.getAllDocumentsByKey(sNLink, true);

      Document doc = docs.getFirstDocument();
      while(doc != null) {
View Full Code Here

TOP

Related Classes of lotus.domino.Database

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.