Child pages
  • The ViewFoundSet

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
	/**
	 * listen for column changes of the given table/datasource.
	 * This is used by default if you just use enableDatabroadcastFor() without flags.  
	 * If you use the one with the flags you need to give this one if you just
	 * want to listen to column changes that are in the result for a given datasource and pk.
	 * This constants needs to have the pk's selected for the given datasource (should be in the results)
	 */
	ViewFoundSet.MONITOR_COLUMNS;

	/**
	 * listen for column changes of the given table/datasource in the join statement
	 * Like order_lines.productid that has a join to orders and is displaying the productname.
	 * If a change in such a join condition (like order_lines.productid in the sample above) 
     * is seen then the query will be fired again to detect changes.
	 */
	ViewFoundSet.MONITOR_JOIN_CONDITIONS;

	/**
	 * listen for column changes of the given table/datasource that are used in the where statement.
	 * Like order_lines.unit_price > 100. If a change is seen on that datasource on such a column used 
     * in the where a full query will be fired again to detect changes.
	 */
	ViewFoundSet.MONITOR_WHERE_CONDITIONS;

	/**
	 * listen for inserts on the given table/datasource.
	 * This will always result in a full query to detect changes whenever an insert on that table happens.
	 */
	ViewFoundSet.MONITOR_INSERT;

	/**
	 * listen for deletes on the given table/datasource.
	 * This will always result in a full query to detect changes whenever an delete on that table happens.
	 */
	ViewFoundSet.MONITOR_DELETES;

	/**
	 * listen for deletes on the given table/datasource which should be the primary/main table of this query.
	 * If a delete comes in for this table, then we will only remove the records from the ViewFoundSet 
     * that do have this primary key in its value. So no need to do a full query.
	 * So this will only work if the query shows order_lines for the order_lines table, 
     * not for the products table that is joined to get the product_name.
	 * Only 1 of the 2 monitors for deletes should be registered for a table/datasource.
	 * This constants needs to have the pk's selected for the given datasource (should be in the results)
	 */
	ViewFoundSet.MONITOR_DELETES_FOR_PRIMAIRYPRIMARY_TABLE;

	/**
	 *  listen for aggregates that are in the results of the given datasource.
	 *  This means that when there are updates on that specific column where the aggregate is on
	 *	or deletes, inserts on give datasource, a full requery will happen to refresh the aggregate.
	 */
	ViewFoundSet.MONITOR_AGGREGATES;

...