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

com.querydsl.sql.ddl.ForeignKeyData Maven / Gradle / Ivy

There is a newer version: 6.9
Show newest version
/*
 * Copyright (c) 2010 Mysema Ltd.
 * All rights reserved.
 *
 */
package com.querydsl.sql.ddl;

import java.util.ArrayList;
import java.util.List;

/**
 * @author tiwe
 */
public class ForeignKeyData implements KeyData {

  private final String name;

  private final String table;

  private final List foreignColumns = new ArrayList<>();

  private final List parentColumns = new ArrayList<>();

  public ForeignKeyData(String name, String parentTable) {
    this.name = name;
    this.table = parentTable;
  }

  public void add(String foreignColumn, String parentColumn) {
    foreignColumns.add(foreignColumn);
    parentColumns.add(parentColumn);
  }

  public String getName() {
    return name;
  }

  public String getTable() {
    return table;
  }

  public List getForeignColumns() {
    return foreignColumns;
  }

  public List getParentColumns() {
    return parentColumns;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy