#919 - io.ebean package initial

This commit is contained in:
Rob Bygrave
2016-12-11 23:23:22 +13:00
parent 5821dc96b9
commit 971e2dc91b
2134 changed files with 10721 additions and 8652 deletions
@@ -0,0 +1,28 @@
package io.ebeaninternal.server.query;
import java.util.Map;
/**
* Support 'asDraft' queries.
*/
class CQueryDraftSupport {
/**
* The mapping of base tables to their matching 'draft' table.
*/
private final Map<String, String> tableMap;
CQueryDraftSupport(Map<String, String> tableMap) {
this.tableMap = tableMap;
}
/**
* Return the draft table associated to the base table.
* <p>
* This returns null for entities that are not draftable and in that case
* the usual base table is used.
*/
String getDraftTable(String table) {
return tableMap.get(table);
}
}