本文整理汇总了Java中lotus.domino.View.getNextDocument方法的典型用法代码示例。如果您正苦于以下问题:Java View.getNextDocument方法的具体用法?Java View.getNextDocument怎么用?Java View.getNextDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lotus.domino.View
的用法示例。
在下文中一共展示了View.getNextDocument方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllNinjas
import lotus.domino.View; //导入方法依赖的package包/类
public List<Ninja> getAllNinjas(Session sesCurrent) {
List<Ninja> lstNinja = new ArrayList<Ninja>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwNinjas = ndbCurrent.getView("lupNinjasById");
Document docNext = viwNinjas.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwNinjas.getNextDocument(docNext);
Ninja ninNew = new Ninja();
if (DominoStorageService.getInstance().getObjectWithDocument(
ninNew, docProcess)) {
lstNinja.add(ninNew);
}
docProcess.recycle();
}
viwNinjas.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstNinja;
}
示例2: getAllCustomers
import lotus.domino.View; //导入方法依赖的package包/类
public List<Customer> getAllCustomers(Session sesCurrent) {
List<Customer> lstCustomer = new ArrayList<Customer>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwCustomer = ndbCurrent.getView("lupCustomersById");
Document docNext = viwCustomer.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwCustomer.getNextDocument(docNext);
Customer newCustomer = new Customer();
if (DominoStorageService.getInstance().getObjectWithDocument(newCustomer, docProcess)) {
lstCustomer.add(newCustomer);
}
docProcess.recycle();
}
viwCustomer.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstCustomer;
}
示例3: searchInViewFrom
import lotus.domino.View; //导入方法依赖的package包/类
/**
* Search for documents containing the search term in the view of the
* database db, using the fulltext search capability.
*
* @param search
* @param viewName
* @param db
* @return
*/
public List<T> searchInViewFrom(String search, String viewName, Database db) {
List<T> result = new ArrayList<T>();
try {
View view = db.getView(viewName);
int count = view.FTSearch(search);
if (count == 0) {
view.recycle();
return result;
}
result = new ArrayList<T>(count);
Document docNext = view.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = view.getNextDocument(docNext);
convertDocument2ObjectAndAdd2List(result, docProcess);
docProcess.recycle();
}
view.recycle();
} catch (NullPointerException ex) {
throw ex;
} catch (Exception e) {
throw new XPTRuntimeException("Error during search of " + search + " in view " + viewName, e);
}
return result;
}
示例4: getAllBugs
import lotus.domino.View; //导入方法依赖的package包/类
public List<Bug> getAllBugs(Session sesCurrent, String statusFilter) {
List<Bug> lstBug = new ArrayList<Bug>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwBug = ndbCurrent.getView("lupBugsById");
Document docNext = viwBug.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwBug.getNextDocument(docNext);
Bug newBug = new Bug();
if (DominoStorageService.getInstance().getObjectWithDocument(newBug, docProcess)) {
if (!newBug.getIsDeleted().equals("true") && (statusFilter == null || statusFilter.equals("") || statusFilter.equals(newBug.getStatus()))) {
lstBug.add(newBug);
}
}
docProcess.recycle();
}
viwBug.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstBug;
}
示例5: getAllTasks
import lotus.domino.View; //导入方法依赖的package包/类
public List<Task> getAllTasks(Session sesCurrent, String statusFilter) {
List<Task> lstTask = new ArrayList<Task>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwTask = ndbCurrent.getView("lupTasksById");
Document docNext = viwTask.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwTask.getNextDocument(docNext);
Task newTask = new Task();
if (DominoStorageService.getInstance().getObjectWithDocument(newTask, docProcess)) {
if (!newTask.getIsDeleted().equals("true") && (statusFilter == null || statusFilter.equals("") || statusFilter.equals(newTask.getStatus()))) {
lstTask.add(newTask);
}
}
docProcess.recycle();
}
viwTask.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstTask;
}
示例6: getAllIterations
import lotus.domino.View; //导入方法依赖的package包/类
public List<Iteration> getAllIterations(Session sesCurrent) {
List<Iteration> lstIteration = new ArrayList<Iteration>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwIteration = ndbCurrent.getView("lupIterationsById");
Document docNext = viwIteration.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwIteration.getNextDocument(docNext);
Iteration newIteration = new Iteration();
if (DominoStorageService.getInstance().getObjectWithDocument(
newIteration, docProcess)) {
lstIteration.add(newIteration);
}
docProcess.recycle();
}
viwIteration.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstIteration;
}
示例7: getAllNagiosSetting
import lotus.domino.View; //导入方法依赖的package包/类
public List<NagiosSetting> getAllNagiosSetting(Session sesCurrent) {
List<NagiosSetting> lstNagiosSetting = new ArrayList<NagiosSetting>();
try {
Database curDatabase = sesCurrent.getCurrentDatabase();
View curView = curDatabase.getView("lupNagiosSettings");
Document curDocument = curView.getFirstDocument();
while (curDocument != null) {
Document docNext = curDocument;
curDocument = curView.getNextDocument(curDocument);
NagiosSetting newSetting = new NagiosSetting();
if (DominoStorageService.getInstance().getObjectWithDocument(
newSetting, docNext)) {
lstNagiosSetting.add(newSetting);
}
docNext.recycle();
}
curView.recycle();
curDatabase.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstNagiosSetting;
}
示例8: loadConfig
import lotus.domino.View; //导入方法依赖的package包/类
private synchronized HashMap<String, TokenConfiguration> loadConfig() {
Database ndbNames = null;
View viwSSO = null;
HashMap<String, TokenConfiguration> configurations = new HashMap<String, TokenConfiguration>();
try {
ndbNames = ExtLibUtil.getCurrentSessionAsSigner().getDatabase(ExtLibUtil.getCurrentSession().getServerName(), "names.nsf");
if (ndbNames != null) {
viwSSO = ndbNames.getView("($WebSSOConfigs)");
Document docNext = viwSSO.getFirstDocument();
while (docNext != null) {
Document docConfig = docNext;
docNext = viwSSO.getNextDocument(docNext);
TokenConfiguration tokenConfig = buildConfig(docConfig);
if (tokenConfig != null) {
configurations.put(tokenConfig.getDomain().toLowerCase(), tokenConfig);
}
docConfig.recycle();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return configurations;
}
示例9: getAllFrom
import lotus.domino.View; //导入方法依赖的package包/类
/**
* Loads all objects form a view from the source database
*
* @param viewName
* @param sourceDatabase
* @return
*/
public List<T> getAllFrom(String viewName, Database sourceDatabase) {
List<T> ret = new ArrayList<T>();
try {
View viwDabases = sourceDatabase.getView(viewName);
viwDabases.setAutoUpdate(false);
Document docNext = viwDabases.getFirstDocument();
while (docNext != null) {
Document docCurrent = docNext;
docNext = viwDabases.getNextDocument(docNext);
convertDocument2ObjectAndAdd2List(ret, docCurrent);
docCurrent.recycle();
}
viwDabases.recycle();
} catch (NullPointerException ex) {
throw ex;
} catch (Exception e) {
LoggerFactory.logError(getClass(), GENERAL_ERROR, e);
throw new XPTRuntimeException(GENERAL_ERROR, e);
}
return ret;
}
示例10: run
import lotus.domino.View; //导入方法依赖的package包/类
@Override
@Stopwatch
public void run() {
if(TaskRunner.getInstance().isClosing()){
return;
}
if(server.getWebSocketAndObserverCount() == 0)return;
Session session = this.openSession();
try {
Database db = session.getDatabase(StringCache.EMPTY, Const.WEBSOCKET_PATH);
View view = db.getView(Const.VIEW_MSG_QUEUE);
if(view.getAllEntries().getCount() > 0){
view.setAutoUpdate(false);
Document doc = view.getFirstDocument();
Document temp = null;
while(doc!=null){
if(doc.isValid() && !doc.hasItem(StringCache.FIELD_CONFLICT)){
this.processDoc(doc);
}else if(doc.isValid() && doc.hasItem(StringCache.FIELD_CONFLICT)){
this.processConflict(doc);
}
temp = view.getNextDocument(doc);
doc.recycle();
doc = temp;
}
view.setAutoUpdate(true);
}
} catch (NotesException e) {
LOG.log(Level.SEVERE,null,e);
}finally{
this.closeSession(session);
}
}
示例11: setClustermateUsersOffline
import lotus.domino.View; //导入方法依赖的package包/类
/**
* Sets the clustermate users offline.
*
* @param db the db
* @param clustermate the clustermate
*/
@Stopwatch
private void setClustermateUsersOffline(Database db, String clustermate) {
try {
View view = db.getView(Const.VIEW_USERS);
view.setAutoUpdate(false);
Document doc = view.getFirstDocument();
Document temp = null;
while(doc!=null){
if(doc.isValid()){
String host = doc.getItemValueString(Const.FIELD_HOST);
//if hosts are the same
if(host!=null && host.equals(clustermate)){
doc.replaceItemValue(Const.FIELD_STATUS, Const.STATUS_OFFLINE);
doc.save();
}
}
temp = view.getNextDocument(doc);
doc.recycle();
doc = temp;
}
view.setAutoUpdate(true);
} catch (NotesException e) {
LOG.log(Level.SEVERE,null,e);
}
}
示例12: run
import lotus.domino.View; //导入方法依赖的package包/类
@Override
@Stopwatch
public void run() {
if(TaskRunner.getInstance().isClosing()){
return;
}
Session session = this.openSession();
try {
Database db = session.getDatabase(StringCache.EMPTY, Const.WEBSOCKET_PATH);
View view = db.getView(Const.VIEW_USERS);
Document doc = view.getFirstDocument();
Document temp = null;
while(doc!=null){
String host = doc.getItemValueString(Const.FIELD_HOST);
if(ServerInfo.getInstance().isCurrentServer(host)){
String currentStatus= doc.getItemValueString(Const.FIELD_STATUS);
//only update if we need to.
if(!this.getStatus().equals(currentStatus)){
doc.replaceItemValue(Const.FIELD_STATUS, this.getStatus());
doc.save();
}
}
temp = view.getNextDocument(doc);
doc.recycle();
doc = temp;
}
} catch (NotesException e) {
LOG.log(Level.SEVERE,null,e);
}finally{
SessionFactory.closeSession(session);
}
}
示例13: getAllProjects
import lotus.domino.View; //导入方法依赖的package包/类
public List<Project> getAllProjects(Session sesCurrent) {
List<Project> lstProject = new ArrayList<Project>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwProject = ndbCurrent.getView("lupProjectsById");
Document docNext = viwProject.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwProject.getNextDocument(docNext);
Project newProject = new Project();
if (DominoStorageService.getInstance().getObjectWithDocument(
newProject, docProcess)) {
if (newProject.getIsDeleted() == null) {
lstProject.add(newProject);
} else if (!newProject.getIsDeleted().equals("true")) {
lstProject.add(newProject);
}
}
docProcess.recycle();
}
viwProject.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstProject;
}
示例14: getMyProjects
import lotus.domino.View; //导入方法依赖的package包/类
public List<Project> getMyProjects(Session sesCurrent) {
List<Project> lstProject = new ArrayList<Project>();
try {
Database ndbCurrent = sesCurrent.getCurrentDatabase();
View viwProject = ndbCurrent.getView("lupProjectsById");
Document docNext = viwProject.getFirstDocument();
while (docNext != null) {
Document docProcess = docNext;
docNext = viwProject.getNextDocument(docNext);
Project newProject = new Project();
if (DominoStorageService.getInstance().getObjectWithDocument(
newProject, docProcess)) {
if (newProject.getInvolved().contains(
sesCurrent.getEffectiveUserName())
|| newProject.getInvolved().contains(
sesCurrent.createName(
sesCurrent.getEffectiveUserName())
.getAbbreviated())) {
if (newProject.getIsDeleted() == null) {
lstProject.add(newProject);
} else if (!newProject.getIsDeleted().equals("true")) {
lstProject.add(newProject);
}
}
}
docProcess.recycle();
}
viwProject.recycle();
ndbCurrent.recycle();
} catch (Exception e) {
e.printStackTrace();
}
return lstProject;
}
示例15: run
import lotus.domino.View; //导入方法依赖的package包/类
@Override
public void run() {
logger.log(Level.INFO,"running FeedbackMonitor");
Session session = SessionFactory.openSession();
try {
Database db = session.getDatabase("", PushConstants.PUSH_NSF);
View view = db.getView(PushConstants.VIEW_APP_CONFIG);
Document docCfg = view.getFirstDocument();
Document docTemp = null;
TokenError tokenError = new TokenError(session);
while(docCfg!=null){
AppConfig cfg = cfgFactory.provideAppConfig(docCfg);
logger.log(Level.INFO,"checking feedback for app " + cfg.getAppTitle());
List<Feedback> list = this.getFeedback(cfg);
for(Feedback feedback : list){
String error = APNErrors.getError(APNConstants.ERROR_DEVICE_UNREGISTERED);
tokenError.applyError(feedback.getToken(), error);
}
docTemp = view.getNextDocument(docCfg);
docCfg.recycle();
docCfg = docTemp;
}
} catch (NotesException e) {
logger.log(Level.SEVERE,null, e);
} finally{
SessionFactory.closeSession(session);
}
}