Package pt.opensoft.dbaccess

Examples of pt.opensoft.dbaccess.Record


* User: Ricardo Caetano
*/
public abstract class OracleSequence {
 
    public long nextValue(DBConnect dbc) throws SQLException {
      Record view = new View().getRecord(dbc, "SELECT " + getName() + ".NEXTVAL FROM DUAL");
      return view.getLongValue("NEXTVAL");
    }
View Full Code Here


      Record view = new View().getRecord(dbc, "SELECT " + getName() + ".NEXTVAL FROM DUAL");
      return view.getLongValue("NEXTVAL");
    }

    public long currValue(DBConnect dbc) throws SQLException {
      Record view = new View().getRecord(dbc, "SELECT " + getName() + ".CURRVAL FROM DUAL");
      return view.getLongValue("CURRVAL");
   
View Full Code Here

  /**
   * Carrega todos os campos deste DMO a partir da respectiva tabela da BD.
   * Assume que os campos que s�o chave j� foram introduzidos atrav�s do respectivos setters.
   */
  protected boolean loadFromDB(DBConnect dbc) throws SQLException {
    Record r = _table.getRecord(dbc, record);
    boolean empty = r.isEmpty();
    if (!empty) record = r;
    return !empty;
  }
View Full Code Here

  }

  public boolean equals(Object obj) {
    if (obj == null) return false;
    if (!(obj instanceof DMObject)) return false;
    Record other = ((DMObject) obj).record;
    if (record == null && other != null) return false;
    if (record != null && other == null) return false;
    return record.equals(other);
  }
View Full Code Here

   */
  public void makeHeaderFromRecord (List records) {
    int pos = 0;

    if (!records.isEmpty()) {
      Record record = (Record) records.get(0);
      List fieldNames = record.getFieldNames();
      for (int i = 0; i < fieldNames.size(); i++) {
        String nameField = (String) fieldNames.get(i);
        setCellValue(pos, i, nameField, colorNivel_1, fillForegroundColor, true, (short)10, COURIER_NEW_FONT, false, horizontalCenterAlign, verticalCenterAlign, wrappedText, true);
      }

View Full Code Here

    Map nameColumnCellID = new HashMap();

    if (records == null || records.isEmpty()) return pos;

    for (Iterator iterator = records.iterator(); iterator.hasNext();) {
      Record record = (Record) iterator.next();
      List fieldNames = record.getOrderedFieldNames();

      if (MapUtil.isEmpty(nameColumnCellID)) {
        fillNameColumnCell(fieldNames, nameColumnCellID);
      }
View Full Code Here

TOP

Related Classes of pt.opensoft.dbaccess.Record

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.