本文整理了Java中org.jbundle.base.db.Record.open
方法的一些代码示例,展示了Record.open
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Record.open
方法的具体详情如下:
包路径:org.jbundle.base.db.Record
类名称:Record
方法名:open
[英]Open this table (requery the table).
NOTE: This is a table method, it is included here in Record for convenience!!!
[中]打开此表格(重新查询表格)。
注:这是一种表格方法,为了方便起见,将其包含在记录中!!!
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Special logic to open a QueryRecord using the tables.
* @exception DBException File exception.
*/
public void openTableQuery() throws DBException
{
Record record = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
TableLink tableLink = e.nextElement();
record = tableLink.getLeftRecord();
if (bFirstTime)
{
if (!record.isOpen())
record.open();
}
record = tableLink.getRightRecord();
if (!record.isOpen())
record.open();
bFirstTime = false;
}
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Special logic to open a QueryRecord using the tables.
* @exception DBException File exception.
*/
public void openTableQuery() throws DBException
{
Record record = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
TableLink tableLink = e.nextElement();
record = tableLink.getLeftRecord();
if (bFirstTime)
{
if (!record.isOpen())
record.open();
}
record = tableLink.getRightRecord();
if (!record.isOpen())
record.open();
bFirstTime = false;
}
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Special logic to open a QueryRecord using the tables.
* @exception DBException File exception.
*/
public void openTableQuery() throws DBException
{
Record record = null;
boolean bFirstTime = true;
for (Enumeration<TableLink> e = m_LinkageList.elements() ; e.hasMoreElements() ;)
{
TableLink tableLink = e.nextElement();
record = tableLink.getLeftRecord();
if (bFirstTime)
{
if (!record.isOpen())
record.open();
}
record = tableLink.getRightRecord();
if (!record.isOpen())
record.open();
bFirstTime = false;
}
}
/**
代码示例来源:origin: org.jbundle.main/org.jbundle.main.db
/**
* Set the object that owns this listener.
* @owner The object that this listener is being added to (if null, this listener is being removed).
*/
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
try { // Open this table and move to the control record
if (!this.getOwner().isOpen())
this.getOwner().open(); // Open the control file
if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
this.doNewRecord(true); // Read the control file
} catch (DBException e) {
return;
}
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Set the object that owns this listener.
* @owner The object that this listener is being added to (if null, this listener is being removed).
*/
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
try { // Open this table and move to the control record
if (!this.getOwner().isOpen())
this.getOwner().open(); // Open the control file
if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
this.doNewRecord(true); // Read the control file
} catch (DBException e) {
return;
}
}
/**
代码示例来源:origin: com.tourgeek.tour/com.tourgeek.tour.product.screen
this.markTempListeners(listenerLast);
this.getMainRecord().close();
this.getMainRecord().open(); // This forces a requery on the file (clears the autorecord cache)
if (Boolean.TRUE.equals(properties.get(MODIFIED_PARAM)))
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.product.screen
this.markTempListeners(listenerLast);
this.getMainRecord().close();
this.getMainRecord().open(); // This forces a requery on the file (clears the autorecord cache)
if (Boolean.TRUE.equals(properties.get(MODIFIED_PARAM)))
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.request.misc
/**
* Add the behaviors.
*/
public void addListeners()
{
super.addListeners();
Record recRequest = this.getRecord(Request.REQUEST_FILE);
Record recRequestDetail = this.getRecord(RequestDetail.REQUEST_DETAIL_FILE);
Record recRequestControl = this.getRecord(RequestControl.REQUEST_CONTROL_FILE);
try {
recRequestControl.open();
} catch (DBException ex) {
ex.printStackTrace();
}
recRequest.getField(Request.SEND_VIA_CODE).addListener(new InitFieldHandler(recRequestControl.getField(RequestControl.SEND_VIA_CODE)));
recRequestDetail.addListener(new SubFileFilter(recRequest));
}
/**
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model
/**
* Get the next record.
* This is the special method for a report. It handles breaks by disabling all listeners
* except filter listeners, then reenabling and calling the listeners after the footing
* has been printed, so totals, etc will be in the next break.
* @param out The out stream.
* @param iPrintOptions Print options.
* @param bFirstTime Reading the first record?
* @param bHeadingFootingExists Does a break exist (skips all the fancy code if not).
* @return The next record (or null if EOF).
*/
public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists)
throws DBException
{
Object[] rgobjEnabled = null;
boolean bAfterRequery = !this.getMainRecord().isOpen();
if (!this.getMainRecord().isOpen())
this.getMainRecord().open(); // Make sure any listeners are called before disabling.
if (bHeadingFootingExists)
rgobjEnabled = this.getMainRecord().setEnableNonFilter(null, false, false, false, false, true);
Record record = this.getNextGridRecord(bFirstTime);
if (bHeadingFootingExists)
{
boolean bBreak = this.printHeadingFootingData(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN | HtmlConstants.DETAIL_SCREEN);
this.getMainRecord().setEnableNonFilter(rgobjEnabled, (record != null), bBreak, bFirstTime | bAfterRequery, (record == null), true);
}
return record;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Get the next record.
* This is the special method for a report. It handles breaks by disabling all listeners
* except filter listeners, then reenabling and calling the listeners after the footing
* has been printed, so totals, etc will be in the next break.
* @param out The out stream.
* @param iPrintOptions Print options.
* @param bFirstTime Reading the first record?
* @param bHeadingFootingExists Does a break exist (skips all the fancy code if not).
* @return The next record (or null if EOF).
*/
public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists)
throws DBException
{
Object[] rgobjEnabled = null;
boolean bAfterRequery = !this.getMainRecord().isOpen();
if (!this.getMainRecord().isOpen())
this.getMainRecord().open(); // Make sure any listeners are called before disabling.
if (bHeadingFootingExists)
rgobjEnabled = this.getMainRecord().setEnableNonFilter(null, false, false, false, false, true);
Record record = this.getNextGridRecord(bFirstTime);
if (bHeadingFootingExists)
{
boolean bBreak = this.printHeadingFootingData(out, iPrintOptions | HtmlConstants.FOOTING_SCREEN | HtmlConstants.DETAIL_SCREEN);
this.getMainRecord().setEnableNonFilter(rgobjEnabled, (record != null), bBreak, bFirstTime | bAfterRequery, (record == null), true);
}
return record;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* Set the field or file that owns this listener.
* This method calls doNewRecord when the owner is set.
* @see doNewRecord.
* @param owner My owner.
*/
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
boolean bEnabledFlag = this.setEnabledListener(true); // Disabled automatically on setOwner.
try { // Open this table and move to the control record
if (!this.getOwner().isOpen())
if (this.isEnabled()) // Not on a slave
this.getOwner().open(); // Open the control file
if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
if (this.isEnabled()) // Not on a slave
this.doNewRecord(true); // Read the control file
} catch (DBException ex) {
ex.printStackTrace();
} finally {
this.setEnabledListener(bEnabledFlag); // Set back
}
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Set the field or file that owns this listener.
* This method calls doNewRecord when the owner is set.
* @see doNewRecord.
* @param owner My owner.
*/
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
boolean bEnabledFlag = this.setEnabledListener(true); // Disabled automatically on setOwner.
try { // Open this table and move to the control record
if (!this.getOwner().isOpen())
if (this.isEnabled()) // Not on a slave
this.getOwner().open(); // Open the control file
if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
if (this.isEnabled()) // Not on a slave
this.doNewRecord(true); // Read the control file
} catch (DBException ex) {
ex.printStackTrace();
} finally {
this.setEnabledListener(bEnabledFlag); // Set back
}
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
/**
* Set the field or file that owns this listener.
* This method calls doNewRecord when the owner is set.
* @see doNewRecord.
* @param owner My owner.
*/
public void setOwner(ListenerOwner owner)
{
super.setOwner(owner);
if (owner == null)
return;
boolean bEnabledFlag = this.setEnabledListener(true); // Disabled automatically on setOwner.
try { // Open this table and move to the control record
if (!this.getOwner().isOpen())
if (this.isEnabled()) // Not on a slave
this.getOwner().open(); // Open the control file
if (this.getOwner().getEditMode() == Constants.EDIT_NONE)
if (this.isEnabled()) // Not on a slave
this.doNewRecord(true); // Read the control file
} catch (DBException ex) {
ex.printStackTrace();
} finally {
this.setEnabledListener(bEnabledFlag); // Set back
}
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
this.getMainRecord().open();
代码示例来源:origin: com.tourapp.tour/com.tourapp.tour.request.misc
recRequestControl.open();
} catch (DBException ex) {
内容来源于网络,如有侵权,请联系作者删除!