예제 #1
0
  public String getPkValues() {

    TableLayout layout = TableLayoutRepository.getLayout(environmentId, tableName);

    NMap params = new NMap();

    for (Column column : layout.getPkColumns()) {
      params.put(
          column.getKey(), entityParameter.get(Const.db.ORM_PARAMETER_ENTITY + column.getKey()));
    }

    return params.toJson();
  }
예제 #2
0
  public boolean isPkNotNull() {

    TableLayout layout = TableLayoutRepository.getLayout(environmentId, tableName);

    for (Column column : layout.getPkColumns()) {
      Object val = entityParameter.get(Const.db.ORM_PARAMETER_ENTITY + column.getKey());
      if (val == null) return false;
    }

    return true;
  }