Package org.tmatesoft.sqljet.core.table

Examples of org.tmatesoft.sqljet.core.table.ISqlJetTable.lookup()


        finally
        {
          close(cursor);
        }
        table = db.getTable(INVOKER_TABLE);
        cursor = table.lookup(INVOKER_TABLE_INDEX, transactionId, phase);
        try
        {
          if (!cursor.eof())
          {
            do
View Full Code Here


    {
      @Override
      public void execute(SqlJetDb db) throws SqlJetException
      {
        ISqlJetTable table = db.getTable(INVOKER_TABLE);
        ISqlJetCursor cursor = table.lookup(table.getPrimaryKeyIndexName(), transactionId, phase, databaseId);
        try
        {
          if (!cursor.eof())
          {
            cursor.updateByFieldNames(Collections.<String, Object>singletonMap(RESULT_COLUMN, result));
View Full Code Here

    throws SqlJetException
    {

        BasicFrontPage fp = new BasicFrontPage();
        ISqlJetTable table = db.getTable("front_pages");
        ISqlJetCursor cursor = table.lookup(null, frontPageName);       
       
       
        try
        {
            fp.setUserTitle( cursor.getString("key") );
View Full Code Here

    private boolean isAnswered(int number) throws SqlJetException {
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            ISqlJetTable table = db.getTable("answers");
            ISqlJetCursor cursor = table.lookup("login_question", login.getLogin(), number);
            return !cursor.eof();
        } finally {
            db.commit();
        }
    }
View Full Code Here

    }

    private String printShortSummary() throws SqlJetException {
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        ISqlJetTable table = db.getTable("answers");
        final ISqlJetCursor cursor = table.lookup("login", login.getLogin());
        int answered = (int) cursor.getRowCount();
        int right = 0;
        if (!cursor.eof()) {
            do {
                if (Integer.parseInt(cursor.getString("answer")) == 1) ++right;
View Full Code Here

    private boolean tryLogin(String login, String password) throws SqlJetException {
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        try {
            ISqlJetTable table = db.getTable("users");
            ISqlJetCursor cursor = table.lookup("login_password", login, password);
            return !cursor.eof();
        } finally {
            db.commit();
        }
    }
View Full Code Here

    private void printResults() throws SqlJetException {
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        try {
            ISqlJetTable table = db.getTable("answers");
            final ISqlJetCursor cursor = table.lookup("login", login.getLogin());
            TableModel dataModel = new AbstractTableModel() {
                String[][] mas = new String[(int) cursor.getRowCount()][2];

                {
                    makeMas();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.