本文整理汇总了Java中lotus.domino.Base类的典型用法代码示例。如果您正苦于以下问题:Java Base类的具体用法?Java Base怎么用?Java Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Base类属于lotus.domino包,在下文中一共展示了Base类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: recycle
import lotus.domino.Base; //导入依赖的package包/类
@Override
public void recycle(Vector paramVector) throws NotesException {
if (paramVector!=null) {
for (int i=0; i<paramVector.size(); i++) {
Object obj = paramVector.get(i);
if (obj instanceof Base) {
try {
((Base)obj).recycle();
}
catch (NotesException e) {
//
}
}
}
}
}
示例2: search
import lotus.domino.Base; //导入依赖的package包/类
@Override
public DocumentIterator<lotus.domino.Base, lotus.domino.Document> search(String query, int max) {
lotus.domino.View __temp = null;
try {
__temp = __native.getParent().getView(__native.getName());
__temp.FTSearch(query, max);
} catch (NotesException e) {
throw new RiverException(e);
}
@SuppressWarnings("unchecked")
DocumentIterator<lotus.domino.Base, lotus.domino.Document> _iterator = (DocumentIterator<Base, lotus.domino.Document>) _factory.getDocumentIterator(__temp);
return _iterator;
}
示例3: getDocument
import lotus.domino.Base; //导入依赖的package包/类
/**
* Returns a document based on a NotesURL given
*
* @param notesURL
* @return the NotesDocument
*/
public static Document getDocument(String notesURL) {
Base notesObj = DominoProxy.resolve(notesURL);
if (notesObj == null) {
return null;
}
if (notesObj instanceof Document) {
return (Document) notesObj;
}
LOGGER.error("Notes document resolve failed for :" + notesURL);
// It is something else
return null;
}
示例4: recycleDominoObjects
import lotus.domino.Base; //导入依赖的package包/类
/**
* recycleDominoObjects helper method for recycling Domino objects
*
* @param nObjects
* the Domino objects to recycle
*/
public static void recycleDominoObjects(Base... nObjects) {
for (Base nObject : nObjects) {
if (nObject != null) {
try {
(nObject).recycle();
} catch (Exception e) {}
}
}
}
示例5: getAllDocuments
import lotus.domino.Base; //导入依赖的package包/类
@Override
public DocumentIterator<lotus.domino.Base, lotus.domino.Document> getAllDocuments() {
lotus.domino.ViewEntryCollection __vecol;
try {
__vecol = __native.getAllEntries();
} catch (NotesException e) {
throw new RiverException(e);
}
@SuppressWarnings("unchecked")
DocumentIterator<lotus.domino.Base, lotus.domino.Document> result = (DocumentIterator<Base, lotus.domino.Document>) _factory.getDocumentIterator(__vecol);
return result;
}
示例6: getAllDocumentsByKey
import lotus.domino.Base; //导入依赖的package包/类
@Override
public DocumentIterator<lotus.domino.Base, lotus.domino.Document> getAllDocumentsByKey(Object key) {
lotus.domino.DocumentCollection _col;
try {
_col = __native.getAllDocumentsByKey(key, true);
} catch (NotesException e) {
throw new RiverException(e);
}
@SuppressWarnings("unchecked")
DocumentIterator<lotus.domino.Base, lotus.domino.Document> result = (DocumentIterator<Base, lotus.domino.Document>) _factory.getDocumentIterator(_col);
return result;
}
示例7: getAllDocuments
import lotus.domino.Base; //导入依赖的package包/类
@Override
public DocumentIterator<lotus.domino.Base, lotus.domino.Document> getAllDocuments() {
lotus.domino.DocumentCollection _col;
try {
_col = __native.getAllDocuments();
} catch (NotesException e) {
throw new RiverException(e);
}
@SuppressWarnings("unchecked")
DocumentIterator<lotus.domino.Base, lotus.domino.Document> _iterator =
(DocumentIterator<Base, lotus.domino.Document>) _factory.getDocumentIterator(_col);
return _iterator;
}
示例8: search
import lotus.domino.Base; //导入依赖的package包/类
@Override
public DocumentIterator<lotus.domino.Base, lotus.domino.Document> search(String query, int max) {
lotus.domino.DocumentCollection _col;
try {
_col = __native.search(query, null, max);
} catch (NotesException e) {
throw new RiverException(e);
}
@SuppressWarnings("unchecked")
DocumentIterator<lotus.domino.Base, lotus.domino.Document> _iterator =
(DocumentIterator<Base, lotus.domino.Document>) _factory.getDocumentIterator(_col);
return _iterator;
}
示例9: main
import lotus.domino.Base; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void main(String[] args) {
NotesThread.sinitThread();
Session<lotus.domino.Base> session = (Session<lotus.domino.Base>) River.getSession(River.LOTUS_DOMINO,
(String) null, (String) null, Credentials.getPassword()).getWrapperObject();
Database<lotus.domino.Base> database = (Database<Base>) session.getDatabase("", "massive.nsf");
DocumentIterator<lotus.domino.Base, lotus.domino.Document> it = (DocumentIterator<Base, lotus.domino.Document>) database.getAllDocuments();
int i = 0;
while(it.hasNext()) {
Document<lotus.domino.Document> doc = it.next();
String counter = doc.getFieldAsString("counter");
if (++i % 250 == 0) {
System.out.println("=" + counter);
}
if (i > 5000) break;
}
System.out.println("Done");
River.closeSession(River.LOTUS_DOMINO);
NotesThread.stermThread();
}
示例10: safeRecycle
import lotus.domino.Base; //导入依赖的package包/类
/**
* Safely recycle a backend object.
*
* @param obj
*/
public static void safeRecycle(Base obj) {
if ( obj != null ) {
try {
obj.recycle();
}
catch (NotesException e) {
// Ignore exceptions inside recycle
}
}
}
示例11: incinerate
import lotus.domino.Base; //导入依赖的package包/类
public static void incinerate(Object... dominoObjects) {
for (Object dominoObject : dominoObjects) {
if (null != dominoObject) {
if (dominoObject instanceof Base) {
try {
((Base) dominoObject).recycle();
} catch (NotesException recycleSucks) {
System.out.println("Can't recycle object");
}
}
}
}
}
示例12: getDocument
import lotus.domino.Base; //导入依赖的package包/类
public Document getDocument() {
String intAddress = this.getInternalAddress();
Base notesObj = DominoProxy.resolve(intAddress);
if (notesObj == null) {
return null;
}
if (notesObj instanceof Document) {
return (Document) notesObj;
}
return null;
}
示例13: getDocument
import lotus.domino.Base; //导入依赖的package包/类
/**
* We return the NotesURL including ?OpenDocument
*
* @param internalAddress
* @return
*/
public Document getDocument() {
String intAddress = this.getInternalAddress();
Base notesObj = DominoProxy.resolve(intAddress);
if (notesObj == null) {
return null;
}
if (notesObj instanceof Document) {
return (Document) notesObj;
}
return null;
}
示例14: resolve
import lotus.domino.Base; //导入依赖的package包/类
/**
* Returns a Notes Java object. Can be a database, view or document
*
* @param notesURL
* @return
*/
public static Base resolve(String notesURL) {
Session s = DominoProxy.getUserSession();
Base result = null;
try {
result = s.resolve(notesURL);
LOGGER.debug("Notes URL resolves (general) for :" + notesURL
+ " into " + result.getClass().getName());
} catch (NotesException e) {
LOGGER.error(e);
LOGGER.error("Notes resolve (general) failed with "
+ e.getMessage() + " for :" + notesURL);
int lastNSF = notesURL.lastIndexOf(".nsf");
if (lastNSF > 0) {
String restPath = notesURL.substring(lastNSF + 4);
String[] tok = restPath.split("/");
// LOGGER.info("URL input="+restPath);
if (tok.length > 0) {
for (int i = 0; i < tok.length; i++) {
// LOGGER.info("Token ["+new Integer(i).toString()+
// "]="+tok[i]);
}
}
}
result = null;
}
return result;
}
示例15: getDatabase
import lotus.domino.Base; //导入依赖的package包/类
/**
* Returns a database based on a NotesURL given
*
* @param notesURL
* @return the NotesDatabase
*/
public static Database getDatabase(String notesURL) {
Base notesObj = DominoProxy.resolve(notesURL);
if (notesObj == null) {
return null;
}
// TODO: do we need to check the parameters?
if (notesObj instanceof Database) {
return (Database) notesObj;
}
LOGGER.error("Notes database resolve failed for :" + notesURL);
// It is something else
return null;
}