package com.orientechnologies.orient.core.sql.query;

/**
 * Created by luigidellaquila on 23/03/15.
 */
public class OLiveQuery<T> extends OSQLSynchQuery<T> {

  public OLiveQuery() {
  }

  public OLiveQuery(String iText, final OLiveResultListener iResultListener) {
    super(iText);
    setResultListener(new OLocalLiveResultListener(iResultListener));
  }

  @Override
  public <RET> RET execute(Object... iArgs) {
    return super.execute(iArgs);
  }
}

@@ -1,104 +1,1517 @@
-package com.orientechnologies.orient.core.sql.query;%0A%0A/**%0A * Created by luigidellaquila on 23/03/15.
+/*%0A *%0A *  *  Copyright 2015 Orient Technologies LTD (info(at)orientdb.com)%0A *  *%0A *  *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  *  you may not use this file except in compliance with the License.%0A *  *  You may obtain a copy of the License at%0A *  *%0A *  *       http://www.apache.org/licenses/LICENSE-2.0%0A *  *%0A *  *  Unless required by applicable law or agreed to in writing, software%0A *  *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  *  See the License for the specific language governing permissions and%0A *  *  limitations under the License.%0A *  *%0A *  * For more information: http://www.orientdb.com%0A *%0A */%0Apackage com.orientechnologies.orient.core.sql.query;%0A%0A/**%0A * SQL live query.%0A * %3Cbr/%3E%3Cbr/%3E%0A * The statement syntax is the same as a normal SQL SELECT statement, but with LIVE as prefix:%0A * %3Cbr/%3E%3Cbr/%3E%0A * LIVE SELECT FROM Foo WHERE name = 'bar'%0A * %3Cbr/%3E%3Cbr/%3E%0A * Executing this query, the caller will subscribe to receive changes happening in the database,%0A * that match this query condition. The query returns a query token in the result set. To unsubscribe,%0A * the user has to execute another live query with the following syntax:%0A * %3Cbr/%3E%3Cbr/%3E%0A * LIVE UNSUBSCRIBE &lt;token&gt;%0A * %3Cbr/%3E%3Cbr/%3E%0A * The callback passed as second parameter will be invoked every time a record is created/updated/deleted%0A * and it matches the query conditions.%0A *%0A * @author Luigi Dell'Aquila
 %0A */

Add license and Javadoc to OLiveQuery