JAVA/CORBA クラス
例:LastFTIndexed プロパティ
1. 次のエージェントは、現在のデータベースに全文索引がある場合に索引の最終更新日を出力します。
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();
String title = db.getTitle();
if (db.isFTIndexed()) {
DateTime dt = db.getLastFTIndexed();
System.out.println("Database \"" + title +
"\" last full-text indexed on " +
dt.getDateOnly()); }
else
System.out.println("Database \"" + title +
"\" is not full-text indexed");
} catch(Exception e) {
e.printStackTrace();
}
}
}
2. 次のエージェントは上記のエージェントとほぼ同じですが、getLastFTIndexed の戻り値を調べて索引の有無を確認し、ローカルとリモートの両方での実装を可能にします。
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();
String title = db.getTitle();
DateTime dt = db.getLastFTIndexed();
if (dt != null && dt.getLocalTime().length() > 0)
System.out.println("Database \"" + title +
"\" last full-text indexed on " +
dt.getDateOnly()); }
else
System.out.println("Database \"" + title +
"\" is not full-text indexed");
} catch(Exception e) {
e.printStackTrace();
}
}
}
関連項目
LastFTIndexed プロパティ
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集