Examples of scope()


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

        System.out.println();
        System.out.println(">Employees with full name in scope [B, I]:");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            printRecords(table.scope(FULL_NAME_INDEX, new Object[] {"B"}, new Object[] {"I"}));
        } finally {
            db.commit();
        }

        Calendar calendar = Calendar.getInstance();
View Full Code Here

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

        System.out.println();
        System.out.println(">Deleting rows of employees older than 30 years old.");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        try {
            ISqlJetCursor deleteCursor = table.scope(DOB_INDEX,
                     new Object[] {Long.MIN_VALUE},
                     new Object[] {calendar.getTimeInMillis()});
            while (!deleteCursor.eof()) {
                System.out.println("Deleting: " +
                        deleteCursor.getRowId() + " : " +
View Full Code Here

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

            db.commit();
        }
        try {
            db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
            ISqlJetTable table = db.getTable("test");
            ISqlJetCursor cursor = table.scope(null, new Object[] { Long.valueOf(10) },
                    new Object[] { Long.valueOf(20) });
            assertEquals(11, cursor.getRowCount());
            ISqlJetCursor reversed = cursor.reverse();
            assertEquals(11, reversed.getRowCount());
            List<Long> list = new LinkedList<Long>();
View Full Code Here

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

        db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                Assert.assertNotNull(t.getIndexDef("I"));
                Assert.assertNotNull(t.order("I"));
                Assert.assertNotNull(t.lookup("I", 0));
                Assert.assertNotNull(t.scope("I", new Object[] { 0 }, new Object[] { 0 }));
                return null;
            }
        });
        db.createIndex("create index II on t(a)");
        db.runReadTransaction(new ISqlJetTransaction() {
View Full Code Here

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

        db.createIndex("create index II on t(a)");
        db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                Assert.assertNotNull(t.getIndexDef("ii"));
                Assert.assertNotNull(t.order("ii"));
                Assert.assertNotNull(t.scope("ii", new Object[] { 0 }, new Object[] { 0 }));
                return null;
            }
        });
    }
View Full Code Here

Examples of org.vaadin.spring.events.EventBusListenerMethod.scope()

        boolean supports = super.supports(event);
        try {
            if (listenerMethod.isAnnotationPresent(EventBusListenerMethod.class)) {
                EventBusListenerMethod annotation = listenerMethod.getAnnotation(EventBusListenerMethod.class);
                EventBusListenerMethodFilter filter = annotation.filter().newInstance();
                EventScope scope = annotation.scope();
                if (scope.equals(EventScope.UNDEFINED)) {
                    scope = event.getScope();
                }
                supports = supports && filter.filter(event.getPayload()) && event.getScope().equals(scope);
            }
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.