All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neogroup.warp.data.DataTable Maven / Gradle / Ivy

There is a newer version: 1.4.3
Show newest version
package org.neogroup.warp.data;

import org.neogroup.warp.data.query.*;

import java.util.Collection;

public class DataTable extends QueryObject {

    private DataConnection connection;

    public DataTable(DataConnection connection, String table) {
        super(table);
        this.connection = connection;
    }

    public Collection find() {
        return connection.query(createSelectQuery());
    }

    public int insert () {
        return connection.execute(createInsertQuery());
    }

    public int update () {
        return connection.execute(createUpdateQuery());
    }

    public int delete () {
        return connection.execute(createDeleteQuery());
    }

    public DataObject first () {
        return limit(1).find().iterator().next();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy