⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 columnmap.java

📁 根据Scott W. Ambler在1998年写的关于ORM Persistence Layer的详细设计论文的设计思路,Artem Rudoy 开发了一个开源的ORM实现 -- PL(Persist
💻 JAVA
字号:
package pl.map;

/**
 * This class contains information about table column.
 * @author: Artyom Rudoy
 */
public class ColumnMap {
  public final static int KEY_NONE = 0;
  public final static int PRIMARY_KEY = 1;
  public final static int FOREIGN_KEY = 2;

  private java.lang.String name = null;
  private int keyType = KEY_NONE;
  private TableMap tableMap = null;
  private int plType = pl.sql.PlTypes.UNDEFINED;
  private pl.sql.IdGenerator idGenerator = null;

  /**
   * Creates ColumnMap.
   */
  public ColumnMap(String name, TableMap tableMap) {
    super();

    this.name = name;
    this.tableMap = tableMap;

  }

  /**
   * Returns fully qualifies name of this column.
   * @return java.lang.String
   */
  public String getFullyQualifiedName() {
    return getTableMap().getName() + "." + getName();
  }

  /**
   * Returns key type of this column.
   * @return int
   */
  public int getKeyType() {
    return keyType;
  }

  /**
   * Return ID generator for this attribute map.
   *
   * @return ID generator
   */
  public pl.sql.IdGenerator getIdGenerator() {
    return idGenerator;
  }

  /**
   * Sets ID generator to the specified value.
   *
   * @param idGenerator IdGenerator
   */
  public void setIdGenerator(pl.sql.IdGenerator idGenerator) {
    this.idGenerator = idGenerator;
  }

  /**
   * Returns name of this column.
   * @return java.lang.String
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Returns type of this column.
   *
   * @return type of this column
   */
  public int getPlType() {
    return plType;
  }

  /**
   * Returns TableMap for this column.
   * @return pl.map.TableMap
   */
  public TableMap getTableMap() {
    return tableMap;
  }

  /**
   * Sets key type for this column.
   * @param keyType int
   */
  public void setKeyType(int keyType) {
    this.keyType = keyType;
  }

  /**
   * Sets type of this column.
   *
   * @param type
   */
  public void setPlType(int plType) {
    this.plType = plType;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -