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

com.avaje.ebeaninternal.server.deploy.DeployPropertyParserMap Maven / Gradle / Ivy

There is a newer version: 9.5.1
Show newest version
package com.avaje.ebeaninternal.server.deploy;

import java.util.Collections;
import java.util.Map;
import java.util.Set;

/**
 * Converts logical property names to database columns using a Map.
 */
public final class DeployPropertyParserMap extends DeployParser {

  private final Map map;

  public DeployPropertyParserMap(Map map) {
    this.map = map;
  }

  /**
   * Returns null for raw sql queries.
   */
  public Set getIncludes() {
    return Collections.emptySet();
  }

  public String convertWord() {
    String r = getDeployWord(word);
    return r == null ? word : r;
  }

  @Override
  public String getDeployWord(String expression) {

    String deployExpr = map.get(expression);
    if (deployExpr == null) {
      return null;
    } else {
      return deployExpr;
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy