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

com.avaje.ebeaninternal.server.query.CQueryDraftSupport Maven / Gradle / Ivy

There is a newer version: 9.5.1
Show newest version
package com.avaje.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 tableMap;

  CQueryDraftSupport(Map tableMap) {
    this.tableMap = tableMap;
  }

  /**
   * Return the draft table associated to the base table.
   *
   * 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);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy